Skip to content

Commit

Permalink
Rename ActivateEventAt to TriggerEventAt as discussed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed Apr 8, 2024
1 parent 006066c commit efe97d7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/game_interpreter_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ bool Game_Interpreter_Map::ExecuteCommand(lcf::rpg::EventCommand const& com) {
return CommandOpenLoadMenu(com);
case Cmd::ToggleAtbMode:
return CommandToggleAtbMode(com);
case static_cast <Game_Interpreter::Cmd>(2002): //Cmd::easyrpg_ActivateEvent
return CommandActivateEventAt(com);
case static_cast <Game_Interpreter::Cmd>(2002): // Cmd::EasyRpg_ActivateEvent
return CommandEasyRpgTriggerEventAt(com);
default:
return Game_Interpreter::ExecuteCommand(com);
}
Expand Down Expand Up @@ -677,7 +677,7 @@ bool Game_Interpreter_Map::CommandToggleAtbMode(lcf::rpg::EventCommand const& /*
return true;
}

bool Game_Interpreter_Map::CommandActivateEventAt(lcf::rpg::EventCommand const& com) {
bool Game_Interpreter_Map::CommandEasyRpgTriggerEventAt(lcf::rpg::EventCommand const& com) {
int x = ValueOrVariable(com.parameters[0], com.parameters[1]);
int y = ValueOrVariable(com.parameters[2], com.parameters[3]);

Expand Down
3 changes: 2 additions & 1 deletion src/game_interpreter_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class Game_Interpreter_Map : public Game_Interpreter
bool CommandOpenMainMenu(lcf::rpg::EventCommand const& com);
bool CommandOpenLoadMenu(lcf::rpg::EventCommand const& com);
bool CommandToggleAtbMode(lcf::rpg::EventCommand const& com);
bool CommandActivateEventAt(lcf::rpg::EventCommand const& com);

bool CommandEasyRpgTriggerEventAt(lcf::rpg::EventCommand const& com);

AsyncOp ContinuationShowInnStart(int indent, int choice_result, int price);

Expand Down
2 changes: 1 addition & 1 deletion src/game_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,6 @@ void Game_Player::UpdatePan() {
data()->pan_current_y -= dy;
}

bool Game_Player::ActivateEventAt(int x, int y) {
bool Game_Player::TriggerEventAt(int x, int y) {
return CheckEventTriggerThere({ lcf::rpg::EventPage::Trigger_action }, x, y, true);
}
2 changes: 1 addition & 1 deletion src/game_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Game_Player : public Game_PlayerBase {
TeleportTarget GetTeleportTarget() const;
void ResetTeleportTarget(TeleportTarget tt = {});

bool ActivateEventAt(int x, int y);
bool TriggerEventAt(int x, int y);

/**
* Sets the map, position and direction that the game player must have after the teleport is over
Expand Down

0 comments on commit efe97d7

Please sign in to comment.