X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavedroid%2Fgame%2Factions%2Fuseitem%2FUseWaterBucketAction.kt;h=32025ced4c98f86d9ca7093de11e17e019a7e6a7;hb=1c004c0ce7e183e773b5b486295c25e39732e899;hp=fecb77f51f0cf98db42187684a11b1758cac7f49;hpb=47099181db7f7d785c9c471cbaca474ebcb67d95;p=cavedroid.git 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 fecb77f..32025ce 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseWaterBucketAction.kt +++ b/core/src/ru/deadsoftware/cavedroid/game/actions/useitem/UseWaterBucketAction.kt @@ -1,9 +1,10 @@ package ru.deadsoftware.cavedroid.game.actions.useitem import ru.deadsoftware.cavedroid.game.GameItems +import ru.deadsoftware.cavedroid.game.GameItemsHolder import ru.deadsoftware.cavedroid.game.GameScope import ru.deadsoftware.cavedroid.game.mobs.MobsController -import ru.deadsoftware.cavedroid.game.objects.Item +import ru.deadsoftware.cavedroid.game.model.item.Item import ru.deadsoftware.cavedroid.game.world.GameWorld import javax.inject.Inject @@ -11,10 +12,11 @@ import javax.inject.Inject class UseWaterBucketAction @Inject constructor( private val gameWorld: GameWorld, private val mobsController: MobsController, + private val gameItemsHolder: GameItemsHolder, ) : IUseItemAction { - override fun perform(item: Item, x: Int, y: Int) { - gameWorld.placeToForeground(x, y, GameItems.getBlockId("water")) + override fun perform(item: Item.Usable, x: Int, y: Int) { + gameWorld.placeToForeground(x, y, gameItemsHolder.getBlock("water")) mobsController.player.setCurrentInventorySlotItem(GameItems.getItemId("bucket_empty")) }