Skip to content

Commit 8a6deb3

Browse files
committed
Fix map extra spawning in Backrooms
The id used by the terrain was incorrect, but more importantly, map extras were checked against the 'default' region, not the default region. Change the id for the map extra collection to match that used by the terrains, and check the default region, not the region with the id default for map extras.
1 parent 64366e8 commit 8a6deb3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

data/mods/Backrooms/region_settings/region_settings/regional_map_settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
{
1515
"type": "map_extra_collection",
16-
"id": "backrooms_backrooms",
16+
"id": "backrooms",
1717
"chance": 30,
1818
"extras": [
1919
[ "mx_teleporter_node", 5000 ],
@@ -41,7 +41,7 @@
4141
"type": "region_settings_map_extras",
4242
"id": "default_backrooms",
4343
"copy-from": "default",
44-
"extras": [ "backrooms_backrooms" ]
44+
"extras": [ "backrooms" ]
4545
},
4646
{
4747
"type": "region_terrain_furniture",

src/mapgen.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,8 +917,7 @@ void map::generate( const tripoint_abs_omt &p, const time_point &when, bool save
917917

918918
if( any_missing || !save_results ) {
919919
const region_settings_map_extras settings_mx =
920-
region_settings_default->get_settings_map_extras();
921-
// At some point, we should add region information so we can grab the appropriate extras
920+
region_settings_id( get_option<std::string>( "DEFAULT_REGION" ) )->get_settings_map_extras();
922921
auto mx_iter = settings_mx.extras.find( map_extra_collection_id( terrain_type->get_extras() ) );
923922
if( mx_iter != settings_mx.extras.end() ) {
924923
const map_extra_collection &this_ex = **mx_iter;

0 commit comments

Comments
 (0)