Basic inventory system working and can pick up items but needs to be reflected in the UI next.
This commit is contained in:
parent
d7353a02df
commit
135d9a128b
14 changed files with 212 additions and 48 deletions
4
save.cpp
4
save.cpp
|
@ -30,7 +30,7 @@ void save::to_file(fs::path path, DinkyECS::World &world, Map &map) {
|
|||
extract<Combat>(world, save_data.combat);
|
||||
extract<Motion>(world, save_data.motion);
|
||||
extract<Tile>(world, save_data.tile);
|
||||
extract<Inventory>(world, save_data.inventory);
|
||||
// extract<Inventory>(world, save_data.inventory);
|
||||
|
||||
archive.save(save_data);
|
||||
std::string_view archive_view = archive.get_buffer();
|
||||
|
@ -72,7 +72,7 @@ void save::from_file(fs::path path, DinkyECS::World &world_out, Map &map_out) {
|
|||
inject<Combat>(world_out, save_data.combat);
|
||||
inject<Motion>(world_out, save_data.motion);
|
||||
inject<Tile>(world_out, save_data.tile);
|
||||
inject<Inventory>(world_out, save_data.inventory);
|
||||
// inject<Inventory>(world_out, save_data.inventory);
|
||||
|
||||
size_t width = save_data.map.width;
|
||||
size_t height = save_data.map.height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue