summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4f3174f)
raw | patch | inline | side by side (parent: 4f3174f)
author | fredboy <fredboy@protonmail.com> | |
Tue, 14 May 2024 18:06:51 +0000 (01:06 +0700) | ||
committer | fredboy <fredboy@protonmail.com> | |
Tue, 14 May 2024 18:06:51 +0000 (01:06 +0700) |
74 files changed:
diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameComponent.java b/core/src/ru/deadsoftware/cavedroid/game/GameComponent.java
index 624e544ec17034d6bba141a35b28e250ea4cbab3..94d37d4be47f7808d7c8997c51cc98215a1f4743 100644 (file)
import dagger.Component;
import ru.deadsoftware.cavedroid.MainComponent;
-import ru.deadsoftware.cavedroid.game.actions.PlaceBlockActionsModule;
-import ru.deadsoftware.cavedroid.game.actions.UpdateBlockActionsModule;
-import ru.deadsoftware.cavedroid.game.actions.UseBlockActionsModule;
-import ru.deadsoftware.cavedroid.game.actions.UseItemActionsModule;
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandlersModule;
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandlersModule;
-import ru.deadsoftware.cavedroid.game.render.RenderModule;
+import ru.deadsoftware.cavedroid.generated.module.*;
@GameScope
@Component(dependencies = MainComponent.class,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/IPlaceBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/IPlaceBlockAction.kt
--- /dev/null
@@ -0,0 +1,9 @@
+package ru.deadsoftware.cavedroid.game.actions.placeblock
+
+import ru.deadsoftware.cavedroid.game.model.item.Item
+
+interface IPlaceBlockAction {
+
+ fun place(placeable: Item.Placeable, x: Int, y: Int)
+
+}
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockAction.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package ru.deadsoftware.cavedroid.game.actions.placeblock
-
-import ru.deadsoftware.cavedroid.game.model.item.Item
-import ru.fredboy.cavedroid.ksp.annotations.GenerateMapMultibindingsModule
-
-@GenerateMapMultibindingsModule(
- interfaceClass = IPlaceBlockAction::class,
- modulePackage = "ru.deadsoftware.cavedroid.game.actions",
- moduleName = "PlaceBlockActionsModule"
-)
-annotation class PlaceBlockAction(val stringKey: String)
-
-interface IPlaceBlockAction {
-
- fun place(placeable: Item.Placeable, x: Int, y: Int)
-
-}
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockItemToBackgroundAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockItemToBackgroundAction.kt
index 0a5399a0225c5edcb4203e0d9e0c618bf8066b70..72583017e73e32dc4d6408e1dd216525d744508f 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockItemToBackgroundAction.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockItemToBackgroundAction.kt
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.model.item.Item
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindPlaceBlockAction
import javax.inject.Inject
@GameScope
-@PlaceBlockAction(stringKey = PlaceBlockItemToBackgroundAction.ACTION_KEY)
+@BindPlaceBlockAction(stringKey = PlaceBlockItemToBackgroundAction.ACTION_KEY)
class PlaceBlockItemToBackgroundAction @Inject constructor(
private val gameWorld: GameWorld,
private val gameItemsHolder: GameItemsHolder,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockItemToForegroundAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockItemToForegroundAction.kt
index d3ff9797f6a528485dcf18b59479917ad8fb4d20..ec249fbc027561047a08993854b8a4d397a2b7f7 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockItemToForegroundAction.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceBlockItemToForegroundAction.kt
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.model.item.Item
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindPlaceBlockAction
import javax.inject.Inject
@GameScope
-@PlaceBlockAction(stringKey = PlaceBlockItemToForegroundAction.ACTION_KEY)
+@BindPlaceBlockAction(stringKey = PlaceBlockItemToForegroundAction.ACTION_KEY)
class PlaceBlockItemToForegroundAction @Inject constructor(
private val gameWorld: GameWorld,
private val placeSlabAction: PlaceSlabAction,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceSlabAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/placeblock/PlaceSlabAction.kt
index 3e0a185fee805a1fc803053ddb734178fae3f12a..00c62d7d94b392eb6e769a18366489c1a1417a4e 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.model.item.Item
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindPlaceBlockAction
import javax.inject.Inject
@GameScope
-@PlaceBlockAction(stringKey = PlaceSlabAction.ACTION_KEY)
+@BindPlaceBlockAction(stringKey = PlaceSlabAction.ACTION_KEY)
class PlaceSlabAction @Inject constructor(
private val gameWorld: GameWorld,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/IUpdateBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/IUpdateBlockAction.kt
index a397f1659bc54e59a3c58049b2d5a39e7b9d6a03..9cc4aeaa4f49211d4ce7d7c1387c2cb1faaf0b22 100644 (file)
package ru.deadsoftware.cavedroid.game.actions.updateblock
-import ru.fredboy.cavedroid.ksp.annotations.GenerateMapMultibindingsModule
-
-@GenerateMapMultibindingsModule(
- interfaceClass = IUpdateBlockAction::class,
- modulePackage = "ru.deadsoftware.cavedroid.game.actions",
- moduleName = "UpdateBlockActionsModule"
-)
-annotation class UpdateBlockAction(val stringKey: String)
-
interface IUpdateBlockAction {
fun update(x: Int, y: Int)
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateBedLeftAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateBedLeftAction.kt
index 4e43f8f15e5832ecaff33e715bd555c21d40f1b7..55075508c20897c4cb75651d22871eda5e79d547 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.FallingGravel
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUpdateBlockAction
import javax.inject.Inject
@GameScope
-@UpdateBlockAction(stringKey = UpdateBedLeftAction.BLOCK_KEY)
+@BindUpdateBlockAction(stringKey = UpdateBedLeftAction.BLOCK_KEY)
class UpdateBedLeftAction @Inject constructor(
private val gameWorld: GameWorld,
private val gameItemsHolder: GameItemsHolder,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateBedRightAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateBedRightAction.kt
index 78e81fa01206b2dee256fadf0941e537929666c5..42f551ed16505453c12711d9acebd3c02d98d6ca 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.FallingGravel
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUpdateBlockAction
import javax.inject.Inject
@GameScope
-@UpdateBlockAction(stringKey = UpdateBedRightAction.BLOCK_KEY)
+@BindUpdateBlockAction(stringKey = UpdateBedRightAction.BLOCK_KEY)
class UpdateBedRightAction @Inject constructor(
private val gameWorld: GameWorld,
private val gameItemsHolder: GameItemsHolder,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateGrassAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateGrassAction.kt
index 56f814fdf38bbece9c12bd34472acda55c543d59..476235a3dae9671dd240f057045364770ace0a3c 100644 (file)
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUpdateBlockAction
import javax.inject.Inject
@GameScope
-@UpdateBlockAction(stringKey = UpdateGrassAction.BLOCK_KEY)
+@BindUpdateBlockAction(stringKey = UpdateGrassAction.BLOCK_KEY)
class UpdateGrassAction @Inject constructor(
private val gameWorld: GameWorld,
private val mGameItemsHolder: GameItemsHolder,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateGravelAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateGravelAction.kt
index f51bc7fc7e46bf3f0733ddcd6fe032df1d716cac..3c5241857fb943c5d88ecd18bd68b423f45060dd 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.FallingGravel
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUpdateBlockAction
import javax.inject.Inject
@GameScope
-@UpdateBlockAction(stringKey = UpdateGravelAction.BLOCK_KEY)
+@BindUpdateBlockAction(stringKey = UpdateGravelAction.BLOCK_KEY)
class UpdateGravelAction @Inject constructor(
private val gameWorld: GameWorld,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateRequiresBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateRequiresBlockAction.kt
index 6b15a7acbc963ea7ec35a43008104628e2828e99..05d986357aa0086a67b24b19dcc0301133022c5d 100644 (file)
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUpdateBlockAction
import javax.inject.Inject
@GameScope
-@UpdateBlockAction(stringKey = UpdateRequiresBlockAction.ACTION_KEY)
+@BindUpdateBlockAction(stringKey = UpdateRequiresBlockAction.ACTION_KEY)
class UpdateRequiresBlockAction @Inject constructor(
private val gameWorld: GameWorld,
) : IUpdateBlockAction {
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateSandAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateSandAction.kt
index f2ef25ed941c6897237d2cb8fbc15701efebbad1..ac1ff8a9faa558dc6699180e56c4346686be024e 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.FallingSand
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUpdateBlockAction
import javax.inject.Inject
@GameScope
-@UpdateBlockAction(stringKey = UpdateSandAction.BLOCK_KEY)
+@BindUpdateBlockAction(stringKey = UpdateSandAction.BLOCK_KEY)
class UpdateSandAction @Inject constructor(
private val gameWorld: GameWorld,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateSnowedGrassAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/updateblock/UpdateSnowedGrassAction.kt
index 049c90b7b213f372592281c36274fe042205d05c..2cf5a57b5918e856e0f0042bde266d15623155fe 100644 (file)
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUpdateBlockAction
import javax.inject.Inject
@GameScope
-@UpdateBlockAction(stringKey = UpdateSnowedGrassAction.BLOCK_KEY)
+@BindUpdateBlockAction(stringKey = UpdateSnowedGrassAction.BLOCK_KEY)
class UpdateSnowedGrassAction @Inject constructor(
private val gameWorld: GameWorld,
private val mGameItemsHolder: GameItemsHolder,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/IUseBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/IUseBlockAction.kt
--- /dev/null
@@ -0,0 +1,9 @@
+package ru.deadsoftware.cavedroid.game.actions.useblock
+
+import ru.deadsoftware.cavedroid.game.model.block.Block
+
+interface IUseBlockAction {
+
+ fun perform(block: Block, x: Int, y: Int)
+
+}
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/UseBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/UseBlockAction.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package ru.deadsoftware.cavedroid.game.actions.useblock
-
-import ru.deadsoftware.cavedroid.game.model.block.Block
-import ru.fredboy.cavedroid.ksp.annotations.GenerateMapMultibindingsModule
-
-@GenerateMapMultibindingsModule(
- interfaceClass = IUseBlockAction::class,
- modulePackage = "ru.deadsoftware.cavedroid.game.actions",
- moduleName = "UseBlockActionsModule"
-)
-annotation class UseBlockAction(val stringKey: String)
-
-interface IUseBlockAction {
-
- fun perform(block: Block, x: Int, y: Int)
-
-}
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/UseChestAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/UseChestAction.kt
index fd370db74b862cd812ec225e531a77444f910718..93684e76778e3820ce49adb6bb478bc94a5eecb9 100644 (file)
import ru.deadsoftware.cavedroid.game.objects.container.Chest
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUseBlockAction
import javax.inject.Inject
@GameScope
-@UseBlockAction(stringKey = UseChestAction.KEY)
+@BindUseBlockAction(stringKey = UseChestAction.KEY)
class UseChestAction @Inject constructor(
private val gameWorld: GameWorld,
private val gameWindowsManager: GameWindowsManager,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/UseCraftingTableAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/UseCraftingTableAction.kt
index de1112e9b8f4c707bd2c0b85d5a0df902573cb07..6d6c1e9337c54388ba446b942d4a92abb11ced04 100644 (file)
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.model.block.Block
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUseBlockAction
import javax.inject.Inject
@GameScope
-@UseBlockAction(stringKey = UseCraftingTableAction.KEY)
+@BindUseBlockAction(stringKey = UseCraftingTableAction.KEY)
class UseCraftingTableAction @Inject constructor(
private val gameWindowsManager: GameWindowsManager
) : IUseBlockAction {
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/UseFurnaceAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useblock/UseFurnaceAction.kt
index 1426263cbd66f8ecf766b5108a1c3ebc9fde48dc..0b8ba5344c7c660db0cddf99bf4db27734a3271a 100644 (file)
import ru.deadsoftware.cavedroid.game.model.block.Block
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUseBlockAction
import javax.inject.Inject
@GameScope
-@UseBlockAction(stringKey = UseFurnaceAction.KEY)
+@BindUseBlockAction(stringKey = UseFurnaceAction.KEY)
class UseFurnaceAction @Inject constructor(
private val gameWorld: GameWorld,
private val gameWindowsManager: GameWindowsManager,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/IUseItemAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/IUseItemAction.kt
--- /dev/null
@@ -0,0 +1,9 @@
+package ru.deadsoftware.cavedroid.game.actions.useitem
+
+import ru.deadsoftware.cavedroid.game.model.item.Item
+
+interface IUseItemAction {
+
+ fun perform(item: Item.Usable, x: Int, y: Int)
+
+}
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseBedAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseBedAction.kt
index 1aefd6745aaa3eb7bb35c2d84669093b059bda0c..f48115efa02dbe00f5bd3c3adc0ac777729116fe 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.model.item.Item
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUseItemAction
import javax.inject.Inject
@GameScope
-@UseItemAction(UseBedAction.ACTION_KEY)
+@BindUseItemAction(UseBedAction.ACTION_KEY)
class UseBedAction @Inject constructor(
private val gameWorld: GameWorld,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseEmptyBucketAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseEmptyBucketAction.kt
index fd64751e64f751bf24ed050cae6ae568561fe976..6992af7d9f1af61cfdf9a52892f7fd983b2d83d2 100644 (file)
import ru.deadsoftware.cavedroid.game.model.block.Block
import ru.deadsoftware.cavedroid.game.model.item.Item
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUseItemAction
import javax.inject.Inject
@GameScope
-@UseItemAction(UseEmptyBucketAction.ACTION_KEY)
+@BindUseItemAction(UseEmptyBucketAction.ACTION_KEY)
class UseEmptyBucketAction @Inject constructor(
private val gameWorld: GameWorld,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseItemAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseItemAction.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package ru.deadsoftware.cavedroid.game.actions.useitem
-
-import ru.deadsoftware.cavedroid.game.model.item.Item
-import ru.fredboy.cavedroid.ksp.annotations.GenerateMapMultibindingsModule
-
-@GenerateMapMultibindingsModule(
- interfaceClass = IUseItemAction::class,
- modulePackage = "ru.deadsoftware.cavedroid.game.actions",
- moduleName = "UseItemActionsModule"
-)
-annotation class UseItemAction(val stringKey: String)
-
-interface IUseItemAction {
-
- fun perform(item: Item.Usable, x: Int, y: Int)
-
-}
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseLavaBucketAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseLavaBucketAction.kt
index 70438e3ac8406252b2ff120fb0577effdb06ea21..ec1e585dfeadc87c8351695c2ab493024ef9d472 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.model.item.Item
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUseItemAction
import javax.inject.Inject
@GameScope
-@UseItemAction(UseLavaBucketAction.ACTION_KEY)
+@BindUseItemAction(UseLavaBucketAction.ACTION_KEY)
class UseLavaBucketAction @Inject constructor(
private val gameWorld: GameWorld,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UsePigSpawnEggAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UsePigSpawnEggAction.kt
index 4b2aa00406d93b5e332509031f50d7b17ae6d571..5eddc5e90a609507e155ae82010b5abcdaaddff0 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.Pig
import ru.deadsoftware.cavedroid.game.model.item.Item
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUseItemAction
import ru.deadsoftware.cavedroid.misc.utils.px
import javax.inject.Inject
@GameScope
-@UseItemAction(UsePigSpawnEggAction.ACTION_KEY)
+@BindUseItemAction(UsePigSpawnEggAction.ACTION_KEY)
class UsePigSpawnEggAction @Inject constructor(
private val mobsController: MobsController,
private val gameItemsHolder: GameItemsHolder,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseWaterBucketAction.kt b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseWaterBucketAction.kt
index 83b8f24f3670df9fbd05041fb5f5e0160831b6ed..739ec2899335130d1b9daae1e3c2f14db5b8e991 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.model.item.Item
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindUseItemAction
import javax.inject.Inject
@GameScope
-@UseItemAction(UseWaterBucketAction.ACTION_KEY)
+@BindUseItemAction(UseWaterBucketAction.ACTION_KEY)
class UseWaterBucketAction @Inject constructor(
private val gameWorld: GameWorld,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/GameInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/IGameInputHandler.kt
similarity index 60%
rename from core/src/ru/deadsoftware/cavedroid/game/input/GameInputHandler.kt
rename to core/src/ru/deadsoftware/cavedroid/game/input/IGameInputHandler.kt
index 55dc61898d454b920089a7671fda4feaab688c34..2c5f118b4f87b73d14f8088a84339caea99860f0 100644 (file)
rename from core/src/ru/deadsoftware/cavedroid/game/input/GameInputHandler.kt
rename to core/src/ru/deadsoftware/cavedroid/game/input/IGameInputHandler.kt
index 55dc61898d454b920089a7671fda4feaab688c34..2c5f118b4f87b73d14f8088a84339caea99860f0 100644 (file)
import ru.deadsoftware.cavedroid.game.input.action.IGameInputAction
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
-import ru.fredboy.cavedroid.ksp.annotations.GenerateSetMultibindingsModule
-
-@GenerateSetMultibindingsModule(
- interfaceClass = IKeyboardInputHandler::class,
- modulePackage = "ru.deadsoftware.cavedroid.game.input",
- moduleName = "KeyboardInputHandlersModule"
-)
-annotation class KeyboardInputHandler
-
-@GenerateSetMultibindingsModule(
- interfaceClass = IMouseInputHandler::class,
- modulePackage = "ru.deadsoftware.cavedroid.game.input",
- moduleName = "MouseInputHandlersModule"
-)
-annotation class MouseInputHandler
interface IKeyboardInputHandler : IGameInputHandler<KeyboardInputAction>
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/CloseGameWindowKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/CloseGameWindowKeyboardInputHandler.kt
index cbc254e9d8ff6e910c142acb9d8555c692d70764..8bf9b1c25d666408b1c3c1a70ac1e9f14bd9dd23 100644 (file)
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.objects.drop.DropController
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class CloseGameWindowKeyboardInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/DropItemKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/DropItemKeyboardInputHandler.kt
index 01a0c1f162e8e95622a9dedebd6c96b11636954f..e9c8eb0499fad68d8be0022d03f9cb68842f027f 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/DropItemKeyboardInputHandler.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/DropItemKeyboardInputHandler.kt
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.objects.drop.Drop
import ru.deadsoftware.cavedroid.game.objects.drop.DropController
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class DropItemKeyboardInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/FlyDownKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/FlyDownKeyboardInputHandler.kt
index 8e41dfec9bd8e30ca1867dba349a6fad0a540f45..ae5f4c3c86473c2b0240ee4d41171557c2a76f76 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class FlyDownKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/FlyUpKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/FlyUpKeyboardInputHandler.kt
index 976b069692325453bfea465caee772b84be2cd06..444fe09f36ab6dcfd2fdceb71928905cce53d74d 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class FlyUpKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/GoLeftKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/GoLeftKeyboardInputHandler.kt
index 823447617d01721a4cdf7f3c091b953e3cffe5b5..2b40d4634ad55a81fb62c416190b133a94f557c2 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.Mob
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class GoLeftKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/GoRightKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/GoRightKeyboardInputHandler.kt
index 3139a179742ecc4924666246bb1be8486395cc87..ec38218fea5c7d5aa511615d559f3dab2cdfc1f6 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.Mob
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class GoRightKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/JumpKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/JumpKeyboardInputHandler.kt
index 30f12dd383de0e4f37f4340d088a6f81771797e5..bcacbf578ebf6928bbb4e0e62c0c5fc03eb1c3b7 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class JumpKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/MoveCursorControlsModeKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/MoveCursorControlsModeKeyboardInputHandler.kt
index 98d3e0aa913e7b9acb4c4cd52ce2e81998c4b2fb..84c5b900cc5d12fdc2d217a5eee0326e716340e7 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class MoveCursorControlsModeKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/OpenInventoryKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/OpenInventoryKeyboardInputHandler.kt
index a1ca3da81d67099ec85a5aefe3173b5078d3b328..70ae1585c75a9f5ed3f974ddbb147c8871481ecb 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/OpenInventoryKeyboardInputHandler.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/OpenInventoryKeyboardInputHandler.kt
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class OpenInventoryKeyboardInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
) : IKeyboardInputHandler {
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/PauseGameKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/PauseGameKeyboardInputHandler.kt
index e4d670738853bcf4405e8a2e9949d1f0c9af7a1f..cedc78a7fc128e95ed99757e6bd3243a2893e934 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/PauseGameKeyboardInputHandler.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/PauseGameKeyboardInputHandler.kt
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.objects.container.ContainerController
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class PauseGameKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val dropController: DropController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/SelectHotbarSlotKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/SelectHotbarSlotKeyboardInputHandler.kt
index 0c7ea74c2474d5a47b7425f34a6201b63a246305..d22cd947ee0b78616fc6bbcc5fad042f60fd0870 100644 (file)
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class SelectHotbarSlotKeyboardInputHandler @Inject constructor(
private val mobsController: MobsController,
) : IKeyboardInputHandler {
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/StopSwimKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/StopSwimKeyboardInputHandler.kt
index 7256c5402274b911b4cc95b33bc77f35355e4c7d..d8c5acc9fe323e98b66e616f3a858ffa4a7a504d 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/StopSwimKeyboardInputHandler.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/StopSwimKeyboardInputHandler.kt
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class StopSwimKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/SwimUpKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/SwimUpKeyboardInputHandler.kt
index 9dc4777e0374dc7d0e28b54647273dd7fd5b587e..20cc82ecaef5f48d5b01000c4d4dc7b732ad1c22 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class SwimUpKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleControlsModeKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleControlsModeKeyboardInputHandler.kt
index a933c80e488537c214522ea0be9d9a2fbf2790ce..f8e0177faddbc6239b91f1f564a5d9061ebba94b 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class ToggleControlsModeKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleDebugInfoKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleDebugInfoKeyboardInputHandler.kt
index 065b28cd63e1e21f122f0f5fcef8db761eb02936..7cf08ed10656cf8c531bb63831146d3d0614c193 100644 (file)
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class ToggleDebugInfoKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig
) : IKeyboardInputHandler {
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleGameModeKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleGameModeKeyboardInputHandler.kt
index a17e6d253c960154dabdafa71daf38f2937a827c..64a11165e5b882548d1b4e3077cb92d2cc73379f 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleGameModeKeyboardInputHandler.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleGameModeKeyboardInputHandler.kt
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class ToggleGameModeKeyboardInputHandler @Inject constructor(
private val mobsController: MobsController
) : IKeyboardInputHandler {
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleMinimapKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleMinimapKeyboardInputHandler.kt
index 6f22e4ca2ac84353e46d0d8fe42710a3f7b8e4c5..2cd6638c01bb6c9e29604e2c9a1f28449ba9a4a7 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleMinimapKeyboardInputHandler.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/ToggleMinimapKeyboardInputHandler.kt
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class ToggleMinimapKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
) : IKeyboardInputHandler {
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/TurnOnFlyModeKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/TurnOnFlyModeKeyboardInputHandler.kt
index 3b43d31b00daf8058c0a6ca6d9b49fd083c0bb66..43a7122970acf6c94dec1c149539c82e2209d273 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/TurnOnFlyModeKeyboardInputHandler.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/keyboard/TurnOnFlyModeKeyboardInputHandler.kt
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
-import ru.deadsoftware.cavedroid.game.input.KeyboardInputHandler
import ru.deadsoftware.cavedroid.game.input.action.KeyboardInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.KeyboardInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.mobs.player.Player
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindKeyboardInputHandler
import javax.inject.Inject
@GameScope
-@KeyboardInputHandler
+@BindKeyboardInputHandler
class TurnOnFlyModeKeyboardInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/AttackMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/AttackMouseInputHandler.kt
index c2a22ede8b003fc1c5352555af6acde44ea661ca..52333ebcef42c503e0a1c387234c9532a95a8caf 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.input.IMouseInputHandler
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.MouseInputActionKey
import ru.deadsoftware.cavedroid.game.input.isInsideHotbar
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class AttackMouseInputHandler @Inject constructor(
private val mobsController: MobsController,
private val gameWorld: GameWorld,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/CloseGameWindowMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/CloseGameWindowMouseInputHandler.kt
index b5ff2c5a069b0b98cad49888f5934bdfaee1c9e7..4fb0879ec4567481d1d09e7df42cc43db5595461 100644 (file)
--- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/CloseGameWindowMouseInputHandler.kt
+++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/CloseGameWindowMouseInputHandler.kt
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import com.badlogic.gdx.graphics.g2d.TextureRegion
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
import ru.deadsoftware.cavedroid.game.input.IMouseInputHandler
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.MouseInputActionKey
import ru.deadsoftware.cavedroid.game.input.isInsideWindow
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class CloseGameWindowMouseInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/CreativeInventoryScrollMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/CreativeInventoryScrollMouseInputHandler.kt
index bf6ba3721e5e9f685f223aae67dd44040d872e88..8acdb7e1d5cdd7437d61c9c64c678a5ce0a2aff1 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import com.badlogic.gdx.math.MathUtils
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
import ru.deadsoftware.cavedroid.game.input.IMouseInputHandler
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.MouseInputActionKey
import ru.deadsoftware.cavedroid.game.input.isInsideWindow
import kotlin.math.abs
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class CreativeInventoryScrollMouseInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val gameWindowsManager: GameWindowsManager,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/CursorMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/CursorMouseInputHandler.kt
index 5d5c79f78e2e94d6d475920dfd11be332636b2ff..c1f2af584a8ea931c8ec5f0b5d9429507c18038b 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import com.badlogic.gdx.math.MathUtils
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.input.IMouseInputHandler
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.MouseInputActionKey
import ru.deadsoftware.cavedroid.game.mobs.Mob
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class CursorMouseInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/HotbarMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/HotbarMouseInputHandler.kt
index 45ae49b4747de4a0f3265797c51a3275a065c04b..6a66338753956f6013de027289107f228110e183 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import com.badlogic.gdx.utils.Timer
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
import ru.deadsoftware.cavedroid.game.input.IMouseInputHandler
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.MouseInputActionKey
import ru.deadsoftware.cavedroid.game.input.handler.keyboard.DropItemKeyboardInputHandler.Companion.DROP_DISTANCE
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class HotbarMouseInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectChestInventoryItemMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectChestInventoryItemMouseInputHandler.kt
index 3118e9fdf705ddc4ef798b19681bfc3f825d3858..62a48366e6ef4d342b4bac8578c55d1350dd4c06 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsConfigs
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class SelectChestInventoryItemMouseInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectCraftingInventoryItemMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectCraftingInventoryItemMouseInputHandler.kt
index cc993c99a5e81f3afcd1d761a0cbd57ad72873e2..aefea54d6d5797161677ac137e05c961f887bae7 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsConfigs
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class SelectCraftingInventoryItemMouseInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectCreativeInventoryItemMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectCreativeInventoryItemMouseInputHandler.kt
index 5c6975fbb5c5aa9ab9d0f344306167f80b673525..976f443c93ceff7a8fb20c7beffd33296607cd04 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
import ru.deadsoftware.cavedroid.game.input.IMouseInputHandler
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.MouseInputActionKey
import ru.deadsoftware.cavedroid.game.input.isInsideWindow
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class SelectCreativeInventoryItemMouseInputHandler @Inject constructor(
private val gameItemsHolder: GameItemsHolder,
private val gameWindowsManager: GameWindowsManager,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectFurnaceInventoryItemMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectFurnaceInventoryItemMouseInputHandler.kt
index 164b0c1dcb3d54fe3bfb287eb4984a57cdb6d538..eac8cfa2d54b88c8a58d713841dff5ee8934c91c 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.model.item.InventoryItem.Companion.isNoneOrNull
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class SelectFurnaceInventoryItemMouseInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectSurvivalInventoryItemMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/SelectSurvivalInventoryItemMouseInputHandler.kt
index 9f25b9adc9b59942f3622b3e74e6f503921f534d..58687fcbc1ae0bf5063ed516d55cf52bc19d8265 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import ru.deadsoftware.cavedroid.game.GameItemsHolder
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.GameUiWindow
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsConfigs
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class SelectSurvivalInventoryItemMouseInputHandler @Inject constructor(
private val gameWindowsManager: GameWindowsManager,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/UseItemMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/UseItemMouseInputHandler.kt
index c0ff332e393509e174edf0c1e1fb57e0fab1254a..541bba71243e63ababb76f794f5960e1b7a29b09 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.mouse
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.utils.Timer
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.actions.useblock.IUseBlockAction
import ru.deadsoftware.cavedroid.game.actions.useitem.IUseItemAction
import ru.deadsoftware.cavedroid.game.input.IMouseInputHandler
-import ru.deadsoftware.cavedroid.game.input.MouseInputHandler
import ru.deadsoftware.cavedroid.game.input.action.MouseInputAction
import ru.deadsoftware.cavedroid.game.input.action.keys.MouseInputActionKey
import ru.deadsoftware.cavedroid.game.input.isInsideHotbar
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class UseItemMouseInputHandler @Inject constructor(
private val mobsController: MobsController,
private val useItemActionMap: Map<String, @JvmSuppressWildcards IUseItemAction>,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/touch/JoystickInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/touch/JoystickInputHandler.kt
index b6f31a3bd77e1b3e7e4bdbc5f6667e8ee8c00c8c..d717c1850807a74ae32b86e045239db845f713b2 100644 (file)
package ru.deadsoftware.cavedroid.game.input.handler.touch
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindMouseInputHandler
import com.badlogic.gdx.utils.TimeUtils
import ru.deadsoftware.cavedroid.MainConfig
import ru.deadsoftware.cavedroid.game.GameScope
import javax.inject.Inject
@GameScope
-@MouseInputHandler
+@BindMouseInputHandler
class JoystickInputHandler @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/BackgroundBlocksRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/BackgroundBlocksRenderer.kt
index e86450c07a752233c586ecb2427c585093070b82..0d345403c17e443dc418136bf16331ee6a3c6f97 100644 (file)
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindRenderer
import ru.deadsoftware.cavedroid.misc.utils.forEachBlockInArea
import javax.inject.Inject
@GameScope
-@GameRenderer
+@BindRenderer
class BackgroundBlocksRenderer @Inject constructor(
gameWorld: GameWorld,
mobsController: MobsController
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/DebugRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/DebugRenderer.kt
index d1a1d162090c0a7724347d5260deefb656968079..0fa27560c6d372c576aaaa6f4926d1d08519f2e2 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.model.block.Block
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindRenderer
import ru.deadsoftware.cavedroid.misc.utils.bl
import ru.deadsoftware.cavedroid.misc.utils.drawString
import ru.deadsoftware.cavedroid.misc.utils.forEachBlockInArea
import ru.deadsoftware.cavedroid.misc.utils.px
import javax.inject.Inject
-@GameRenderer
@GameScope
+@BindRenderer
class DebugRenderer @Inject constructor(
private val mainConfig: MainConfig,
private val gameWorld: GameWorld,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/DropsRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/DropsRenderer.kt
index 5e1da4a42d8e057b2f2f1585f44441828e52bfce..d1fc65ab8ee654ec62936b687b4341cc92554f6d 100644 (file)
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.objects.drop.DropController
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindRenderer
import ru.deadsoftware.cavedroid.misc.utils.cycledInsideWorld
import ru.deadsoftware.cavedroid.misc.utils.drawSprite
import ru.deadsoftware.cavedroid.misc.utils.px
import javax.inject.Inject
@GameScope
-@GameRenderer
+@BindRenderer
class DropsRenderer @Inject constructor(
private val dropController: DropController,
private val gameWorld: GameWorld,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/ForegroundBlocksRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/ForegroundBlocksRenderer.kt
index 0bb4001f7824b94ff5b2906cd030899016fdec97..8353b0b39bc6262565d0062611df0d8eae84633d 100644 (file)
import ru.deadsoftware.cavedroid.game.GameScope
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindRenderer
import ru.deadsoftware.cavedroid.misc.utils.forEachBlockInArea
import javax.inject.Inject
@GameScope
-@GameRenderer
+@BindRenderer
class ForegroundBlocksRenderer @Inject constructor(
gameWorld: GameWorld,
mobsController: MobsController
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/HudRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/HudRenderer.kt
index cb70e1614ec707d4a9a8002f88154da329af2cee..b6b22aeaa13ca621c96f2f9bc5d7c184c0695324 100644 (file)
import ru.deadsoftware.cavedroid.game.ui.TooltipManager
import ru.deadsoftware.cavedroid.game.world.GameWorld
import ru.deadsoftware.cavedroid.misc.Assets
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindRenderer
import ru.deadsoftware.cavedroid.misc.utils.drawString
import ru.deadsoftware.cavedroid.misc.utils.px
import javax.inject.Inject
@GameScope
-@GameRenderer
+@BindRenderer
class HudRenderer @Inject constructor(
private val gameWorld: GameWorld,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/GameRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/IGameRenderer.kt
similarity index 61%
rename from core/src/ru/deadsoftware/cavedroid/game/render/GameRenderer.kt
rename to core/src/ru/deadsoftware/cavedroid/game/render/IGameRenderer.kt
index c0ded1ec93e81830d0c917e06e973857e2170aca..88b574484f864d813c1edbe3a2d992369a4354bf 100644 (file)
rename from core/src/ru/deadsoftware/cavedroid/game/render/GameRenderer.kt
rename to core/src/ru/deadsoftware/cavedroid/game/render/IGameRenderer.kt
index c0ded1ec93e81830d0c917e06e973857e2170aca..88b574484f864d813c1edbe3a2d992369a4354bf 100644 (file)
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.glutils.ShapeRenderer
import com.badlogic.gdx.math.Rectangle
-import ru.fredboy.cavedroid.ksp.annotations.GenerateSetMultibindingsModule
-
-@GenerateSetMultibindingsModule(
- interfaceClass = IGameRenderer::class,
- modulePackage = "ru.deadsoftware.cavedroid.game.render",
- moduleName = "RenderModule"
-)
-annotation class GameRenderer
interface IGameRenderer {
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/MobsRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/MobsRenderer.kt
index ab1dd01187dcb56e566aea21a7055d25ce79a46d..52ac971954e64483000608a839db82efe8b1db5a 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.Mob
import ru.deadsoftware.cavedroid.game.mobs.MobsController
import ru.deadsoftware.cavedroid.game.world.GameWorld
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindRenderer
import ru.deadsoftware.cavedroid.misc.utils.cycledInsideWorld
import ru.deadsoftware.cavedroid.misc.utils.px
import javax.inject.Inject
@GameScope
-@GameRenderer
+@BindRenderer
class MobsRenderer @Inject constructor(
private val mobsController: MobsController,
private val gameWorld: GameWorld,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/TouchControlsRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/TouchControlsRenderer.kt
index 29702aece89cc3d9fcec5f0b87f429d0de239062..f2198aac4bfb0409960fe1b7f5cd87884a579424 100644 (file)
import ru.deadsoftware.cavedroid.game.mobs.player.Player.ControlMode
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
import ru.deadsoftware.cavedroid.misc.Assets
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindRenderer
import ru.deadsoftware.cavedroid.misc.utils.ArrayMapExtensions.component1
import ru.deadsoftware.cavedroid.misc.utils.ArrayMapExtensions.component2
import ru.deadsoftware.cavedroid.misc.utils.drawSprite
import javax.inject.Inject
@GameScope
-@GameRenderer
+@BindRenderer
class TouchControlsRenderer @Inject constructor(
private val mainConfig: MainConfig,
private val mobsController: MobsController,
diff --git a/core/src/ru/deadsoftware/cavedroid/game/render/WindowsRenderer.kt b/core/src/ru/deadsoftware/cavedroid/game/render/WindowsRenderer.kt
index 4e65b41dc3dce3102e12c501ac9aa845d8692aaa..945bb1ec458991b9e4487636895f53914c77d376 100644 (file)
import ru.deadsoftware.cavedroid.game.GameUiWindow
import ru.deadsoftware.cavedroid.game.render.windows.*
import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager
+import ru.deadsoftware.cavedroid.misc.annotations.multibinding.BindRenderer
import javax.inject.Inject
@GameScope
-@GameRenderer
+@BindRenderer
class WindowsRenderer @Inject constructor(
private val creativeWindowRenderer: CreativeWindowRenderer,
private val survivalWindowRenderer: SurvivalWindowRenderer,
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindKeyboardInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindKeyboardInputHandler.kt
--- /dev/null
@@ -0,0 +1,11 @@
+package ru.deadsoftware.cavedroid.misc.annotations.multibinding
+
+import ru.deadsoftware.cavedroid.game.input.IKeyboardInputHandler
+import ru.fredboy.cavedroid.ksp.annotations.GenerateSetMultibindingsModule
+
+@GenerateSetMultibindingsModule(
+ interfaceClass = IKeyboardInputHandler::class,
+ modulePackage = MultibindingConfig.GENERATED_MODULES_PACKAGE,
+ moduleName = "KeyboardInputHandlersModule"
+)
+annotation class BindKeyboardInputHandler
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindMouseInputHandler.kt
--- /dev/null
@@ -0,0 +1,11 @@
+package ru.deadsoftware.cavedroid.misc.annotations.multibinding
+
+import ru.deadsoftware.cavedroid.game.input.IMouseInputHandler
+import ru.fredboy.cavedroid.ksp.annotations.GenerateSetMultibindingsModule
+
+@GenerateSetMultibindingsModule(
+ interfaceClass = IMouseInputHandler::class,
+ modulePackage = MultibindingConfig.GENERATED_MODULES_PACKAGE,
+ moduleName = "MouseInputHandlersModule"
+)
+annotation class BindMouseInputHandler
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindPlaceBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindPlaceBlockAction.kt
--- /dev/null
@@ -0,0 +1,11 @@
+package ru.deadsoftware.cavedroid.misc.annotations.multibinding
+
+import ru.deadsoftware.cavedroid.game.actions.placeblock.IPlaceBlockAction
+import ru.fredboy.cavedroid.ksp.annotations.GenerateMapMultibindingsModule
+
+@GenerateMapMultibindingsModule(
+ interfaceClass = IPlaceBlockAction::class,
+ modulePackage = MultibindingConfig.GENERATED_MODULES_PACKAGE,
+ moduleName = "PlaceBlockActionsModule"
+)
+annotation class BindPlaceBlockAction(val stringKey: String)
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindRenderer.kt b/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindRenderer.kt
--- /dev/null
@@ -0,0 +1,11 @@
+package ru.deadsoftware.cavedroid.misc.annotations.multibinding
+
+import ru.deadsoftware.cavedroid.game.render.IGameRenderer
+import ru.fredboy.cavedroid.ksp.annotations.GenerateSetMultibindingsModule
+
+@GenerateSetMultibindingsModule(
+ interfaceClass = IGameRenderer::class,
+ modulePackage = MultibindingConfig.GENERATED_MODULES_PACKAGE,
+ moduleName = "RenderModule"
+)
+annotation class BindRenderer
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindUpdateBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindUpdateBlockAction.kt
--- /dev/null
@@ -0,0 +1,11 @@
+package ru.deadsoftware.cavedroid.misc.annotations.multibinding
+
+import ru.deadsoftware.cavedroid.game.actions.updateblock.IUpdateBlockAction
+import ru.fredboy.cavedroid.ksp.annotations.GenerateMapMultibindingsModule
+
+@GenerateMapMultibindingsModule(
+ interfaceClass = IUpdateBlockAction::class,
+ modulePackage = MultibindingConfig.GENERATED_MODULES_PACKAGE,
+ moduleName = "UpdateBlockActionsModule"
+)
+annotation class BindUpdateBlockAction(val stringKey: String)
\ No newline at end of file
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindUseBlockAction.kt b/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindUseBlockAction.kt
--- /dev/null
@@ -0,0 +1,11 @@
+package ru.deadsoftware.cavedroid.misc.annotations.multibinding
+
+import ru.deadsoftware.cavedroid.game.actions.useblock.IUseBlockAction
+import ru.fredboy.cavedroid.ksp.annotations.GenerateMapMultibindingsModule
+
+@GenerateMapMultibindingsModule(
+ interfaceClass = IUseBlockAction::class,
+ modulePackage = MultibindingConfig.GENERATED_MODULES_PACKAGE,
+ moduleName = "UseBlockActionsModule"
+)
+annotation class BindUseBlockAction(val stringKey: String)
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindUseItemAction.kt b/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/BindUseItemAction.kt
--- /dev/null
@@ -0,0 +1,11 @@
+package ru.deadsoftware.cavedroid.misc.annotations.multibinding
+
+import ru.deadsoftware.cavedroid.game.actions.useitem.IUseItemAction
+import ru.fredboy.cavedroid.ksp.annotations.GenerateMapMultibindingsModule
+
+@GenerateMapMultibindingsModule(
+ interfaceClass = IUseItemAction::class,
+ modulePackage = MultibindingConfig.GENERATED_MODULES_PACKAGE,
+ moduleName = "UseItemActionsModule"
+)
+annotation class BindUseItemAction(val stringKey: String)
diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/MultibindingConfig.kt b/core/src/ru/deadsoftware/cavedroid/misc/annotations/multibinding/MultibindingConfig.kt
--- /dev/null
@@ -0,0 +1,5 @@
+package ru.deadsoftware.cavedroid.misc.annotations.multibinding
+
+data object MultibindingConfig {
+ const val GENERATED_MODULES_PACKAGE = "ru.deadsoftware.cavedroid.generated.module"
+}
\ No newline at end of file