mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 22:44:04 +09:00
new ID for dynamic item work flawlessly with adding multiple at once
This commit is contained in:
@@ -20,16 +20,16 @@ object AmmoMeterProxy {
|
||||
else {
|
||||
meter.vitalGetterVal = {
|
||||
if (ItemCodex[currentItem.originalID].consumable)
|
||||
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.amount.toFloat()
|
||||
else
|
||||
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.item.durability
|
||||
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.amount.toFloat()
|
||||
else
|
||||
currentItem.durability
|
||||
}
|
||||
|
||||
meter.vitalGetterMax = {
|
||||
if (ItemCodex[currentItem.originalID].consumable)
|
||||
500f
|
||||
else
|
||||
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.item.maxDurability.toFloat()
|
||||
currentItem.maxDurability.toFloat()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user