Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab more floorplans #24534

Merged
merged 5 commits into from Jul 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
237 changes: 235 additions & 2 deletions data/json/mapgen/lab/lab_floorplans.json
Expand Up @@ -337,7 +337,7 @@
"rotation": [ 0, 1 ],
"//": "Only allows 0,1 orientation so the right-side rooms stay against a north or east wall",
"rows": [
"...............|.cccccX|",
"...............|ccccc.X|",
"...............+......X|",
"...HtH...HtH...|-------|",
"..-----+-----..| |",
Expand Down Expand Up @@ -393,6 +393,159 @@
]
}
},
{
"//": "electricity malfunction",
"type": "mapgen",
"method": "json",
"om_terrain": [ "lab_4side" ],
"weight": 50,
"object": {
"fill_ter": "t_rock_floor",
"rotation": [ 0, 1 ],
"//": "Only allows 0,1 orientation so the right-side rooms stay against a north or east wall",
"rows": [
"...|...|r......|X.ccc.X|",
"...|...|r......|X.....X|",
"...|...|.......|---+---|",
"DDD|DDD|.......| |",
"...M..........l| |",
"..............l| |",
"...............+ |",
"...............| |",
"FFFHFFFFFFFFHFF| |",
"..........F....| |",
"..........F....----?---|",
"......%%..F.............",
"......xT..F.............",
"..........F....----+---|",
"..........H....| |",
"..........F....| |",
"FFFFFHFFFFFFF|-| |",
".............|r| |",
"r............+.| |",
"r............|-| |",
"--+---.......|T| |",
"c...c|.......+.|---+---|",
"c...c|.......|S|X.....X|",
"c...c|.rrr...|-|X.ccc.X|"
],
"palettes": [
"lab_palette", "lab_loot_research"
],
"furniture": {
"f": "f_null"
},
"terrain": {
"?": [ "t_concrete_wall", "t_concrete_wall", "t_door_metal_c" ],
"P": "t_generator_broken",
"%": "t_machinery_heavy",
"F": "t_chainfence_h",
"f": "t_chainfence_v",
"H": "t_chaingate_c",
"M": "t_gates_control_concrete"
},
"place_fields": [
{ "field": "fd_shock_vent", "x": 7, "y": 12 }
],
"mapping": {
"r": {
"items": [
{ "item": "hardware", "chance": 10 },
{ "item": "robots", "chance": 10 }
]
}
},
"place_nested": [
{ "chunks": [ "lab_spawn_7x7_crossdoors" ], "x": 16, "y": 3 },
{ "chunks": [ "lab_spawn_7x7_crossdoors" ], "x": 16, "y": 14 },
{ "chunks": [ "sub_f_crate_utility_room" ], "x": [0,2], "y": [0,2], "repeat": 5},
{ "chunks": [ "sub_f_crate_utility_room" ], "x": [4,6], "y": [0,2], "repeat": 5}
]
}
},
{
"//": "chemlab and conveyor belts",
"type": "mapgen",
"method": "json",
"om_terrain": [ "lab_4side" ],
"weight": 100,
"object": {
"fill_ter": "t_rock_floor",
"rotation": [ 0, 1 ],
"//": "Only allows 0,1 orientation so the right-side rooms stay against a north or east wall",
"rows": [
"..hxh........----------|",
".............| |",
"..---..---...| |",
"..c|c..c|c...| |",
"..c|c..c|c...| |",
"..---..---...+ |",
"..c|c..c|c...| |",
"..c|c..c|c...| |",
"..---..---...| |",
".............| |",
"-----------++-----?----|",
"........................",
"........................",
".%..%..%..%....----+---|",
".=..=..=..=....| |",
".=..=..=..=....| |",
".=..=..=..=....| |",
".=..=..=..=....? |",
".=..=..=..=....| |",
".=..=..=..=....| |",
".=..=..=..=...l| |",
".=..=..=..=...l|---+---|",
".%..%..%..%...l|X.....X|",
"..............l|X.ccc.X|"
],
"palettes": [
"lab_palette", "lab_loot_research"
],
"furniture": {
"f": "f_null"
},
"terrain": {
"?": [ "t_concrete_wall", "t_concrete_wall", "t_door_metal_c" ],
"=": "t_conveyor",
"%": "t_machinery_heavy",
"f": "t_chainfence_v",
"H": "t_chaingate_c",
"M": "t_gates_control_concrete"
},
"mapping": {
"c": {
"items": [
{ "item": "chem_lab", "chance": 30 }
]
}
},
"place_nested": [
{ "chunks": [ "lab_spawn_9x9_crossdoors" ], "x": 14, "y": 1 },
{ "chunks": [ "lab_spawn_7x7_crossdoors" ], "x": 16, "y": 14 },
{ "chunks": [ [ "null", 80], [ "lab_hood_windfall", 20] ], "x": 2, "y": 2}
]
}
},
{
"//": "Add mutagens to the lab hoods.",
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "lab_hood_windfall",
"object": {
"mapgensize": [ 10, 10 ],
"place_items": [
{ "item": "mut_lab", "x": 0, "y": [ 1, 2 ], "chance": 50, "repeat": [ 1, 4 ] },
{ "item": "mut_lab", "x": 2, "y": [ 1, 2 ], "chance": 50, "repeat": [ 1, 4 ] },
{ "item": "mut_lab", "x": 0, "y": [ 4, 5 ], "chance": 50, "repeat": [ 1, 4 ] },
{ "item": "mut_lab", "x": 2, "y": [ 4, 5 ], "chance": 50, "repeat": [ 1, 4 ] },
{ "item": "mut_lab", "x": 5, "y": [ 1, 2 ], "chance": 50, "repeat": [ 1, 4 ] },
{ "item": "mut_lab", "x": 7, "y": [ 1, 2 ], "chance": 50, "repeat": [ 1, 4 ] },
{ "item": "mut_lab", "x": 5, "y": [ 4, 5 ], "chance": 50, "repeat": [ 1, 4 ] },
{ "item": "mut_lab", "x": 7, "y": [ 4, 5 ], "chance": 50, "repeat": [ 1, 4 ] }
]
}
},
{
"type": "mapgen",
"method": "json",
Expand All @@ -402,7 +555,7 @@
"rotation": [ 0, 3 ],
"fill_ter": "t_rock_floor",
"rows": [
".......................l",
"........................",
".......................l",
"....----?-------+----..l",
"hh..| | |..l",
Expand Down Expand Up @@ -941,5 +1094,85 @@
{ "monster": "mon_zombie", "x": [1, 22], "y": [1, 22], "chance": 50, "pack_size": [1, 3] }
]
}
},
{
"//": "Apartments",
"type": "mapgen",
"method": "json",
"om_terrain": [ "lab_4side" ],
"weight": 100,
"object": {
"rotation": [ 0, 1 ],
"fill_ter": "t_rock_floor",
"rows": [
"BB|FFFt.|`````|.tFFF|BB|",
"..+...F.w`````w.F...+..|",
"TS|...F.+`````+.F...|ST|",
"--|V..F.w`hth`w.F..V|--|",
"rr--|...-w---w-...|--rr|",
"-+|s|...CSC|CSC...|s|+-|",
"....|.....C|C.....|....|",
".t..+.....O|O.....+...t|",
"bb..|hh...f|f...hh|..bb|",
"bb.]|tt...C|C...tt|].bb|",
"--------+-----+--------|",
"........................",
"........................",
"--------+-----+--------|",
"bb.]|tt...C|C...tt|].bb|",
"bb..|hh...f|f...hh|..bb|",
".t..+.....O|O.....+...t|",
"....|.....C|C.....|....|",
"-+|s|...CSC|CSC...|s|+-|",
"rr--|...-w---w-...|--rr|",
"--|V..F.w`hth`w.F..V|--|",
"TS|...F.+`````+.F...|ST|",
"..+...F.w`````w.F...+..|",
"BB|FFFt.|`````|.tFFF|BB|"
],
"palettes": [
"lab_palette", "lab_loot_home_office"
],
"furniture": {
"F": "f_sofa",
"B": "f_bathtub",
"C": "f_counter",
"O": "f_oven",
"V": "f_table"
},
"terrain": {
"w": "t_window_domestic",
"`": "t_grass",
"+": "t_door_c"
},
"mapping": {
"t": {
"items": [ { "item": "livingroom", "chance": 20 } ]
},
"F": {
"items": [ { "item": "livingroom", "chance": 5 } ]
},
"f": {
"items": [ { "item": "fridge", "chance": 80 } ]
},
"C": {
"items": [ { "item": "kitchen", "chance": 40 } ]
},
"O": {
"items": [ { "item": "oven", "chance": 70 } ]
},
"r": {
"items": [
{ "item": "dresser", "chance": 20 },
{ "item": "cleaning", "chance": 40 },
{ "item": "home_hw", "chance": 10 },
{ "item": "cannedfood", "chance": 30 }
]
},
"V": {
"item": [ { "item": "television"} ]
}
}
}
}
]
34 changes: 34 additions & 0 deletions data/json/mapgen/lab/lab_rooms.json
Expand Up @@ -824,6 +824,40 @@
]
}
},
{
"//": "gym",
"type": "mapgen",
"method": "json",
"nested_mapgen_id": "lab_room_9x9",
"object": {
"mapgensize": [ 9, 9 ],
"rotation": [0, 3],
"rows": [
".........",
".5.....L.",
"...l|l...",
"...l|l...",
".5..|..L.",
"....|l...",
"```.|l...",
"```....L.",
"```......"
],
"palettes": [
"lab_palette"
],
"furniture": {
"L": "f_treadmill",
"5": [ "f_ergometer", "f_exercise"],
"`": "f_canvas_floor"
},
"items": {
".": { "item": "clutter_gym", "chance": 3 },
"l": { "item": "locker_gym", "chance": 30 },
"`": { "item": "boxing_misc", "chance": 5 }
}
}
},
{
"//": "kitchen and dining area",
"type": "mapgen",
Expand Down
5 changes: 3 additions & 2 deletions src/mapgen.cpp
Expand Up @@ -2995,8 +2995,9 @@ ___DEEE|.R.|...,,...|sss\n",

// If the map template hasn't handled borders, handle them in code. Rotated maps cannot handle
// borders and have to be caught in code. We determine if a border isn't handled by checking
// the east-facing border space where the door normally is -- it should not be a floor.
if( ter(tripoint(23, 11, abs_sub.z)) == t_rock_floor ) {
// the east-facing border space where the door normally is -- it should be a wall or door.
tripoint east_border(23, 11, abs_sub.z);
if( !has_flag_ter( "WALL", east_border ) && !has_flag_ter( "DOOR", east_border ) ) {
// TODO: create a ter_reset function that does ter_set, furn_set, and i_clear?
for( int i = 0; i <= 23; i++ ) {
ter_set( 23, i, t_concrete_wall );
Expand Down