aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-09-20 11:25:26 -0400
committerClyne Sullivan <tullivan99@gmail.com>2017-09-20 11:25:26 -0400
commit8720f1f253b55fa5233626dd854671a5925d65de (patch)
tree8f6017a662288d65e5265a730a347301e596e81a /include
parentf7ec6aff4a7312586e986c891f370c442a6ae093 (diff)
inventory remembers slot positions
Diffstat (limited to 'include')
-rw-r--r--include/components/dialog.hpp2
-rw-r--r--include/inventory.hpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/include/components/dialog.hpp b/include/components/dialog.hpp
index 8d26b92..0bc23e8 100644
--- a/include/components/dialog.hpp
+++ b/include/components/dialog.hpp
@@ -7,7 +7,7 @@
struct Dialog : public Component {
Dialog(int idx = 0)
- : index(idx), rindex((idx == 9999) ? randGet() : idx), talking(false) {}
+ : index(idx), rindex(randGet()), talking(false) {}
Dialog(XMLElement* imp, XMLElement* def) {
fromXML(imp, def);
}
diff --git a/include/inventory.hpp b/include/inventory.hpp
index f340a24..f8581cc 100644
--- a/include/inventory.hpp
+++ b/include/inventory.hpp
@@ -91,6 +91,7 @@ private:
static bool fullInventory;
static void loadItems(void);
+ static void add(const std::string& name, int count, int slot);
public:
InventorySystem(int size = 20);