Ritual blanket now has its own internal id but I'm sort of thinking it needs to be more like inventory::Model. Closes #47.
This commit is contained in:
parent
cad51f4908
commit
b28b76ee2d
5 changed files with 22 additions and 23 deletions
20
rituals.hpp
20
rituals.hpp
|
@ -2,10 +2,10 @@
|
|||
#include "goap.hpp"
|
||||
#include "ai.hpp"
|
||||
#include "config.hpp"
|
||||
#include "dinkyecs.hpp"
|
||||
|
||||
namespace ritual {
|
||||
using JunkItem = std::string;
|
||||
using Entity = unsigned long;
|
||||
|
||||
struct JunkPile {
|
||||
std::vector<JunkItem> contents;
|
||||
|
@ -82,17 +82,17 @@ namespace ritual {
|
|||
|
||||
struct Blanket {
|
||||
size_t entity_counter = 0;
|
||||
std::unordered_map<DinkyECS::Entity, JunkItem> contents;
|
||||
std::unordered_map<DinkyECS::Entity, bool> selected;
|
||||
std::unordered_map<Entity, JunkItem> contents;
|
||||
std::unordered_map<Entity, bool> selected;
|
||||
|
||||
DinkyECS::Entity add(JunkItem name);
|
||||
JunkItem& get(DinkyECS::Entity ent);
|
||||
bool has(DinkyECS::Entity ent);
|
||||
void remove(DinkyECS::Entity ent);
|
||||
void select(DinkyECS::Entity ent);
|
||||
void deselect(DinkyECS::Entity ent);
|
||||
Entity add(JunkItem name);
|
||||
JunkItem& get(Entity ent);
|
||||
bool has(Entity ent);
|
||||
void remove(Entity ent);
|
||||
void select(Entity ent);
|
||||
void deselect(Entity ent);
|
||||
void reset();
|
||||
bool is_selected(DinkyECS::Entity ent);
|
||||
bool is_selected(Entity ent);
|
||||
bool no_selections();
|
||||
void consume_crafting();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue