From: fredboy Date: Fri, 10 May 2024 21:01:33 +0000 (+0700) Subject: Fix crash in craft X-Git-Tag: alpha0.9.2~1 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=b2f824726f647543e69f31ac5723df37750b5778;p=cavedroid.git Fix crash in craft --- diff --git a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/AbstractInventoryItemsMouseInputHandler.kt b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/AbstractInventoryItemsMouseInputHandler.kt index f7fa6a5..dec8b7d 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/AbstractInventoryItemsMouseInputHandler.kt +++ b/core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/AbstractInventoryItemsMouseInputHandler.kt @@ -9,7 +9,6 @@ import ru.deadsoftware.cavedroid.game.input.action.keys.MouseInputActionKey import ru.deadsoftware.cavedroid.game.input.isInsideWindow import ru.deadsoftware.cavedroid.game.model.item.InventoryItem import ru.deadsoftware.cavedroid.game.model.item.InventoryItem.Companion.isNoneOrNull -import ru.deadsoftware.cavedroid.game.objects.container.Furnace import ru.deadsoftware.cavedroid.game.ui.windows.GameWindowsManager import ru.deadsoftware.cavedroid.game.ui.windows.inventory.AbstractInventoryWindow import ru.deadsoftware.cavedroid.game.ui.windows.inventory.AbstractInventoryWindowWithCraftGrid @@ -88,7 +87,7 @@ abstract class AbstractInventoryItemsMouseInputHandler( } else { if (action.actionKey is MouseInputActionKey.Screen) { if (!action.actionKey.touchUp) { - window.onLeftCLick(items, gameItemsHolder, Furnace.RESULT_INDEX, action.actionKey.pointer) + window.onLeftCLick(items, gameItemsHolder, index, action.actionKey.pointer) } } else if (action.actionKey is MouseInputActionKey.Left) { window.onLeftCLick(items, gameItemsHolder, index)