So far most of the bugs are solved but there's still some edge cases in the inventory dance.

This commit is contained in:
Zed A. Shaw 2025-06-22 23:54:50 -04:00
parent e0588847fa
commit 3c5021e4c9
6 changed files with 40 additions and 25 deletions

View file

@ -8,7 +8,7 @@ namespace inventory {
std::unordered_map<Slot, DinkyECS::Entity> by_slot;
std::unordered_map<DinkyECS::Entity, Slot> by_entity;
void add(const Slot &in_slot, DinkyECS::Entity ent);
bool add(const Slot &in_slot, DinkyECS::Entity ent);
Slot& get(DinkyECS::Entity ent);
DinkyECS::Entity get(const Slot& slot);
bool has(DinkyECS::Entity ent);
@ -17,5 +17,6 @@ namespace inventory {
void remove(DinkyECS::Entity ent);
void remove(const Slot& slot);
void invariant();
void dump();
};
}