Skip to content

Commit

Permalink
Fix EOC_Nunez_Travel's mapgen_updates searches
Browse files Browse the repository at this point in the history
  • Loading branch information
Procyonae committed Nov 7, 2024
1 parent 582f33f commit e3e324d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,17 @@
"speaker_effect": {
"effect": [
{ "finish_mission": "MISSION_TACOMA_Nunez", "success": true },
{ "math": [ "nunez_travel_timer", "=", "time_since('cataclysm', 'unit': 'days') + 2" ] },
{ "math": [ "nunez_travel_stage", "=", "1" ] }
{ "npc_location_variable": { "context_val": "refcenter_nunez_departure" } },
{ "math": [ "_travel_time", "=", "time_since('cataclysm', 'unit': 'days') + 2" ] },
{
"run_eocs": [ "EOC_Nunez_Travel" ],
"time_in_future": { "context_val": "travel_time" },
"variables": {
"refcenter_nunez_departure": { "context_val": "refcenter_nunez_departure" },
"tacoma_nunez_trailer_arrive": { "u_val": "tacoma_nunez_trailer_arrive" }
}
},
{ "u_lose_var": "tacoma_nunez_trailer_arrive" }
]
}
},
Expand Down
3 changes: 2 additions & 1 deletion data/json/npcs/tacoma_ranch/NPC_ranch_foreman.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
{ "u_has_mission": "MISSION_TACOMA_Nunez" },
{ "compare_string": [ "phase_1", { "u_val": "recruit_general_Nunez_Tacoma" } ] }
]
}
},
"effect": { "u_location_variable": { "u_val": "tacoma_nunez_trailer_arrive" } }
},
{
"text": "Hey, are you looking for workers here?",
Expand Down
21 changes: 10 additions & 11 deletions data/json/npcs/tacoma_ranch/Nunez/Arrival_code.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
{
"id": "EOC_Nunez_Travel",
"type": "effect_on_condition",
"recurrence": 1000,
"condition": {
"and": [
{ "math": [ "nunez_travel_stage", "==", "1" ] },
{ "math": [ "nunez_travel_timer", "<", "time_since('cataclysm', 'unit': 'days')" ] }
]
},
"deactivate_condition": { "math": [ "nunez_travel_stage", "==", "2" ] },
"effect": [
{ "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] },
{ "mapgen_update": "tacoma_nunez_trailer_arrive", "om_terrain": "ranch_camp_55" },
{ "mapgen_update": "refcenter_nunez_departure", "om_terrain": "evac_center_7" },
{ "math": [ "nunez_travel_stage", "++" ] }
{
"mapgen_update": "tacoma_nunez_trailer_arrive",
"om_terrain": "ranch_camp_55",
"target_var": { "context_val": "tacoma_nunez_trailer_arrive" }
},
{
"mapgen_update": "refcenter_nunez_departure",
"om_terrain": "evac_center_7",
"target_var": { "context_val": "refcenter_nunez_departure" }
}
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion doc/MAPGEN.md
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ update_mapgen updates an existing overmap tile. These fields provide a way to s
### "assign_mission_target"

assign_mission_target assigns an overmap tile as the target of a mission. Any update_mapgen in the same scope will
update that overmap tile. The closet overmap terrain with the required terrain ID will be used, and if there is no
update that overmap tile. The closest overmap terrain with the required terrain ID will be used, and if there is no
matching terrain, an overmap special of om_special type will be created and then the om_terrain within that special will
be used.

Expand Down

0 comments on commit e3e324d

Please sign in to comment.