Change from ENEMY_SPAWN to ENTITY_SPAWN since that's what it does. Closes #31
This commit is contained in:
parent
fcd1bc589c
commit
ea92dcc3c4
4 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@ namespace Events {
|
||||||
START, COMBAT, DEATH, STAIRS_UP, STAIRS_DOWN, TRAP,
|
START, COMBAT, DEATH, STAIRS_UP, STAIRS_DOWN, TRAP,
|
||||||
COMBAT_START, NO_NEIGHBORS, HP_STATUS,
|
COMBAT_START, NO_NEIGHBORS, HP_STATUS,
|
||||||
ATTACK, NEW_RITUAL,
|
ATTACK, NEW_RITUAL,
|
||||||
UPDATE_SPRITE, ENEMY_SPAWN, NOOP,
|
UPDATE_SPRITE, ENTITY_SPAWN, NOOP,
|
||||||
LOOT_ITEM, LOOT_CONTAINER,
|
LOOT_ITEM, LOOT_CONTAINER,
|
||||||
LOOT_CLOSE, LOOT_SELECT, INV_SELECT, AIM_CLICK
|
LOOT_CLOSE, LOOT_SELECT, INV_SELECT, AIM_CLICK
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace gui {
|
||||||
void DebugUI::spawn(std::string enemy_key) {
|
void DebugUI::spawn(std::string enemy_key) {
|
||||||
auto ent = $level_mgr.spawn_enemy(enemy_key);
|
auto ent = $level_mgr.spawn_enemy(enemy_key);
|
||||||
auto& level = $level_mgr.current();
|
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) {
|
void DebugUI::render(sf::RenderWindow& window) {
|
||||||
|
|
|
@ -446,7 +446,7 @@ namespace gui {
|
||||||
case eGUI::COMBAT_START:
|
case eGUI::COMBAT_START:
|
||||||
event(Event::START_COMBAT);
|
event(Event::START_COMBAT);
|
||||||
break;
|
break;
|
||||||
case eGUI::ENEMY_SPAWN:
|
case eGUI::ENTITY_SPAWN:
|
||||||
$main_ui.$rayview.update_level($level);
|
$main_ui.$rayview.update_level($level);
|
||||||
$main_ui.dirty();
|
$main_ui.dirty();
|
||||||
run_systems();
|
run_systems();
|
||||||
|
|
|
@ -515,7 +515,7 @@ bool System::drop_item(GameLevel& level, Entity item) {
|
||||||
collision.insert(pos.location, item);
|
collision.insert(pos.location, item);
|
||||||
// BUG: really there should be another system that handles loot->inv moves
|
// BUG: really there should be another system that handles loot->inv moves
|
||||||
if(player_inv.has(item)) player_inv.remove(item);
|
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);
|
level.world->not_constant(item);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue