diff --git a/assets/mods/basegame/items/itemid.csv b/assets/mods/basegame/items/itemid.csv index 19f2e3b42..20237e377 100644 --- a/assets/mods/basegame/items/itemid.csv +++ b/assets/mods/basegame/items/itemid.csv @@ -1,2 +1,3 @@ "id";"classname" - "8448";"net.torvald.terrarum.modulebasegame.items.PickaxeGeneric" \ No newline at end of file + "8448";"net.torvald.terrarum.modulebasegame.items.PickaxeGeneric" + "8449";"net.torvald.terrarum.modulebasegame.items.WirePieceSignalWire" diff --git a/src/net/torvald/terrarum/modulebasegame/ui/UIItemInventoryDynamicList.kt b/src/net/torvald/terrarum/modulebasegame/ui/UIItemInventoryDynamicList.kt index 3ef6f063a..743f7b9ff 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/UIItemInventoryDynamicList.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/UIItemInventoryDynamicList.kt @@ -50,16 +50,16 @@ class UIItemInventoryDynamicList( val catIconsMeaning = listOf( // sortedBy: catArrangement - GameItem.Category.WEAPON, - GameItem.Category.TOOL, - GameItem.Category.ARMOUR, - GameItem.Category.GENERIC, - GameItem.Category.POTION, - GameItem.Category.MAGIC, - GameItem.Category.BLOCK, - GameItem.Category.WALL, - GameItem.Category.MISC, - "__all__" + arrayOf(GameItem.Category.WEAPON), + arrayOf(GameItem.Category.TOOL, GameItem.Category.WIRE), + arrayOf(GameItem.Category.ARMOUR), + arrayOf(GameItem.Category.GENERIC), + arrayOf(GameItem.Category.POTION), + arrayOf(GameItem.Category.MAGIC), + arrayOf(GameItem.Category.BLOCK), + arrayOf(GameItem.Category.WALL), + arrayOf(GameItem.Category.MISC), + arrayOf("__all__") ) private val inventoryUI = parentUI @@ -316,7 +316,7 @@ class UIItemInventoryDynamicList( // filter items inventory.forEach { - if (ItemCodex[it.item]!!.inventoryCategory == filter || filter == "__all__") + if ((filter.contains(ItemCodex[it.item]!!.inventoryCategory) || filter[0] == "__all__")) inventorySortList.add(it) }