BROKEN: Big refactoring happening, so it compiles but game does not run and the tests fail.

This commit is contained in:
Zed A. Shaw 2025-02-08 14:03:09 -05:00
parent 96efc990c1
commit 9e91c71125
25 changed files with 128 additions and 526 deletions

View file

@ -15,15 +15,18 @@ using std::string;
using namespace components;
DinkyECS::Entity add_items(DinkyECS::World &world, GameConfig &config) {
DinkyECS::Entity add_items(DinkyECS::ComponentMap component_map, DinkyECS::World &world, GameConfig &config) {
auto sword = world.entity();
json& item_data = config.items["SWORD_RUSTY"];
world.set<InventoryItem>(sword, {item_data["inventory_count"], item_data});
components::configure(world, sword, item_data);
DinkyECS::configure(component_map, world, sword, item_data);
return sword;
}
TEST_CASE("basic inventory test", "[inventory]") {
// BUG: rewrite this
REQUIRE(true == false);
/*
DinkyECS::World world;
save::load_configs(world);
auto& config = world.get_the<GameConfig>();
@ -68,4 +71,5 @@ TEST_CASE("basic inventory test", "[inventory]") {
inventory.erase_item(0);
REQUIRE(inventory.count() == 0);
*/
}