066ca37a0317fe09de127a2bdc7c0e9dc9a65865
1 package ru.deadsoftware.cavedroid.game.ui.windows.inventory
3 import ru.deadsoftware.cavedroid.game.GameItemsHolder
4 import ru.deadsoftware.cavedroid.game.model.item.InventoryItem
6 abstract class AbstractInventoryWindowWithCraftGrid(
7 gameItemsHolder: GameItemsHolder,
8 ) : AbstractInventoryWindow() {
10 private val _items = Array(10) { gameItemsHolder.fallbackItem.toInventoryItem() }
12 val items get() = _items.asList()
14 val craftingItems get() = items.subList(0, 9) as MutableList<InventoryItem>
16 val craftResultList get() = items.subList(9, 10) as MutableList<InventoryItem>
18 var craftResult: InventoryItem
19 get() = craftResultList[0]
20 set(value) {
21 craftResultList[0] = value
22 }
24 }