diff --git a/data/json/overmap/overmap_special/specials.json b/data/json/overmap/overmap_special/specials.json index 37276203a0c9a..14d9be906c90a 100644 --- a/data/json/overmap/overmap_special/specials.json +++ b/data/json/overmap/overmap_special/specials.json @@ -2080,7 +2080,7 @@ { "point": [ 9, 6, 0 ], "overmap": "evac_center_10_north" }, { "point": [ 5, 7, 0 ], "overmap": "evac_center_11_north" }, { "point": [ 6, 7, 0 ], "overmap": "evac_center_12_north" }, - { "point": [ 7, 7, 0 ], "overmap": "evac_center_13_north" }, + { "point": [ 7, 7, 0 ], "overmap": "evac_center_13_north", "camp": "free_merchants", "camp_name": "Refugee Center" }, { "point": [ 8, 7, 0 ], "overmap": "evac_center_14_north" }, { "point": [ 9, 7, 0 ], "overmap": "evac_center_15_north" }, { "point": [ 5, 8, 0 ], "overmap": "evac_center_16_north" }, diff --git a/src/faction.cpp b/src/faction.cpp index 7a8e691efc2d6..d3e8bf9cccdcb 100644 --- a/src/faction.cpp +++ b/src/faction.cpp @@ -1052,6 +1052,10 @@ void faction_manager::display() const continue; } basecamp *temp_camp = *p; + if( temp_camp->get_owner() != player_character.get_faction()->id ) { + // Don't display NPC camps as ours + continue; + } camps.push_back( temp_camp ); } lore.clear(); diff --git a/src/faction_camp.cpp b/src/faction_camp.cpp index 7ba4af54041c3..2d2b457121ec2 100644 --- a/src/faction_camp.cpp +++ b/src/faction_camp.cpp @@ -2169,6 +2169,10 @@ void basecamp::abandon_camp() for( npc_ptr &guy : get_npcs_assigned() ) { talk_function::stop_guard( *guy ); } + // We must send this message early, before the name is erased. + add_msg( m_info, _( "You abandon %s." ), name ); + std::set &known_camps = get_player_character().camps; + known_camps.erase( omt_pos ); overmap_buffer.remove_camp( *this ); map &here = get_map(); const tripoint sm_pos = omt_to_sm_copy( omt_pos.raw() ); @@ -2176,7 +2180,6 @@ void basecamp::abandon_camp() // We cannot use bb_pos here, because bb_pos may be {0,0,0} if you haven't examined the bulletin board on camp ever. // here.remove_submap_camp( here.getlocal( bb_pos ) ); here.remove_submap_camp( here.getlocal( ms_pos ) ); - add_msg( m_info, _( "You abandon %s." ), name ); } void basecamp::scan_pseudo_items() diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 67df7f0c45400..8c78473b912bb 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -1977,6 +1977,11 @@ void iexamine::bulletin_board( Character &you, const tripoint &examp ) std::optional bcp = overmap_buffer.find_camp( omt ); if( bcp ) { basecamp *temp_camp = *bcp; + if( temp_camp->get_owner() != get_avatar().get_faction()->id ) { + you.add_msg_if_player( _( "You don't run this camp, the board is useless to you." ) ); + return; + } + temp_camp->validate_bb_pos( here.getabs( examp ) ); temp_camp->validate_assignees(); temp_camp->validate_sort_points();