durability meter: stack of (new) tools displayed as intended

- displaying NOT based on their stacks but their health
This commit is contained in:
Song Minjae
2017-04-25 17:24:56 +09:00
parent ab8f019109
commit 36a7983024
3 changed files with 7 additions and 5 deletions

View File

@@ -108,7 +108,7 @@ abstract class InventoryItem : Comparable<InventoryItem>, Cloneable {
open var scale: Double = 1.0
/**
* Set to zero if durability not applicable
* Set to zero (InventoryItem.DURABILITY_NA) if durability not applicable
*/
open var maxDurability: Int = 0
@@ -255,6 +255,9 @@ abstract class InventoryItem : Comparable<InventoryItem>, Cloneable {
}
companion object {
val DURABILITY_NA = 0
fun generateUniqueDynamicID(inventory: ActorInventory): Int {
var ret: Int
do {