summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2016-10-03 12:39:51 -0500
committerDavid McMackins II <contact@mcmackins.org>2016-10-03 12:39:51 -0500
commit865ae5c6f77133a1ca0107cb6c244838304e2e0e (patch)
tree5662be9ee5ca0cd51ce9c28c2d158154fc17842d
parented7df699e384803b5a3b36435a98fe123171215b (diff)
Add refreshing to inventory item editor
-rw-r--r--src/com/delwink/icebox/Inventory.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/delwink/icebox/Inventory.java b/src/com/delwink/icebox/Inventory.java
index bd6a574..698c934 100644
--- a/src/com/delwink/icebox/Inventory.java
+++ b/src/com/delwink/icebox/Inventory.java
@@ -201,6 +201,10 @@ public class Inventory {
ITEMS.put(item.getID(), item);
}
+ public void deleteItem(int id) {
+ ITEMS.remove(id);
+ }
+
public Collection<InventoryItem> getItems() {
return ITEMS.values();
}
@@ -218,10 +222,6 @@ public class Inventory {
if (ITEMS.isEmpty())
return 0;
-// for (Integer id : ITEMS.keySet())
-// if (!ITEMS.containsKey(id + 1))
-// return id + 1;
-
throw new IllegalStateException("Could not find next item ID");
}
}