a piece of wire is considered as a tool for inventory (for now)

This commit is contained in:
minjaesong
2019-03-10 18:13:29 +09:00
parent 833d8814a7
commit b495c010f4
2 changed files with 13 additions and 12 deletions

View File

@@ -1,2 +1,3 @@
"id";"classname" "id";"classname"
"8448";"net.torvald.terrarum.modulebasegame.items.PickaxeGeneric" "8448";"net.torvald.terrarum.modulebasegame.items.PickaxeGeneric"
"8449";"net.torvald.terrarum.modulebasegame.items.WirePieceSignalWire"
1 id classname
2 8448 net.torvald.terrarum.modulebasegame.items.PickaxeGeneric
3 8449 net.torvald.terrarum.modulebasegame.items.WirePieceSignalWire

View File

@@ -50,16 +50,16 @@ class UIItemInventoryDynamicList(
val catIconsMeaning = listOf( // sortedBy: catArrangement val catIconsMeaning = listOf( // sortedBy: catArrangement
GameItem.Category.WEAPON, arrayOf(GameItem.Category.WEAPON),
GameItem.Category.TOOL, arrayOf(GameItem.Category.TOOL, GameItem.Category.WIRE),
GameItem.Category.ARMOUR, arrayOf(GameItem.Category.ARMOUR),
GameItem.Category.GENERIC, arrayOf(GameItem.Category.GENERIC),
GameItem.Category.POTION, arrayOf(GameItem.Category.POTION),
GameItem.Category.MAGIC, arrayOf(GameItem.Category.MAGIC),
GameItem.Category.BLOCK, arrayOf(GameItem.Category.BLOCK),
GameItem.Category.WALL, arrayOf(GameItem.Category.WALL),
GameItem.Category.MISC, arrayOf(GameItem.Category.MISC),
"__all__" arrayOf("__all__")
) )
private val inventoryUI = parentUI private val inventoryUI = parentUI
@@ -316,7 +316,7 @@ class UIItemInventoryDynamicList(
// filter items // filter items
inventory.forEach { inventory.forEach {
if (ItemCodex[it.item]!!.inventoryCategory == filter || filter == "__all__") if ((filter.contains(ItemCodex[it.item]!!.inventoryCategory) || filter[0] == "__all__"))
inventorySortList.add(it) inventorySortList.add(it)
} }