Game now builds and is using the new dynamic component loading but enemies do not spawn in and device events are really working. Also inventory is a giant bag of fail and needs a rewrite.

This commit is contained in:
Zed A. Shaw 2025-02-08 21:16:25 -05:00
parent 9e91c71125
commit a69be90464
23 changed files with 130 additions and 122 deletions

View file

@ -3,6 +3,7 @@
#include <fmt/core.h>
#include <iostream>
#include "components.hpp"
#include "inventory.hpp"
using namespace fmt;
using namespace components;
@ -12,7 +13,8 @@ inline void check_player(DinkyECS::World &world, DinkyECS::Entity entity) {
dbc::check(player.entity != entity, "player shouldn't be added to world");
auto tile = world.get<Tile>(player.entity);
dbc::check(tile.chr == "\ua66b", format("PLAYER TILE CHANGED {} != {}", tile.chr, "\ua66b"));
// dbc::check(tile.chr == "\ua66b", format("PLAYER TILE CHANGED {} != {}", tile.chr, "\ua66b"));
}
inline int make_split(Room &cur, bool horiz) {
@ -194,7 +196,7 @@ DinkyECS::Entity WorldBuilder::configure_entity_in_map(DinkyECS::World &world, j
}
if(entity_data.contains("components")) {
DinkyECS::configure($components, world, item, entity_data["components"]);
components::configure_entity($components, world, item, entity_data["components"]);
}
return item;
}