Sprite is now a component we can place on anything to render it.

This commit is contained in:
Zed A. Shaw 2025-02-10 12:58:24 -05:00
parent 9c37960283
commit 6bca6d021e
8 changed files with 50 additions and 26 deletions

View file

@ -234,6 +234,8 @@ void WorldBuilder::randomize_entities(DinkyECS::World &world, GameConfig &config
int rand_entity = Random::uniform<int>(0, keys.size() - 1);
std::string key = keys[rand_entity];
// BUG: this may crash if PLAYER_TILE isn't first
if(key == "PLAYER_TITLE") key = keys[rand_entity + 1];
auto entity_data = entity_db[key];
// pass that to the config as it'll be a generic json