mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
item autoreload is restricted to tools only
This commit is contained in:
@@ -145,9 +145,9 @@ class ActorInventory() : FixtureInventory() {
|
||||
if (newItem.durability <= 0) {
|
||||
remove(newItem, 1)
|
||||
|
||||
// auto pull the same item if the player has one
|
||||
// auto reload the same item if the player has one, tool only
|
||||
(actor as Pocketed).inventory.let { inv ->
|
||||
inv.itemList.filter { ItemCodex[it.itm]?.originalID == newItem.originalID }.firstOrNull()?.let { (itm, qty) ->
|
||||
inv.itemList.filter { ItemCodex[it.itm]?.originalID == newItem.originalID && ItemCodex[it.itm]?.hasTag("TOOL") == true }.firstOrNull()?.let { (itm, qty) ->
|
||||
printdbg(this, "AutoEquip item $itm")
|
||||
|
||||
actor.equipItem(itm)
|
||||
|
||||
Reference in New Issue
Block a user