Resolving issues #16 and #20

This commit is contained in:
Song Minjae
2017-04-24 02:23:13 +09:00
parent 6399c2d66b
commit 5cd5ebbea3
21 changed files with 158 additions and 76 deletions

View File

@@ -19,17 +19,17 @@ object AmmoMeterProxy {
}
else {
meter.vitalGetterVal = {
if (ItemCodex[currentItem.id].consumable)
actor.inventory.getByID(currentItem.id)!!.amount.toFloat()
if (ItemCodex[currentItem.originalID].consumable)
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.amount.toFloat()
else
actor.inventory.getByID(currentItem.id)!!.item.durability
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.item.durability
}
meter.vitalGetterMax = {
if (ItemCodex[currentItem.id].consumable)
if (ItemCodex[currentItem.originalID].consumable)
500f
else
actor.inventory.getByID(currentItem.id)!!.item.maxDurability.toFloat()
actor.inventory.getByDynamicID(currentItem.dynamicID)!!.item.maxDurability.toFloat()
}
}
}