From 7c16f61dbbe7697ae4f7fbc0931074ef7a4874a3 Mon Sep 17 00:00:00 2001 From: haveric Date: Thu, 17 Feb 2022 00:05:22 -0600 Subject: [PATCH] Fix 'Reach Refugee Center' mission location and pathing over bridges (#55385) --- .../refugee_center/missiondef_free_merchants.json | 2 +- data/json/overmap/overmap_connections.json | 3 ++- src/mission_start.cpp | 12 ++++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/data/json/npcs/refugee_center/missiondef_free_merchants.json b/data/json/npcs/refugee_center/missiondef_free_merchants.json index 7bc21308ba16f..6163a185c1cca 100644 --- a/data/json/npcs/refugee_center/missiondef_free_merchants.json +++ b/data/json/npcs/refugee_center/missiondef_free_merchants.json @@ -8,6 +8,6 @@ "value": 0, "start": "reveal_refugee_center", "origins": [ "ORIGIN_COMPUTER" ], - "destination": "refctr_S3e" + "destination": "evac_center_18" } ] diff --git a/data/json/overmap/overmap_connections.json b/data/json/overmap/overmap_connections.json index e8c3a71013c96..e82ad450a6995 100644 --- a/data/json/overmap/overmap_connections.json +++ b/data/json/overmap/overmap_connections.json @@ -8,7 +8,8 @@ { "terrain": "road", "locations": [ "forest_trail" ], "basic_cost": 25 }, { "terrain": "road", "locations": [ "swamp" ], "basic_cost": 40 }, { "terrain": "road_nesw_manhole", "locations": [ ] }, - { "terrain": "bridge", "locations": [ "water" ], "basic_cost": 120 } + { "terrain": "bridge", "locations": [ "water" ], "basic_cost": 120 }, + { "terrain": "bridgehead_ground", "locations": [ "water" ], "basic_cost": 120 } ] }, { diff --git a/src/mission_start.cpp b/src/mission_start.cpp index 1db8afbf3a634..6eab95c2ca6a7 100644 --- a/src/mission_start.cpp +++ b/src/mission_start.cpp @@ -649,9 +649,9 @@ void mission_start::reveal_refugee_center( mission *miss ) t.overmap_special = overmap_special_evac_center; t.mission_pointer = miss; t.search_range = 0; - t.reveal_radius = 3; + t.reveal_radius = 1; - const cata::optional target_pos = mission_util::assign_mission_target( t ); + cata::optional target_pos = mission_util::assign_mission_target( t ); if( !target_pos ) { add_msg( _( "You don't know where the address could be…" ) ); @@ -664,6 +664,14 @@ void mission_start::reveal_refugee_center( mission *miss ) const tripoint_abs_omt dest_road = overmap_buffer.find_closest( *target_pos, "road", 3, false ); if( overmap_buffer.reveal_route( source_road, dest_road, 1, true ) ) { + //reset the mission target to the refugee center entrance and reveal path from the road + t.overmap_terrain = "evac_center_18"; + t.reveal_radius = 3; + target_pos = mission_util::assign_mission_target( t ); + const tripoint_abs_omt dest_refugee_center = overmap_buffer.find_closest( *target_pos, + "evac_center_18", 1, false ); + overmap_buffer.reveal_route( dest_road, dest_refugee_center, 1, false ); + add_msg( _( "You mark the refugee center and the road that leads to it…" ) ); } else { add_msg( _( "You mark the refugee center, but you have no idea how to get there by road…" ) );