Skip to content

Commit

Permalink
obsolete OM_MOVE
Browse files Browse the repository at this point in the history
  • Loading branch information
GuardianDll committed Nov 16, 2024
1 parent 4a03734 commit 7651bc9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@
},
{
"type": "effect_on_condition",
"eoc_type": "OM_MOVE",
"eoc_type": "EVENT",
"required_event": "avatar_enters_omt",
"id": "EOC_HAVE_U_BEEN_TO_MIGOS",
"condition": {
"or": [
Expand Down
3 changes: 1 addition & 2 deletions doc/EFFECT_ON_CONDITION.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ An effect_on_condition is an object allowing the combination of dialog condition
| `false_effect` | effect | The effect(s) caused if `condition` returns false upon activation. See the "Dialogue Effects" section of [NPCs](NPCs.md) for the full syntax.
| `global` | bool | If this is true, this recurring eoc will be run on the player and every npc from a global queue. Deactivate conditions will work based on the avatar. If it is false the avatar and every character will have their own copy and their own deactivated list. Defaults to false.
| `run_for_npcs` | bool | Can only be true if global is true. If false the EOC will only be run against the avatar. If true the eoc will be run against the avatar and all npcs. Defaults to false.
| `EOC_TYPE` | string | Can be one of `ACTIVATION`, `RECURRING`, `SCENARIO_SPECIFIC`, `AVATAR_DEATH`, `NPC_DEATH`, `OM_MOVE`, `PREVENT_DEATH`, `EVENT` (see details below). It defaults to `ACTIVATION` unless `recurrence` is provided in which case it defaults to `RECURRING`.
| `EOC_TYPE` | string | Can be one of `ACTIVATION`, `RECURRING`, `SCENARIO_SPECIFIC`, `AVATAR_DEATH`, `NPC_DEATH`, `PREVENT_DEATH`, `EVENT` (see details below). It defaults to `ACTIVATION` unless `recurrence` is provided in which case it defaults to `RECURRING`.

### EOC types

Expand All @@ -49,7 +49,6 @@ An effect_on_condition is an object allowing the combination of dialog condition
* `SCENARIO_SPECIFIC` - automatically invoked once on scenario start.
* `AVATAR_DEATH` - automatically invoked whenever the current avatar dies (it will be run with the avatar as `u`), if after it the player is no longer dead they will not die, if there are multiple EOCs they all be run until the player is not dead.
* `NPC_DEATH` - EOCs can only be assigned to run on the death of an npc, in which case u will be the dying npc and npc will be the killer. If after it npc is no longer dead they will not die, if there are multiple they all be run until npc is not dead.
* `OM_MOVE` - EOCs trigger when the player moves overmap tiles
* `PREVENT_DEATH` - whenever the current avatar dies it will be run with the avatar as `u`, if after it the player is no longer dead they will not die, if there are multiple they all be run until the player is not dead.
* `EVENT` - EOCs trigger when a specific event given by "required_event" takes place.

Expand Down
12 changes: 0 additions & 12 deletions src/effect_on_condition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ namespace io
case eoc_type::SCENARIO_SPECIFIC: return "SCENARIO_SPECIFIC";
case eoc_type::AVATAR_DEATH: return "AVATAR_DEATH";
case eoc_type::NPC_DEATH: return "NPC_DEATH";
case eoc_type::OM_MOVE: return "OM_MOVE";
case eoc_type::PREVENT_DEATH: return "PREVENT_DEATH";
case eoc_type::EVENT: return "EVENT";
case eoc_type::NUM_EOC_TYPES: break;
Expand Down Expand Up @@ -467,17 +466,6 @@ void effect_on_conditions::avatar_death()
}
}

void effect_on_conditions::om_move()
{
avatar &player_character = get_avatar();
dialogue d( get_talker_for( player_character ), nullptr );
for( const effect_on_condition &eoc : effect_on_conditions::get_all() ) {
if( eoc.type == eoc_type::OM_MOVE ) {
eoc.activate( d );
}
}
}

void effect_on_condition::finalize()
{
}
Expand Down
3 changes: 0 additions & 3 deletions src/effect_on_condition.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ enum eoc_type {
SCENARIO_SPECIFIC,
AVATAR_DEATH,
NPC_DEATH,
OM_MOVE,
PREVENT_DEATH,
EVENT,
NUM_EOC_TYPES
Expand Down Expand Up @@ -114,8 +113,6 @@ void write_global_eocs_to_file();
void prevent_death();
/** Run all avatar death eocs */
void avatar_death();
/** Run all OM_MOVE eocs */
void om_move();
} // namespace effect_on_conditions

template<>
Expand Down

0 comments on commit 7651bc9

Please sign in to comment.