Initial changes to clean up the code.
This commit is contained in:
parent
8d3ccd935d
commit
f3f875ee80
8 changed files with 21 additions and 29 deletions
|
@ -18,19 +18,7 @@ TEST_CASE("load a basic gui run but don't loop", "[gui]") {
|
|||
save::load_configs(world);
|
||||
Map game_map(40, 40);
|
||||
WorldBuilder builder(game_map);
|
||||
builder.generate_map();
|
||||
|
||||
auto &config = world.get_the<GameConfig>();
|
||||
// configure a player as a fact of the world
|
||||
Player player{world.entity()};
|
||||
world.set_the<Player>(player);
|
||||
|
||||
world.set<Position>(player.entity, {game_map.place_entity(0)});
|
||||
world.set<Motion>(player.entity, {0, 0});
|
||||
world.set<Combat>(player.entity, {100, 10});
|
||||
world.set<Tile>(player.entity, {config.enemies["PLAYER_TILE"]["display"]});
|
||||
world.set<Inventory>(player.entity, {5});
|
||||
world.set<LightSource>(player.entity, {6,1});
|
||||
builder.generate(world);
|
||||
|
||||
SpatialMap collider;
|
||||
world.set_the<SpatialMap>(collider);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue