Very simple items system to get into the inventory work.

This commit is contained in:
Zed A. Shaw 2025-01-01 13:21:01 -05:00
parent 1962b0c24e
commit 3d461bce6d
15 changed files with 94 additions and 32 deletions

View file

@ -84,16 +84,16 @@ void save::from_file(fs::path path, DinkyECS::World &world_out, Map &map_out) {
}
void save::load_configs(DinkyECS::World &world) {
Config config("./assets/config.json");
Config game("./assets/config.json");
Config enemies("./assets/enemies.json");
Config items("./assets/items.json");
Config tiles("./assets/tiles.json");
world.set_the<Config>(config);
world.set_the<MapConfig>({
enemies["PLAYER_TILE"]["display"],
enemies["UNICORN"]["display"],
world.set_the<GameConfig>({
game, enemies, items, tiles
});
auto enemy = config["enemy"];
auto enemy = game["enemy"];
world.set_the<EnemyConfig>({
enemy["HEARING_DISTANCE"]
});