mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 09:06:06 +09:00
unequipping already equipping item when the game tries to equip a new item on the same slot
This commit is contained in:
@@ -61,6 +61,9 @@ interface Pocketed {
|
|||||||
inventory.add(item)
|
inventory.add(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unequip item that's already there
|
||||||
|
unequipSlot(item.equipPosition)
|
||||||
|
|
||||||
if (item.equipPosition >= 0) {
|
if (item.equipPosition >= 0) {
|
||||||
inventory.itemEquipped[item.equipPosition] = item.dynamicID
|
inventory.itemEquipped[item.equipPosition] = item.dynamicID
|
||||||
item.effectWhenEquipped(AppLoader.UPDATE_RATE)
|
item.effectWhenEquipped(AppLoader.UPDATE_RATE)
|
||||||
|
|||||||
Reference in New Issue
Block a user