Skip to content

Commit

Permalink
Use z = 0 when determining distance from camp for food/water
Browse files Browse the repository at this point in the history
No sneaky dialogue access of camps you're not allowed at
Remove isherwoods' cabin camp
  • Loading branch information
RenechCDDA committed Jun 16, 2024
1 parent 482fdba commit 7616aaa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions data/json/obsoletion_and_migration_0.I/camp_placement.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
"type": "camp_migration",
"camp_migrations": { "name": "Cody & Jay", "overmap_terrain": "isolated_house_farm_gunsmith", "faction": "isolated_artisans" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Cabin", "overmap_terrain": "cabin_isherwood", "faction": "isherwood_family" }
},
{
"type": "camp_migration",
"camp_migrations": { "name": "Isherwood Stables", "overmap_terrain": "horse_farm_isherwood_6", "faction": "isherwood_family" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"farm_isherwood_9_north": { "overmap": "farm_isherwood_9_north" },
"farm_isherwood_8_north": { "overmap": "farm_isherwood_8_north" },
"farm_isherwood_7_north": { "overmap": "farm_isherwood_7_north" },
"cabin_isherwood_north": { "overmap": "cabin_isherwood_north", "camp": "isherwood_family", "camp_name": "Cabin" },
"cabin_isherwood_north": { "overmap": "cabin_isherwood_north" },
"cabin_lake_roof_north": { "overmap": "cabin_lake_roof_north" },
"horse_farm_isherwood_1_north": { "overmap": "horse_farm_isherwood_1_north" },
"horse_farm_isherwood_2_north": { "overmap": "horse_farm_isherwood_2_north" },
Expand Down
4 changes: 4 additions & 0 deletions src/faction_camp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,10 @@ void talk_function::basecamp_mission( npc &p )
return;
}
basecamp *bcp = *temp_camp;
if( !bcp->allowed_access_by( p ) ) {
popup( _( "%s isn't under your control!" ), bcp->name );
return;
}
bcp->set_by_radio( get_avatar().dialogue_by_radio );
map &here = bcp->get_camp_map();
bcp->form_storage_zones( here, p.get_location() );
Expand Down
2 changes: 1 addition & 1 deletion src/npcmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4558,7 +4558,7 @@ bool npc::consume_food_from_camp()
Character &player_character = get_player_character();
std::optional<basecamp *> potential_bc;
for( const tripoint_abs_omt &camp_pos : player_character.camps ) {
if( rl_dist( camp_pos, global_omt_location() ) < 3 ) {
if( rl_dist( camp_pos.xy(), global_omt_location().xy() ) < 3 ) {
potential_bc = overmap_buffer.find_camp( camp_pos.xy() );
if( potential_bc ) {
break;
Expand Down

0 comments on commit 7616aaa

Please sign in to comment.