Change from ENEMY_SPAWN to ENTITY_SPAWN since that's what it does. Closes #31

master
Zed A. Shaw 2 days ago
parent fcd1bc589c
commit ea92dcc3c4
  1. 2
      events.hpp
  2. 2
      gui/debug_ui.cpp
  3. 2
      gui/fsm.cpp
  4. 2
      systems.cpp

@ -5,7 +5,7 @@ namespace Events {
START, COMBAT, DEATH, STAIRS_UP, STAIRS_DOWN, TRAP,
COMBAT_START, NO_NEIGHBORS, HP_STATUS,
ATTACK, NEW_RITUAL,
UPDATE_SPRITE, ENEMY_SPAWN, NOOP,
UPDATE_SPRITE, ENTITY_SPAWN, NOOP,
LOOT_ITEM, LOOT_CONTAINER,
LOOT_CLOSE, LOOT_SELECT, INV_SELECT, AIM_CLICK
};

@ -42,7 +42,7 @@ namespace gui {
void DebugUI::spawn(std::string enemy_key) {
auto ent = $level_mgr.spawn_enemy(enemy_key);
auto& level = $level_mgr.current();
level.world->send<Events::GUI>(Events::GUI::ENEMY_SPAWN, ent, {});
level.world->send<Events::GUI>(Events::GUI::ENTITY_SPAWN, ent, {});
}
void DebugUI::render(sf::RenderWindow& window) {

@ -446,7 +446,7 @@ namespace gui {
case eGUI::COMBAT_START:
event(Event::START_COMBAT);
break;
case eGUI::ENEMY_SPAWN:
case eGUI::ENTITY_SPAWN:
$main_ui.$rayview.update_level($level);
$main_ui.dirty();
run_systems();

@ -515,7 +515,7 @@ bool System::drop_item(GameLevel& level, Entity item) {
collision.insert(pos.location, item);
// BUG: really there should be another system that handles loot->inv moves
if(player_inv.has(item)) player_inv.remove(item);
level.world->send<Events::GUI>(Events::GUI::ENEMY_SPAWN, item, {});
level.world->send<Events::GUI>(Events::GUI::ENTITY_SPAWN, item, {});
level.world->not_constant(item);
return true;
}

Loading…
Cancel
Save