BROKEN: Big refactoring happening, so it compiles but game does not run and the tests fail.
This commit is contained in:
parent
96efc990c1
commit
9e91c71125
25 changed files with 128 additions and 526 deletions
|
@ -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);
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue