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

@ -20,7 +20,7 @@ TEST_CASE("load a basic gui run but don't loop", "[gui]") {
WorldBuilder builder(game_map);
builder.generate();
const auto &config = world.get_the<MapConfig>();
auto &config = world.get_the<GameConfig>();
// configure a player as a fact of the world
Player player{world.entity()};
world.set_the<Player>(player);
@ -28,7 +28,7 @@ TEST_CASE("load a basic gui run but don't loop", "[gui]") {
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.PLAYER_TILE});
world.set<Tile>(player.entity, {config.enemies["PLAYER_TILE"]["display"]});
world.set<Inventory>(player.entity, {5});
world.set<LightSource>(player.entity, {6,1});