From b2f824726f647543e69f31ac5723df37750b5778 Mon Sep 17 00:00:00 2001 From: fredboy Date: Sat, 11 May 2024 04:01:33 +0700 Subject: [PATCH] Fix crash in craft --- .../handler/mouse/AbstractInventoryItemsMouseInputHandler.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) -- 2.29.2