Skip to content

Commit

Permalink
Merge branch 'killorank/mapgen_guarantees' of github.com:killorank2/C…
Browse files Browse the repository at this point in the history
…ataclysm-BN into killorank/mapgen_guarantees
  • Loading branch information
Najones19746 committed Jan 18, 2025
2 parents f6d1722 + 07c9711 commit 6999f14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion data/json/test_regions.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"police": 1,
"s_lot": 6
},
"finales": {"Military Outpost": 200 }
"finales": { "Military Outpost": 200 }
},
"weather": {
"spring_temp": 16,
Expand Down
18 changes: 6 additions & 12 deletions src/overmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4783,11 +4783,11 @@ bool overmap::place_building( const tripoint_om_omt &p, om_direction::type dir,

if( can_place_special( *building_tid, building_pos, building_dir, false ) ) {
place_special( *building_tid, building_pos, building_dir, town, false, false );
return(true);
return( true );
break;
}
}
return(false);
return( false );
}
//city passed by reference as it's modified by the function, which calls itself recursively
void overmap::build_city_street(
Expand Down Expand Up @@ -4859,12 +4859,9 @@ void overmap::build_city_street(

if( attempt_finale_place && !town.finale_placed ) {
//attempt to place a finale, confirm that it was placed.
if ( place_building( rp, om_direction::turn_left( dir ), town, true ) )
{
if( place_building( rp, om_direction::turn_left( dir ), town, true ) ) {
town.finale_placed = true;
}
else // if the finale fails to place stop trying. This prevents the finale getting placed at the edge of town.
{
} else { // if the finale fails to place stop trying. This prevents the finale getting placed at the edge of town.
attempt_finale_place = false;
}
} else {
Expand All @@ -4875,12 +4872,9 @@ void overmap::build_city_street(

if( attempt_finale_place && !town.finale_placed ) {
//attempt to place a finale, confirm that it was placed.
if ( place_building( rp, om_direction::turn_left( dir ), town, true ) )
{
if( place_building( rp, om_direction::turn_left( dir ), town, true ) ) {
town.finale_placed = true;
}
else // if the finale fails to place stop trying. This prevents the finale getting placed at the edge of town.
{
} else { // if the finale fails to place stop trying. This prevents the finale getting placed at the edge of town.
attempt_finale_place = false;
}
} else {
Expand Down

0 comments on commit 6999f14

Please sign in to comment.