DEADSOFTWARE

Fix crash in craft
authorfredboy <fredboy@protonmail.com>
Fri, 10 May 2024 21:01:33 +0000 (04:01 +0700)
committerfredboy <fredboy@protonmail.com>
Fri, 10 May 2024 21:02:28 +0000 (04:02 +0700)
core/src/ru/deadsoftware/cavedroid/game/input/handler/mouse/AbstractInventoryItemsMouseInputHandler.kt

index f7fa6a5e874405346bd03db187a9351b8aea1497..dec8b7db0a65c8b32a530e655b5537ce17c9590a 100644 (file)
@@ -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)