Compare commits

...

1 Commits

Author SHA1 Message Date
Kevin Granade 6d1ae854f8 Remove legacy lab content. 2024-04-23 17:46:59 -07:00
11 changed files with 16 additions and 600 deletions
-227
View File
@@ -1,227 +0,0 @@
[
{
"//": "Cells where the player starts during a lab escape.",
"type": "mapgen",
"method": "json",
"om_terrain": [ "lab_escape_cells" ],
"weight": 100,
"object": {
"fill_ter": "t_thconc_floor",
"rows": [
"########################",
"########################",
"########################",
"########################",
"########################",
"########################",
"########################",
"########################",
"########################",
"########################",
"########################",
"########################",
"########################",
"-----------------------|",
"|x........^............|",
"|......................|",
"--Lg--Lg--Lg--Lg--Lg-..|",
"|T..|T..|T..|T..|T..|..|",
"|S.l|S.l|S.l|S.l|S.l|..|",
"|...|...|...|...|...|..|",
"|..b|..b|..b|..b|..b|..|",
"|z.b|z.b|..b|..b|..b|..|",
"|h..|h..|h..|h.z|h.z|.x|",
"-ggg|ggg|g!g|ggg|ggg-L-|"
],
"palettes": [ "lab_palette" ],
"terrain": { "^": [ "t_thconc_floor_olight" ] },
"monster": { "z": { "monster": "mon_zombie" } },
"mapping": {
"b": { "items": [ { "item": "bed", "chance": 66 } ] },
"!": { "item": [ { "item": "glass_shard", "amount": [ 25, 50 ] } ] },
"l": {
"item": [
{ "item": "bottle_plastic", "amount": [ 1, 2 ] },
{ "item": "can_food", "amount": [ 1, 2 ] },
{ "item": "steel_chunk", "amount": 1 }
]
}
}
}
},
{
"//": "South of cells where the player starts during a lab escape. Should include a monster who can break glass",
"type": "mapgen",
"method": "json",
"om_terrain": [ "lab_escape_entrance" ],
"weight": 100,
"object": {
"fill_ter": "t_thconc_floor",
"rows": [
"|......................|",
"x.....................Z|",
"----|-------|-------|++|",
"....| | |..|",
"hh..| | |..|",
"tt..| | |..|",
"hh..? | +..|",
"....| | |..|",
"hh..| | |..|",
"tt..| | |..|",
"hh..|---+---|---?---|..|",
".......................M",
".......................M",
"-----?----|..|----+----|",
" |..| |",
" |..| |",
" |..| |",
" |..| |",
" +..? |",
" |..| |",
" |..| |",
" |..| |",
" |..| |",
"-----------MM----------|"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"terrain": { "?": [ "t_concrete_wall", "t_concrete_wall", "t_door_glass_frosted_lab_c" ] },
"monster": { "Z": { "monster": "mon_zombie_brute" } },
"place_nested": [
{ "chunks": [ "lab_spawn_7x7_wall_sw" ], "x": 4, "y": 3 },
{ "chunks": [ "lab_spawn_7x7_crossdoors" ], "x": 13, "y": 3 },
{ "chunks": [ "lab_spawn_9x9" ], "x": [ 0, 1 ], "y": 14 },
{ "chunks": [ "lab_spawn_9x9_wall_nw" ], "x": 13, "y": 13 },
{ "chunks": [ "lab_border_walls_sew" ], "x": 0, "y": 0 },
{
"chunks": [ "sub_t_stairs_up" ],
"x": [ 11, 12 ],
"y": [ 20, 21 ],
"neighbors": { "above": [ "lab_stairs" ] }
}
]
}
},
{
"//": "South of cells where the player starts during a lab escape. Should include a monster who can break glass",
"type": "mapgen",
"method": "json",
"om_terrain": [ "lab_escape_entrance" ],
"weight": 100,
"object": {
"fill_ter": "t_thconc_floor",
"rows": [
"|......................|",
"xZ.....................|",
"--+--------------------|",
".......................|",
"hh.....................|",
"tt..-----------------..|",
"hh..| | |..|",
"....| | |..|",
"hh..| | |..|",
"tt..+ | +..|",
"hh..| | |..|",
"....| | |..M",
"....| | |..M",
"--+-------|--|--?----?-|",
" |TS| |",
" |..| |",
" |-W| |",
" |..| |",
" +..+ |",
" |..| |",
" |..| |",
" |..| |",
" |..| |",
"-----------MM----------|"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"terrain": { "?": [ "t_concrete_wall", "t_concrete_wall", "t_door_glass_frosted_lab_c" ] },
"monster": { "Z": { "monster": "mon_zombie_brute" } },
"place_nested": [
{ "chunks": [ "lab_spawn_7x7_wall_nw" ], "x": 4, "y": 5 },
{ "chunks": [ "lab_spawn_7x7_crossdoors" ], "x": 13, "y": 6 },
{ "chunks": [ "lab_spawn_9x9" ], "x": [ 0, 1 ], "y": 14 },
{ "chunks": [ "lab_spawn_9x9" ], "x": 14, "y": 14 },
{ "chunks": [ "lab_border_walls_sew" ], "x": 0, "y": 0 },
{
"chunks": [ "sub_t_stairs_up" ],
"x": [ 11, 12 ],
"y": [ 20, 21 ],
"neighbors": { "above": [ "lab_stairs" ] }
}
]
}
},
{
"//": "Cross floorplan which fills a quadrant with rocks when a side is empty, and possibly adds vaults.",
"type": "mapgen",
"method": "json",
"om_terrain": [ "lab_escape_entrance" ],
"weight": 100,
"object": {
"fill_ter": "t_thconc_floor",
"rows": [
"|......................|",
".......................|",
".d......-----..........|",
".dh.....ddxdd......|---|",
".d......d.h.d......|c.c|",
"..................l|c.c|",
"....Z.............l|c.c|",
"---+---|---?---|-----+-|",
" | | |",
" | | |",
" | | |",
" ? + M",
" | | M",
" | | |",
" | | |",
"---+---|---+---|---?---|",
" | | |",
" | | |",
" | | |",
" + + |",
" | | |",
" | | |",
" | | |",
"-----------MM----------|"
],
"palettes": [ "lab_palette", "lab_loot_research" ],
"terrain": { "?": [ "t_concrete_wall", "t_concrete_wall", "t_door_glass_frosted_lab_c" ] },
"monster": { "Z": { "monster": "mon_zombie_brute" } },
"place_nested": [
{ "chunks": [ "lab_spawn_7x7" ], "x": 0, "y": 8 },
{ "chunks": [ "lab_spawn_7x7_crossdoors" ], "x": 0, "y": 16 },
{ "chunks": [ "lab_spawn_7x7_crossdoors" ], "x": 8, "y": 8 },
{ "chunks": [ "lab_spawn_7x7" ], "x": 8, "y": 16 },
{ "chunks": [ "lab_spawn_7x7" ], "x": 16, "y": 8 },
{ "chunks": [ "lab_spawn_7x7_wall_nw" ], "x": 15, "y": 15 },
{ "chunks": [ "lab_border_walls_sew" ], "x": 0, "y": 0 },
{ "chunks": [ "sub_t_stairs_up" ], "x": 21, "y": 4, "neighbors": { "above": [ "lab_stairs" ] } }
]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "sub_t_stairs_up",
"object": { "rows": [ "<" ], "terrain": { "<": [ "t_stairs_up" ] }, "mapgensize": [ 1, 1 ] }
},
{
"//": "Creates border walls for a lab based on its neighboring tiles, but only south east and west.",
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "lab_border_walls_sew",
"object": {
"mapgensize": [ 24, 24 ],
"place_nested": [
{ "else_chunks": [ "sub_t_concrete_wall" ], "x": 11, "y": 23, "neighbors": { "south": [ "lab" ] } },
{ "else_chunks": [ "sub_t_concrete_wall" ], "x": 12, "y": 23, "neighbors": { "south": [ "lab" ] } },
{ "else_chunks": [ "sub_t_concrete_wall" ], "x": 23, "y": 11, "neighbors": { "east": [ "lab" ] } },
{ "else_chunks": [ "sub_t_concrete_wall" ], "x": 23, "y": 12, "neighbors": { "east": [ "lab" ] } },
{ "else_chunks": [ "lab_west_wall" ], "x": 0, "y": 0, "neighbors": { "west": [ "lab" ] } }
]
}
}
]
+6
View File
@@ -424,6 +424,12 @@
"place_vehicles": [ { "vehicle": "rolling_trash_can", "x": 0, "y": 0, "chance": 80, "status": 0 } ]
}
},
{
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "sub_t_stairs_up",
"object": { "rows": [ "<" ], "terrain": { "<": [ "t_stairs_up" ] }, "mapgensize": [ 1, 1 ] }
},
{
"type": "mapgen",
"method": "json",
@@ -807,31 +807,6 @@
"rotate": false,
"flags": [ "CLASSIC", "WILDERNESS", "UNIQUE" ]
},
{
"type": "overmap_special",
"id": "Lab",
"overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "lab_stairs" }, { "point": [ 0, -1, 0 ], "locations": [ "land", "road" ] } ],
"connections": [ { "point": [ 0, -1, 0 ], "terrain": "road", "connection": "local_road" } ],
"locations": [ "field", "forest_without_trail" ],
"city_distance": [ 10, -1 ],
"occurrences": [ 2, 100 ],
"flags": [ "LAB", "UNIQUE", "MAN_MADE" ]
},
{
"type": "overmap_special",
"id": "Lab with Anthill",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "lab_stairs" },
{ "point": [ 3, 1, 0 ], "overmap": "anthill_north" },
{ "point": [ 0, -1, 0 ], "locations": [ "land", "road" ] }
],
"connections": [ { "point": [ 0, -1, 0 ], "terrain": "road", "connection": "local_road" } ],
"locations": [ "field", "forest_without_trail" ],
"city_distance": [ 10, -1 ],
"occurrences": [ 2, 100 ],
"flags": [ "ANT", "UNIQUE", "MAN_MADE" ],
"spawns": { "group": "GROUP_ANT_SURFACE", "population": [ 1000, 2000 ], "radius": [ 10, 30 ] }
},
{
"type": "overmap_special",
"id": "Central Lab",
@@ -882,16 +857,6 @@
"flags": [ "UNIQUE", "LAB", "WILDERNESS", "MAN_MADE" ],
"rotate": false
},
{
"type": "overmap_special",
"id": "Ice Lab",
"overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "ice_lab_stairs" }, { "point": [ 0, -1, 0 ], "locations": [ "land", "road" ] } ],
"connections": [ { "point": [ 0, -1, 0 ], "terrain": "road", "connection": "local_road" } ],
"locations": [ "field", "forest_without_trail" ],
"city_distance": [ 10, -1 ],
"occurrences": [ 2, 100 ],
"flags": [ "LAB", "UNIQUE", "MAN_MADE" ]
},
{
"type": "overmap_special",
"id": "FEMA Camp",
@@ -29,45 +29,6 @@
"see_cost": 5,
"flags": [ "NO_ROTATE", "RISK_HIGH" ]
},
{
"type": "overmap_terrain",
"id": "lab_escape_cells",
"name": "science lab",
"sym": "L",
"color": "light_blue",
"see_cost": 5,
"flags": [ "NO_ROTATE" ]
},
{
"type": "overmap_terrain",
"id": "lab_escape_entrance",
"name": "science lab",
"sym": "L",
"color": "light_blue",
"spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 },
"see_cost": 5,
"flags": [ "NO_ROTATE" ]
},
{
"type": "overmap_terrain",
"id": "ants_lab",
"name": "science lab",
"sym": "L",
"color": "light_blue",
"spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 },
"see_cost": 5,
"flags": [ "NO_ROTATE", "RISK_HIGH" ]
},
{
"type": "overmap_terrain",
"id": "ants_lab_stairs",
"name": "science lab",
"sym": "L",
"color": "blue",
"see_cost": 5,
"spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 },
"flags": [ "KNOWN_DOWN", "NO_ROTATE" ]
},
{
"type": "overmap_terrain",
"id": "lab_finale",
@@ -78,46 +39,6 @@
"see_cost": 5,
"flags": [ "NO_ROTATE" ]
},
{
"type": "overmap_terrain",
"id": "ice_lab",
"name": "science lab",
"sym": "L",
"color": "light_blue",
"spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 },
"see_cost": 5,
"flags": [ "NO_ROTATE", "RISK_HIGH" ]
},
{
"type": "overmap_terrain",
"id": "ice_lab_stairs",
"name": "science lab",
"sym": "L",
"color": "blue",
"see_cost": 5,
"spawns": { "group": "GROUP_LAB", "population": [ 0, 5 ], "chance": 20 },
"flags": [ "KNOWN_DOWN", "NO_ROTATE" ]
},
{
"type": "overmap_terrain",
"id": "ice_lab_core",
"name": "science lab",
"sym": "L",
"color": "light_blue",
"spawns": { "group": "GROUP_LAB", "population": [ 0, 8 ], "chance": 30 },
"see_cost": 5,
"flags": [ "NO_ROTATE" ]
},
{
"type": "overmap_terrain",
"id": "ice_lab_finale",
"name": "science lab",
"sym": "L",
"color": "cyan",
"spawns": { "group": "GROUP_LAB", "population": [ 4, 12 ], "chance": 90 },
"see_cost": 5,
"flags": [ "NO_ROTATE" ]
},
{
"type": "overmap_terrain",
"id": "tower_lab",
-66
View File
@@ -425,72 +425,6 @@
"reveal_locale": false,
"flags": [ "CHALLENGE", "LONE_START" ]
},
{
"type": "scenario",
"id": "lab_chal",
"name": "Challenge - Lab Patient",
"points": -8,
"description": "The scientists stopped their experiments on you abruptly, leaving you behind while they evacuated before lockdown. Find a way to escape or starve to death.",
"start_name": "Locked Lab",
"professions": [ "unemployed", "mutant_patient", "mutant_volunteer" ],
"allowed_locs": [ "sloc_lab_random", "sloc_lab_escape_cells", "sloc_lab_finale", "sloc_ice_lab_stairs", "sloc_ice_lab_finale" ],
"traits": [
"ELFAEYES",
"URSINE_EYE",
"FANGS",
"SPINES",
"PLANTSKIN",
"NAILS",
"RADIOGENIC",
"PADDED_FEET",
"RAP_TALONS",
"HOOVES",
"CANINE_EARS",
"BIOLUM1",
"BIOLUM2",
"FELINE_EARS",
"TAIL_FLUFFY",
"TAIL_LONG",
"WEB_WALKER",
"WHISKERS",
"SLIT_NOSTRILS",
"TROGLO",
"WEBBED",
"BEAK",
"UNSTABLE",
"RADIOACTIVE1",
"SLIMY",
"HERBIVORE",
"CARNIVORE",
"PONDEROUS1",
"SUNLIGHT_DEPENDENT",
"COLDBLOOD",
"GROWL",
"ARM_FEATHERS",
"ARM_TENTACLES",
"LEG_TENTACLES",
"CHAOTIC",
"ALCMET",
"LIGHT_BONES",
"CHITIN",
"ELECTRORECEPTORS"
],
"requirement": "achievement_reach_lab_finale",
"reveal_locale": false,
"flags": [ "CHALLENGE", "CITY_START", "LONE_START" ]
},
{
"type": "scenario",
"id": "lab_staff",
"name": "Challenge - Lab Staff",
"points": -8,
"description": "You were deemed an essential employee and required to stay behind during the lab's evacuation. Find a way to escape or starve to death.",
"start_name": "Locked Lab",
"professions": [ "labtech", "security", "medic" ],
"allowed_locs": [ "sloc_lab_random", "sloc_lab_escape_cells", "sloc_lab_finale", "sloc_ice_lab_stairs", "sloc_ice_lab_finale" ],
"requirement": "achievement_reach_lab_finale",
"flags": [ "CHALLENGE", "CITY_START", "LONE_START" ]
},
{
"type": "scenario",
"id": "lab_cargo_staff_1",
-30
View File
@@ -400,36 +400,6 @@
"terrain": [ "island_sand", "island_forest", "island_forest_thick", "island_forest_water", "island_field" ],
"flags": [ "ALLOW_OUTSIDE" ]
},
{
"type": "start_location",
"id": "sloc_lab_escape_cells",
"name": "Experiment Cell",
"terrain": [ "lab_escape_cells" ]
},
{
"type": "start_location",
"id": "sloc_lab_random",
"name": "Science lab",
"terrain": [ "lab_stairs" ]
},
{
"type": "start_location",
"id": "sloc_lab_finale",
"name": "Bottom of a science lab",
"terrain": [ "lab_finale" ]
},
{
"type": "start_location",
"id": "sloc_ice_lab_stairs",
"name": "Frozen science lab",
"terrain": [ "ice_lab_stairs" ]
},
{
"type": "start_location",
"id": "sloc_ice_lab_finale",
"name": "Deep-frozen science lab",
"terrain": [ "ice_lab_finale" ]
},
{
"type": "start_location",
"id": "sloc_lab_concourse_area",
+1 -1
View File
@@ -19,7 +19,7 @@
"copy-from": "lab_staff",
"name": "Challenge - Anomalous Materials",
"type": "scenario",
"allowed_locs": [ "sloc_lab_finale", "sloc_ice_lab_finale" ],
"allowed_locs": [ "sloc_lab_finale" ],
"professions": [ "afs_planar_frontiersman" ],
"id": "labFreeman"
},
+2 -16
View File
@@ -139,27 +139,13 @@
"type": "scenario",
"id": "lab_chal",
"copy-from": "lab_chal",
"allowed_locs": [
"sloc_lab_random",
"sloc_lab_escape_cells",
"sloc_lab_finale",
"sloc_ice_lab_stairs",
"sloc_ice_lab_finale",
"sloc_dinolab"
]
"allowed_locs": [ "sloc_lab_random", "sloc_lab_finale", "sloc_dinolab" ]
},
{
"type": "scenario",
"id": "lab_staff",
"copy-from": "lab_staff",
"allowed_locs": [
"sloc_lab_random",
"sloc_lab_escape_cells",
"sloc_lab_finale",
"sloc_ice_lab_stairs",
"sloc_ice_lab_finale",
"sloc_dinolab"
]
"allowed_locs": [ "sloc_lab_random", "sloc_lab_finale", "sloc_dinolab" ]
},
{
"type": "scenario",
@@ -2,8 +2,6 @@
{
"type": "test_data",
"overmap_terrain_coverage_whitelist": [
"ants_lab",
"ants_lab_stairs",
"bandit_drug_lab",
"bunker_shop_b",
"bunker_shop_g",
@@ -17,9 +15,6 @@
"deserter_city_office_roof",
"deserter_city_office_roofb",
"deserter_city_park",
"ice_lab",
"ice_lab_core",
"ice_lab_finale",
"karting_0_0_0",
"karting_0_0_1",
"karting_0_0_2",
+4 -36
View File
@@ -148,10 +148,6 @@ static const oter_str_id oter_central_lab( "central_lab" );
static const oter_str_id oter_central_lab_core( "central_lab_core" );
static const oter_str_id oter_central_lab_finale( "central_lab_finale" );
static const oter_str_id oter_central_lab_stairs( "central_lab_stairs" );
static const oter_str_id oter_ice_lab( "ice_lab" );
static const oter_str_id oter_ice_lab_core( "ice_lab_core" );
static const oter_str_id oter_ice_lab_finale( "ice_lab_finale" );
static const oter_str_id oter_ice_lab_stairs( "ice_lab_stairs" );
static const oter_str_id oter_lab( "lab" );
static const oter_str_id oter_lab_core( "lab_core" );
static const oter_str_id oter_lab_finale( "lab_finale" );
@@ -5343,7 +5339,6 @@ void map::draw_lab( mapgendata &dat )
{
const oter_id &terrain_type = dat.terrain_type();
// To distinguish between types of labs
bool ice_lab = true;
bool central_lab = false;
bool tower_lab = false;
@@ -5355,25 +5350,14 @@ void map::draw_lab( mapgendata &dat )
int bw = 0;
if( terrain_type == oter_lab || terrain_type == oter_lab_stairs
|| terrain_type == oter_lab_core || terrain_type == oter_ants_lab
|| terrain_type == oter_ants_lab_stairs || terrain_type == oter_ice_lab
|| terrain_type == oter_ice_lab_stairs || terrain_type == oter_ice_lab_core
|| terrain_type == oter_lab_core
|| terrain_type == oter_central_lab || terrain_type == oter_central_lab_stairs
|| terrain_type == oter_central_lab_core || terrain_type == oter_tower_lab
|| terrain_type == oter_tower_lab_stairs ) {
ice_lab = is_ot_match( "ice_lab", terrain_type, ot_match_type::prefix );
central_lab = is_ot_match( "central_lab", terrain_type, ot_match_type::prefix );
tower_lab = is_ot_match( "tower_lab", terrain_type, ot_match_type::prefix );
if( ice_lab ) {
units::temperature_delta temperature = units::from_fahrenheit_delta( -20 + 30 * dat.zlevel() );
set_temperature_mod( p2, temperature );
set_temperature_mod( p2 + point( SEEX, 0 ), temperature );
set_temperature_mod( p2 + point( 0, SEEY ), temperature );
set_temperature_mod( p2 + point( SEEX, SEEY ), temperature );
}
// Check for adjacent sewers; used below
tw = 0;
rw = 0;
@@ -5856,11 +5840,8 @@ void map::draw_lab( mapgendata &dat )
switch( rng( 1, 7 ) ) {
// full flooding/sewage
case 1: {
if( is_ot_match( "stairs", terrain_type, ot_match_type::contains ) ||
is_ot_match( "ice", terrain_type, ot_match_type::contains ) ) {
if( is_ot_match( "stairs", terrain_type, ot_match_type::contains ) ) {
// don't flood if stairs because the floor below will not be flooded.
// don't flood if ice lab because there's no mechanic for freezing
// liquid floors.
break;
}
ter_id fluid_type = one_in( 3 ) ? ter_t_sewage : ter_t_water_sh;
@@ -5884,11 +5865,8 @@ void map::draw_lab( mapgendata &dat )
}
// minor flooding/sewage
case 2: {
if( is_ot_match( "stairs", terrain_type, ot_match_type::contains ) ||
is_ot_match( "ice", terrain_type, ot_match_type::contains ) ) {
if( is_ot_match( "stairs", terrain_type, ot_match_type::contains ) ) {
// don't flood if stairs because the floor below will not be flooded.
// don't flood if ice lab because there's no mechanic for freezing
// liquid floors.
break;
}
ter_id fluid_type = one_in( 3 ) ? ter_t_sewage : ter_t_water_sh;
@@ -6010,21 +5988,11 @@ void map::draw_lab( mapgendata &dat )
}
}
}
} else if( terrain_type == oter_lab_finale || terrain_type == oter_ice_lab_finale ||
terrain_type == oter_central_lab_finale || terrain_type == oter_tower_lab_finale ) {
} else if( terrain_type == oter_central_lab_finale || terrain_type == oter_tower_lab_finale ) {
ice_lab = is_ot_match( "ice_lab", terrain_type, ot_match_type::prefix );
central_lab = is_ot_match( "central_lab", terrain_type, ot_match_type::prefix );
tower_lab = is_ot_match( "tower_lab", terrain_type, ot_match_type::prefix );
if( ice_lab ) {
units::temperature_delta temperature_d = units::from_fahrenheit_delta( -20 + 30 * dat.zlevel() );
set_temperature_mod( p2, temperature_d );
set_temperature_mod( p2 + point( SEEX, 0 ), temperature_d );
set_temperature_mod( p2 + point( 0, SEEY ), temperature_d );
set_temperature_mod( p2 + point( SEEX, SEEY ), temperature_d );
}
tw = ( is_ot_match( "lab", dat.north(), ot_match_type::contains ) &&
!is_ot_match( "lab_subway", dat.north(), ot_match_type::contains ) ) ? 0 : 2;
rw = ( is_ot_match( "lab", dat.east(), ot_match_type::contains ) &&
+3 -105
View File
@@ -76,12 +76,8 @@ static const oter_str_id oter_field( "field" );
static const oter_str_id oter_forest( "forest" );
static const oter_str_id oter_forest_thick( "forest_thick" );
static const oter_str_id oter_forest_water( "forest_water" );
static const oter_str_id oter_ice_lab( "ice_lab" );
static const oter_str_id oter_ice_lab_core( "ice_lab_core" );
static const oter_str_id oter_lab( "lab" );
static const oter_str_id oter_lab_core( "lab_core" );
static const oter_str_id oter_lab_escape_cells( "lab_escape_cells" );
static const oter_str_id oter_lab_escape_entrance( "lab_escape_entrance" );
static const oter_str_id oter_lab_train_depot( "lab_train_depot" );
static const oter_str_id oter_open_air( "open_air" );
static const oter_str_id oter_river_c_not_ne( "river_c_not_ne" );
@@ -116,10 +112,6 @@ static const oter_type_str_id oter_type_field( "field" );
static const oter_type_str_id oter_type_forest( "forest" );
static const oter_type_str_id oter_type_forest_thick( "forest_thick" );
static const oter_type_str_id oter_type_forest_water( "forest_water" );
static const oter_type_str_id oter_type_ice_lab_core( "ice_lab_core" );
static const oter_type_str_id oter_type_ice_lab_stairs( "ice_lab_stairs" );
static const oter_type_str_id oter_type_lab_core( "lab_core" );
static const oter_type_str_id oter_type_lab_stairs( "lab_stairs" );
static const oter_type_str_id oter_type_microlab_sub_connector( "microlab_sub_connector" );
static const oter_type_str_id oter_type_railroad_bridge( "railroad_bridge" );
static const oter_type_str_id oter_type_road( "road" );
@@ -983,12 +975,6 @@ bool oter_t::is_hardcoded() const
{
// TODO: This set only exists because so does the monstrous 'if-else' statement in @ref map::draw_map(). Get rid of both.
static const std::set<std::string> hardcoded_mapgen = {
"ants_lab",
"ants_lab_stairs",
"ice_lab",
"ice_lab_stairs",
"ice_lab_core",
"ice_lab_finale",
"central_lab",
"central_lab_stairs",
"central_lab_core",
@@ -3483,7 +3469,6 @@ bool overmap::generate_sub( const int z )
std::vector<city> ant_points;
std::vector<city> goo_points;
std::vector<city> lab_points;
std::vector<city> ice_lab_points;
std::vector<city> central_lab_points;
std::vector<point_om_omt> lab_train_points;
std::vector<point_om_omt> central_lab_train_points;
@@ -3511,42 +3496,6 @@ bool overmap::generate_sub( const int z )
},
{ oter_type_slimepit_down.id(), add_goo_point },
{ oter_type_slimepit_bottom.id(), add_goo_point },
{
oter_type_lab_core.id(),
[&]( const tripoint_om_omt & p )
{
lab_points.emplace_back( p.xy(), rng( 1, 5 + z ) );
}
},
{
oter_type_lab_stairs.id(),
[&]( const tripoint_om_omt & p )
{
if( z == -1 ) {
lab_points.emplace_back( p.xy(), rng( 1, 5 + z ) );
} else {
ter_set( p, oter_lab.id() );
}
}
},
{
oter_type_ice_lab_core.id(),
[&]( const tripoint_om_omt & p )
{
ice_lab_points.emplace_back( p.xy(), rng( 1, 5 + z ) );
}
},
{
oter_type_ice_lab_stairs.id(),
[&]( const tripoint_om_omt & p )
{
if( z == -1 ) {
ice_lab_points.emplace_back( p.xy(), rng( 1, 5 + z ) );
} else {
ter_set( p, oter_ice_lab.id() );
}
}
},
{
oter_type_central_lab_core.id(),
[&]( const tripoint_om_omt & p )
@@ -3634,14 +3583,6 @@ bool overmap::generate_sub( const int z )
ter_set( tripoint_om_omt( i.pos, z ), oter_lab.id() );
}
}
for( city &i : ice_lab_points ) {
bool ice_lab = build_lab( tripoint_om_omt( i.pos, z ), i.size, &lab_train_points, "ice_",
lab_train_odds );
requires_sub |= ice_lab;
if( !ice_lab && ter( tripoint_om_omt( i.pos, z ) ) == oter_ice_lab_core ) {
ter_set( tripoint_om_omt( i.pos, z ), oter_ice_lab.id() );
}
}
for( city &i : central_lab_points ) {
bool central_lab = build_lab( tripoint_om_omt( i.pos, z ), i.size, &central_lab_train_points,
"central_", lab_train_odds );
@@ -5686,8 +5627,6 @@ bool overmap::build_lab(
const oter_id labt_stairs( labt.id().str() + "_stairs" );
const oter_id labt_core( labt.id().str() + "_core" );
const oter_id labt_finale( labt.id().str() + "_finale" );
const oter_id labt_ants( "ants_lab" );
const oter_id labt_ants_stairs( "ants_lab_stairs" );
ter_set( p, labt );
generated_lab.push_back( p );
@@ -5706,15 +5645,7 @@ bool overmap::build_lab(
if( dist <= s * 2 ) { // increase radius to compensate for sparser new algorithm
int dist_increment = s > 3 ? 3 : 2; // Determines at what distance the odds of placement decreases
if( one_in( dist / dist_increment + 1 ) ) { // odds diminish farther away from the stairs
// make an ants lab if it's a basic lab and ants were there before.
if( prefix.empty() && check_ot( "ants", ot_match_type::type, cand ) ) {
// skip over a queen's chamber.
if( ter( cand )->get_type_id() != oter_type_ants_queen ) {
ter_set( cand, labt_ants );
}
} else {
ter_set( cand, labt );
}
ter_set( cand, labt );
generated_lab.push_back( cand );
// add new candidates, don't backtrack
for( const point &offset : four_adjacent_offsets ) {
@@ -5758,13 +5689,9 @@ bool overmap::build_lab(
do {
stair = p + point( rng( -s, s ), rng( -s, s ) );
tries++;
} while( ( ter( stair ) != labt && ter( stair ) != labt_ants ) && tries < 15 );
} while( ter( stair ) != labt && tries < 15 );
if( tries < 15 ) {
if( ter( stair ) == labt_ants ) {
ter_set( stair, labt_ants_stairs );
} else {
ter_set( stair, labt_stairs );
}
ter_set( stair, labt_stairs );
numstairs++;
}
}
@@ -5815,35 +5742,6 @@ bool overmap::build_lab(
}
}
// 4th story of labs is a candidate for lab escape, as long as there's no train or finale.
if( prefix.empty() && p.z() == -4 && train_odds == 0 && numstairs > 0 ) {
tripoint_om_omt cell;
int tries = 0;
int adjacent_labs = 0;
// Find a space bordering just one lab to the south.
do {
cell = p + point( rng( -s * 1.5 - 1, s * 1.5 + 1 ), rng( -s * 1.5 - 1, s * 1.5 + 1 ) );
tries++;
adjacent_labs = 0;
for( const point &offset : four_adjacent_offsets ) {
if( is_ot_match( "lab", ter( cell + offset ), ot_match_type::contains ) &&
!is_ot_match( "lab_subway", ter( cell + offset ), ot_match_type::contains ) ) {
++adjacent_labs;
}
}
} while( tries < 50 && (
ter( cell ) == labt_stairs ||
ter( cell ) == labt_finale ||
ter( cell + point_south ) != labt ||
adjacent_labs != 1 ) );
if( tries < 50 ) {
ter_set( cell, oter_lab_escape_cells.id() );
ter_set( cell + point_south, oter_lab_escape_entrance.id() );
}
}
return numstairs > 0;
}