namespace common {
-Inventory::Inventory() {
+Inventory::Inventory()
+: scenarioEnd(0) {
}
}
+bool Inventory::AddScenarioItem(const Item *i) {
+ if (scenarioEnd < MaxScenarioItems()) {
+ scenario[scenarioEnd] = i;
+ ++scenarioEnd;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+
void Inventory::Sort() {
std::sort(entries, entries + 96, Entry::Less);
}