diff --git a/data/json/mapgen/sewage_treatment.json b/data/json/mapgen/sewage_treatment.json new file mode 100644 index 0000000000000..1c36bfb05acc7 --- /dev/null +++ b/data/json/mapgen/sewage_treatment.json @@ -0,0 +1,597 @@ +[ + { + "type": "palette", + "id": "sewage_treatment_palette", + "terrain": { + " ": [ "t_dirt", "t_grass" ], + "?": "t_shrub", + ")": "t_water_pool_shallow", + ".": "t_pavement", + "_": "t_sidewalk", + "p": "t_pavement_y", + "|": "t_chainfence", + "C": "t_chaingate_l", + "~": "t_sewage", + "!": "t_metal_railing", + "@": "t_grate", + "w": "t_water_pool", + "A": "t_dirt", + "1": "t_sewage_pipe", + "&": "t_sewage_pump", + "0": "t_manhole_cover", + "O": "t_thconc_floor", + "H": "t_sconc_wall", + "z": "t_concrete", + "9": "t_gutter_downspout", + "-": "t_wall_metal", + "W": "t_window_no_curtains", + "t": "t_thconc_floor", + "m": "t_metal_floor", + "b": "t_door_metal_pickable", + "e": "t_door_metal_locked", + "D": "t_door_glass_c", + "6": "t_console_broken", + "+": "t_door_c", + ",": "t_floor", + "M": "t_metal_floor", + "<": "t_ladder_up", + ">": "t_stairs_down", + "%": "t_machinery_heavy", + "$": "t_machinery_light", + "{": "t_thconc_floor", + "R": "t_thconc_floor", + "J": "t_current_trans", + "U": "t_sai_box", + "G": "t_generator_broken", + "F": "t_potential_trans", + "7": "t_metal_floor", + "4": "t_metal_floor", + "g": "t_metal_floor", + "Y": "t_switchgear_s" + } + }, + { + "type": "palette", + "id": "sewage_treatment_sewer_palette", + "terrain": { + "c": "t_thconc_floor", + "l": "t_thconc_floor", + "L": "t_thconc_floor", + "n": "t_thconc_floor", + "{": "t_thconc_floor", + "f": "t_thconc_floor", + ";": "t_thconc_floor", + "q": "t_thconc_floor", + "r": "t_thconc_floor", + "w": "t_thconc_floor", + "t": "t_thconc_floor", + "0": "t_thconc_floor", + "[": "t_thconc_floor", + "I": "t_thconc_floor", + "h": "t_thconc_floor", + "D": "t_thconc_floor", + "1": "t_thconc_floor", + "=": "t_rock_floor", + ">": "t_stairs_up", + "!": "t_bars", + "~": "t_sewage", + "`": "t_sewage", + "%": "t_rock", + ".": "t_thconc_floor", + "^": "t_ladder_up", + "*": "t_door_bar_locked", + "x": "t_bridge", + "#": "t_grate", + "b": "t_door_metal_pickable", + "H": "t_sconc_wall", + "2": "t_sewage_pipe", + "U": "t_sai_box", + "G": "t_generator_broken", + "Y": "t_switchgear_s", + "&": "t_sewage_pump", + "-": "t_wall_glass", + "A": "t_railing_h", + "a": "t_railing_v", + "|": "t_chainfence", + "C": "t_chaingate_l", + "$": "t_machinery_light", + "@": "t_machinery_heavy", + "v": "t_machinery_old", + "+": "t_door_c", + "6": "t_console_broken" + } + }, + { + "id": "treatment_chemicals", + "type": "item_group", + "items": [ + { "item": "bleach", "container-item": "55gal_drum", "charges-min": 10, "charges-max": 126, "chance": 50 }, + { + "item": "chem_sulphuric_acid", + "container-item": "55gal_drum", + "charges-min": 2, + "charges-max": 50, + "chance": 20 + }, + { + "item": "material_quicklime", + "container-item": "55gal_drum", + "charges-min": 2, + "charges-max": 50, + "chance": 20 + }, + { "item": "55gal_drum", "chance": 50 } + ] + }, + { + "id": "sewage_samples", + "type": "item_group", + "items": [ + { "item": "sewage", "container-item": "flask_glass", "charges": 1, "chance": 50 }, + { "item": "water", "container-item": "flask_glass", "charges": 1, "chance": 50 }, + { "item": "water_clean", "container-item": "flask_glass", "charges": 1, "chance": 30 }, + { "item": "slime_scrap", "container-item": "flask_glass", "charges": 1, "chance": 10 } + ] + }, + { + "type": "monstergroup", + "name": "GROUP_SEWAGE_TREATMENT", + "default": "mon_sewer_rat", + "is_animal": true, + "monsters": [ + { "monster": "mon_sewer_fish", "freq": 300, "cost_multiplier": 0, "pack_size": [ 2, 6 ] }, + { "monster": "mon_sewer_snake", "freq": 240, "cost_multiplier": 0 }, + { "monster": "mon_sewer_rat", "freq": 100, "cost_multiplier": 0, "pack_size": [ 3, 6 ] }, + { "monster": "mon_albino_penguin", "freq": 5, "cost_multiplier": 5, "pack_size": [ 3, 9 ] }, + { "monster": "mon_gator", "freq": 40, "cost_multiplier": 2, "pack_size": [ 1, 2 ] } + ] + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ [ "sewage_treatment_0_0_0", "sewage_treatment_1_0_0" ], [ "sewage_treatment_0_1_0", "sewage_treatment_1_1_0" ] ], + "weight": 250, + "object": { + "fill_ter": "t_floor", + "rows": [ + "|||_.......pp......._|||||||||||||||||||||||||||", + "| _................_ ? ? ? ??? ? ? 9 |", + "| _.......pp......._ HHWHWHHHWHWWWHWHHHWHH |", + "| _................_ ? H^,6#,H,d,,,,,d,H^d,H |", + "| _.......pp......._____W,,d,,H#6,,#,,6#H,6#W?|", + "| _................_ _D,,,,,D,,,666,,,+,d,H |", + "|___................___ H^[[,^H,,,,,,,,,H,,,W?|", + "|.....................__ HHHH+HHqr*,,,[[qH[[[H |", + "|.....................__?W##,,fHHHHHDHHHHHHHHH |", + "|.....................__ Hdd,,cH,,,,,,,,,8HtH |", + "|......p......p.......__ HH+HH+H,,HH+HH+HbHHHH |", + "|.....................__ Hl,Hl,H,,Hx,Hx,Hm74%H |", + "|......p......p.......__ Hl,Hl,H,,H,,H,,HmmmgH |", + "|.....................__ Hl,Hl,H,,HrTHrTHmmm{H |", + "||||||||||||||||||||||CC|HHHHHHH++HHHHHHH{mm{H |", + "|zzzzzzzzzzzzzzzzzz __ AAA __ H{mm{H |", + "|zwwwwwwwwm)))))))z __ __ ? ? ?H{mm{H |", + "|zwwwwwwwwm)))))))z __ __ H{mm{H |", + "|zzzzzzzzzzzzzzzzzz____________________ HmmMMH |", + "|zwwwwwwwwmwwwwwwwz __________________bmmMMH |", + "|zwwwwwwwwmwwwwwwwz __ HHHHHH |", + "|zzzzzzzzzzzzzzzzzz111111111111 __ |", + "||||||C|||||||||||||1|||||||||||||| __ |", + "| zzzzzzz 1111111111 ______OOO |", + "| zzwwwwwzz 1HHHHHHH1 ? ? HHHHHHHH __ --b--- |", + "|zzwwwwwwwzz1H11&%RH0 HJJFUYYH __ -&m$&- |", + "|zwwwwwwwwwz H1ttttH ? ? WgttttgW __ -%mm%- |", + "|zwwwwwwwwwz H|||C|H H6ttttGH __ W&mm&W |", + "|zwww!!!wwwz _ ? ? |||CC||| __ -Mmm%- |", + "|zwww!@!wwwz OO _ __ __ -Rmm&- |", + "|zwww!@!wwwz OO _ _________________bmmm%W |", + "|zzww!@!wwzz____________________________-&%$&- |", + "| zzw!@!wzz_____________ __ --W--- |", + "| zzzzzzz_________ __ O |", + "| zzzzzzz____zzzzzzz zzzzzzzzzzzzzzzzzz 1 |", + "| zz)))))zz__zzw!@!wzz z~~~~zz~~~~zz~~~~z 1 |", + "|zz)))))))zzzzww!@!wwzz z~~~~zz~~~~zz~~~~z 1 |", + "|z)))))))))zzwww!@!wwwz z~~~~zz~~~~zz~~~~z 11|", + "|z))))!!!!!zzwww!@!wwwz z~~~~zz~~~~zz~~~~z $1|", + "|z))))!@@@@zzwww!!!wwwz z~~~~zz~~~~zz~~~~z111|", + "|z))))!!!!!zzwwwwwwwwwz z~~~~zz~~~~zz~~~~z 1 |", + "|z)))))))))zzwwwwwwwwwz z~~~~zz~~~~zz~~~~z11 |", + "|zz)))))))zzzzwwwwwwwzz z~~~~zz~~~~zz~~~~z 1 |", + "| zz)))))zz zzwwwwwzz z~~~~zz~~~~zz~~~~z11 |", + "| zzzzzzz zzzzzzz zzzzzzzzzzzzzzzzzz |", + "||||||||||||||||||||||||||||||||||||||||||||||||" + ], + "palettes": [ "sewage_treatment_palette" ], + "furniture": { + "#": "f_chair", + "x": "f_sink", + "4": "f_heavy_lathe", + "7": "f_drill_press", + "*": "f_shredder", + "[": "f_glass_cabinet", + "^": "f_indoor_plant", + "A": "f_dumpster", + "c": "f_counter", + "R": "f_rack", + "d": "f_desk", + "f": "f_fridge", + "g": "f_workbench", + "q": "f_indoor_plant_y", + "l": "f_locker", + "r": "f_trashcan", + "{": "f_utility_shelf", + "O": "f_standing_tank" + }, + "place_signs": [ + { "signage": "Authorized personnel only", "x": 21, "y": 1 }, + { "signage": " sewage treatment plant", "x": 2, "y": 1 } + ], + "place_liquids": [ + { "liquid": "sewage", "chance": 1, "amount": [ 2, 3 ], "x": [ 43, 45 ], "y": 25, "repeat": [ 1, 3 ] }, + { "liquid": "water", "chance": 1, "amount": [ 40, 60 ], "x": [ 13, 14 ], "y": [ 31, 32 ], "repeat": [ 2, 4 ] } + ], + "items": { + "g": { "item": "supplies_hardware", "chance": 40 }, + "R": { "item": "tools_plumbing", "chance": 60 }, + "M": { "item": "treatment_chemicals", "chance": 80 }, + "A": { "item": "trash", "chance": 80 }, + "{": [ { "item": "sewage_plant", "chance": 30 }, { "item": "supplies_plumbing", "chance": 20 } ], + "f": { "item": "fridgesnacks", "chance": 70, "repeat": [ 1, 3 ] }, + "c": { "item": "office_breakroom", "chance": 60, "repeat": [ 1, 2 ] }, + "l": { "item": "clothing_work_set", "chance": 40 }, + "d": { "item": "office", "chance": 60 }, + "a": { "item": "trash", "chance": 30, "repeat": [ 1, 3 ] }, + "r": { "item": "trash", "chance": 30 }, + "[": { "item": "office_mess", "chance": 50, "repeat": [ 1, 3 ] } + }, + "computers": { + "8": { + "name": "EnviroCom OS v2.03 - Basement Access", + "security": 1, + "options": [ { "name": "Unlock stairs", "action": "open" } ], + "failures": [ { "action": "shutdown" }, { "action": "alarm" } ] + } + }, + "toilets": { "T": { } }, + "place_vehicles": [ + { "vehicle": "pump_station_vehicles", "x": 5, "y": 13, "rotation": 90, "chance": 40 }, + { "vehicle": "pump_station_vehicles", "x": 11, "y": 13, "rotation": 90, "chance": 40 }, + { "vehicle": "pump_station_vehicles", "x": 19, "y": 13, "rotation": 90, "chance": 40 } + ], + "place_monsters": [ + { "monster": "GROUP_ZOMBIE", "x": [ 33, 40 ], "y": [ 3, 11 ], "density": 0.2 }, + { "monster": "GROUP_ZOMBIE", "x": [ 25, 44 ], "y": [ 32, 36 ], "density": 0.2 } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ + [ "sewage_treatment_0_0_roof", "sewage_treatment_1_0_roof" ], + [ "sewage_treatment_0_1_roof", "sewage_treatment_1_1_roof" ] + ], + "object": { + "fill_ter": "t_flat_roof", + "rows": [ + " ", + " ", + " |22222222222222222225 ", + " |...................3 ", + " |................XX.3 ", + " |................XX.3 ", + " |...................3 ", + " |...................3 ", + " |.................HHH ", + " |.................B>H ", + " |.................HHH ", + " |...................3 ", + " |...................3 ", + " |...................3 ", + " |...................3 ", + " |...................3 ", + " |--------------|....3 ", + " |....3 ", + " |....3 ", + " |....3 ", + " |....3 ", + " |....3 ", + " |----3 ", + " ", + " ", + " ", + " ........ ...... ", + " ....... ........ ...... ", + " ....... ........ ...... ", + " ....... ........ ...... ", + " ....... ........ ...... ", + " ...... ", + " ...... ", + " ...... ", + " ...... ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + ], + "palettes": [ "roof_palette" ], + "terrain": { ">": "t_ladder_down", "X": "t_radio_tower", "H": "t_sconc_wall", "B": "t_door_metal_pickable" }, + "place_nested": [ + { + "chunks": [ [ "null", 20 ], [ "roof_4x4_utility", 50 ], [ "roof_4x4_utility_1", 40 ] ], + "x": [ 29, 36 ], + "y": [ 5, 10 ] + } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ + [ "sewage_treatment_0_0_-1", "sewage_treatment_1_0_-1", "sewage_treatment_2_0_-1" ], + [ "sewage_treatment_0_1_-1", "sewage_treatment_1_1_-1", "sewage_treatment_2_1_-1" ] + ], + "weight": 250, + "object": { + "fill_ter": "t_rock_floor", + "rows": [ + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%", + "%%%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%%%%", + "%%%%~###########################~~~~~~~~###########################~%%%%", + "%%%%~#222222222HHHbHHHH%%%%%%%%#%%AAAA%%#%%%%%HHHHbHHH222222222222#~%%%%", + "%%%%~#2%%%%%%%22&....UH%%%%%%%%##xxxxxx##%%%%%HU....&22%%%%%%%%%%2#~%%%%", + "%%%%~#2%%%%%%%%H$&$&@&H%%HHHHHHHHHHHHHHHHHHH%%H&@&$&$H%%%%%%%%%%%2#~%%%%", + "%%%%~#2%%%%%%%%HHHHHHHH%%H0001[.IHD6[[D61.IH%%HHHHHHHH%%%%%%%%%%%2#~%%%%", + "%%%%~#22%%%%%%%%%%%%%%%%%H0c....fH.c...c..fHHHHHLH%%%%%%%%%%%%%%22#~%%%%", + "%%%%`##2%%%%%%%%%%%%%%%%%Hh......+.........+...+.H%%%%%%%%%%%%%%2##`%%%%", + "%%%%!%#2%%%%%%%HHHH%%%%%%H0c....fH.c...c..fHH..HLH%%%%%%%%%%%%%%2#%!%%%%", + "~~~~~~x2~~~~%%%HL.H%%%%%%H0001[.IHD6[[D61.IHH..HHHHHHHHHHH%%~~~~2x~~~~~~", + "~~~~~~x2~~~~~%%HH+HHHHHHHHHHHHHHHHHHHHHHHHHH>..+..&TTT&wwH%~~~~~2x~~~~~~", + "~~~~~~x2~~~~~%%H...............................H........wH%~~~~~2x~~~~~~", + "~~~~~~xx~~~~%%%H...............................H&...8...&H%%~~~~xx~~~~~~", + "%%%%%~#2%%%%%%%HH+HHHH+HHH..HHHHHHHHHHHHHHHHH..H$#######$H%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%Hn..lHn..lH..H%%HIf6666;fH%%%H..H@...@...@H%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%HH+HHHH+HHH..HHHH........HHHHH..H#...#...#H%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%Hq..qHq..qH.....+........+......H$&$&@&$&$H%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%Hq..qHq..qH..HHHHc......cHHHHH..HHHHHHHHHHH%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%HHHHHHHHHHH..H%%H6tttttt6H%%%H..H%%%%%%%%%%%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%%%%%%%%%%%H..H%%H--------H%%%H..H%%%%%%%%%%%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%%%%%%%%%%%H..H%%#vvvvvvvv2%%%H..H%%%%%%%%%%%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%%%%%%%%%%%H..H%%#a~~~~~~~2%%%H..H%%%%%%%%%%%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%%%%%%%%%%%H..H%%#a~~~~~~~2%%%HbbH%%%%%%%%%%%%%%%%2#~%%%%%", + "%%%%%~#2%%%%%%%%HHHHHHHHHH..HHHbH~~~~~~%22222..2%%%%%%%%%%%%%%%%2#~%%%%%", + "%%%%%~#2%%%HHHHHHww.............b##~~~%%%%%%%..22%%%%%%%%%%%%%%%2#~%%%%%", + "%%%%%~#2%%%H{{{{Hw...HHHHHHHHHHHH!*!!!%%%%%%%...22222222222222222#`%%%%%", + "%%%%%`#2%%%H....C...^H%%%%%%%%~~~`````~~~~%%%....................#!%%%%%", + "%%%%%!#2%%%H{{{{H....H%%%%%%%~~~~~~~~~~~~~~%%%.%%%%%%%%%%%%%%{{%%~~%%%%%", + "%%%%~~##%%%HHHHHHHHbHH%%%%%%~~~~~~~~~~~~~~~~%%b%%%%%%%%%%%%%%%%%~~~~%%%%", + "%%%~~~~############x~~~~~~~~~~~~~~~~~~~~~~~~~~x~~~~~~~~~~~~~~~~~~~~~~%%%", + "%%%~~~~~~~~~~~~~~~~x~~~~~~~~~~~~~~~~~~~~~~~~~~x~~~~~~~~~~~~~~~~~~~~~~%%%", + "%%%%~~~~%%%%%%%%%%HbH%%%%%%%~~~~~~~~~~~~~~~~%HbH%%%%%%%%%%%%%%%%~~~~%%%%", + "%%%%%%%%HHHHHHHHHHH.HHHH%%%%%~~~~~~~~~~~~~~%%H.HHHHHHHHHHHHHHHHH%%%%%%%%", + "%%%%%%%%HGGG.|YYYYY...UH%%%%%%~~~~~~~~~~~~%%%H.HH2$&$&$&$&$&$&$H%%%%%%%%", + "%%%%%%%%HGGG.C........UH%%%%%%%%%%%~~%%%%%%%%H.HH2.............H%%%%%%%%", + "%%%%%%%%HGGG.|........UH%%%%%%%%%%%~~%%%%%%%%H.HH2..@#@..@#@..@H%%%%%%%%", + "%%%%%%%%HHHHHHr.......UHHHHHHHHHHHH~~HHHHHHHHH.HH2..@#@..@#@..@H%%%%%%%%", + "%%%%%%%%%%%%%H2.2.................bxxb.........................H%%%%%%%%", + "%%%%%%%%%%%%%H22222222222222222222H!*H222222222222..@#@..@#@..@H%%%%%%%%", + "%%%%%%%%%%%%%HHHHHHHHHHHHHHHHHHHHHH``HHHHHHHHHHHH2..@#@..@#@..@H%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~%%%%%%%%%%%H2.............H%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~%%%%%%%%%%%H2..2#2..2#2..2H%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~%%%%%%%%%%H22222222222222H%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~%%%%%%%%%%HHHHHHHHHHHHHHHH%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%!~~~~~~~~~~~~~~~~~~~~~~~!%%%%%%%%%%%%%%%%%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" + ], + "palettes": [ "sewage_treatment_sewer_palette" ], + "furniture": { + "c": "f_chair", + "l": "f_locker", + "L": "f_locker", + "n": "f_sink", + "{": "f_utility_shelf", + "r": "f_rack", + "f": "f_air_filter", + ";": "f_server", + "q": "f_shower", + "w": "f_workbench", + "t": "f_table", + "D": "f_desk", + "T": "f_counter", + "0": "f_lab_bench", + "[": "f_glass_cabinet", + "I": "f_air_conditioner", + "h": "f_fume_hood", + "1": "f_trashcan" + }, + "items": { + "q": { "item": "shower", "chance": 40 }, + "l": [ { "item": "clothing_work_set", "chance": 40 }, { "item": "shower", "chance": 50 } ], + "L": { "item": "cleaning", "chance": 80, "repeat": [ 1, 2 ] }, + "{": [ { "item": "sewage_plant", "chance": 50 }, { "item": "supplies_plumbing", "chance": 30 } ], + "r": { "item": "tools_electronics", "chance": 40, "repeat": [ 1, 3 ] }, + "w": { "item": "supplies_hardware", "chance": 50 }, + "`": [ { "item": "sewer", "chance": 20 }, { "item": "trash_forest", "chance": 10 }, { "item": "trash", "chance": 10 } ], + "0": [ { "item": "tools_science", "chance": 50 }, { "item": "sewage_samples", "chance": 20 } ], + "h": { "item": "chem_home", "chance": 50, "repeat": [ 1, 3 ] }, + "D": { "item": "office_mess", "chance": 40 }, + "t": { "item": "electronics", "chance": 30 }, + "[": [ { "item": "office_mess", "chance": 30 }, { "item": "sewage_samples", "chance": 10 } ], + "1": { "item": "trash", "chance": 50 } + }, + "place_loot": [ + { "group": "sewage_plant", "x": [ 17, 20 ], "y": 4, "chance": 70 }, + { "group": "sewage_plant", "x": [ 48, 51 ], "y": 4, "chance": 70 }, + { "group": "treatment_chemicals", "x": [ 49, 55 ], "y": [ 13, 16 ], "chance": 90, "repeat": [ 1, 3 ] }, + { "group": "treatment_chemicals", "x": [ 50, 61 ], "y": [ 35, 42 ], "chance": 50, "repeat": [ 1, 3 ] }, + { "group": "sewage_plant", "x": [ 50, 61 ], "y": [ 35, 42 ], "chance": 70, "repeat": [ 1, 3 ] } + ], + "computers": { + "8": { + "name": "EnviroCom OS v2.03", + "security": 1, + "options": [ { "name": "Download Sewer Maps", "action": "map_sewer" }, { "name": "Divert sample", "action": "sample" } ], + "failures": [ { "action": "shutdown" }, { "action": "alarm" } ] + } + }, + "place_monsters": [ + { "monster": "GROUP_ZOMBIE", "x": [ 26, 36 ], "y": [ 12, 18 ], "density": 0.35 }, + { "monster": "GROUP_ZOMBIE", "x": [ 16, 20 ], "y": [ 36, 38 ], "density": 0.1 }, + { "monster": "GROUP_SEWAGE_TREATMENT", "x": 36, "y": 3, "density": 0.2 }, + { "monster": "GROUP_SEWAGE_TREATMENT", "x": [ 30, 32 ], "y": [ 35, 36 ], "density": 0.2 } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ "sewage_treatment_0_1_-1" ], + "//": "10% chance of a hidden CHUD lair", + "weight": 25, + "object": { + "fill_ter": "t_rock_floor", + "rows": [ + "%%%%%~#2%%%%%%%%HHHHHHHH", + "%%%%%~#2%%%HHHHHHww.....", + "%%%%%~#2%%%H{{{{Hw...HHH", + "%%%%%~#2%%%H....C...^H%%", + "%%%%%~#2%%%H{{{{H....H%%", + "%%%%~~##%%%HHHHHHHHbHH%%", + "%%%~~~~############x~~~~", + "%%%~~~~~~~~~~~~~~~~x~~~~", + "%%%%~~~~%%%%%%%%%%HbH%%%", + "%%%%%%%%HHHHHHHHHHH.HHHH", + "%%%%%%%%HGGG.|YYYYY...UH", + "%%%%%%%%HGGG.C........UH", + "%%%%%%%%HGGG.|........UH", + "%%%%%%%%HHHHHHr.......UH", + "%%%%%%%%%%%%%H2.2.......", + "%%====%%%%%%%H2222222222", + "%%%======%%%%HHHHHHHHHHH", + "%%%=======%%%%%%%%%%%%%%", + "%%%=======%%%%%%%%%%%%%%", + "%%========%%%%%%%%%%%%%%", + "%%%==%%=%%%%%%%%%%%%%%%%", + "%%%%%%!~~~~~~~~~~~~~~~~~", + "%%%%%%%%%%%%%%%%%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%%" + ], + "palettes": [ "sewage_treatment_sewer_palette" ], + "furniture": { "{": "f_utility_shelf", "r": "f_rack", "w": "f_workbench" }, + "items": { + "{": [ { "item": "sewage_plant", "chance": 30 }, { "item": "supplies_plumbing", "chance": 20 } ], + "w": { "item": "supplies_hardware", "chance": 50 }, + "=": [ { "item": "cannibal_corpse", "chance": 15 }, { "item": "human_remains", "chance": 15 } ], + "r": { "item": "tools_electronics", "chance": 30, "repeat": [ 1, 3 ] } + }, + "fields": { "=": { "field": "fd_blood", "intensity": 1, "age": 990, "chance": 40 } }, + "place_monsters": [ + { "monster": "GROUP_ZOMBIE", "x": [ 16, 20 ], "y": [ 11, 14 ], "density": 0.1 }, + { "monster": "GROUP_CHUD", "x": [ 4, 6 ], "y": [ 16, 18 ], "density": 0.2 } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ "sewage_treatment_0_1_-1" ], + "//": "Easter egg - TMNT reference", + "weight": 1, + "object": { + "fill_ter": "t_rock_floor", + "rows": [ + "%%%%%~#2%%%%%%%%HHHHHHHH", + "%%%%%~#2%%%HHHHHHww.....", + "%%%%%~#2%%%H{{{{Hw...HHH", + "%%%%%~#2%%%H....C...^H%%", + "%%%%%~#2%%%H{{{{H....H%%", + "%%%%~~##%%%HHHHHHHHbHH%%", + "%%%~~~~############x~~~~", + "%%%~~~~~~~~~~~~~~~~x~~~~", + "%%%%~~~~%%%%%%%%%%HbH%%%", + "%%%%%%%%HHHHHHHHHHH.HHHH", + "%%%%%%%%HGGG.|YYYYY...UH", + "%.III.%%HGGG.C........UH", + "%.III.%%HGGG.|........UH", + "%.III.%%HHHHHHr.......UH", + "%%%O%%%%%%%%%H2.2.......", + "%t...%Q..D%%%H2222222222", + "%....O.::.%%%HHHHHHHHHHH", + "%LL;.%.::1%%%%%%%%%%%%%%", + "%%%%O%.::.O..[%%%%%%%%%%", + "%f0..%1...%D.[%%%%%%%%%%", + "%.c..%%*%%%%%%%%%%%%%%%%", + "%ctc.%!~~~~~~~~~~~~~~~~~", + "%.c..%%%%%%%%%%%%%%%%%%%", + "%%%%%%%%%%%%%%%%%%%%%%%%" + ], + "palettes": [ "sewage_treatment_sewer_palette" ], + "terrain": { "O": "t_mdoor_lab_frame", ":": "t_carpet_yellow", "Q": "t_privacy_fence" }, + "furniture": { + "{": "f_utility_shelf", + "w": "f_workbench", + "r": "f_rack", + "I": "f_tatami", + "c": "f_chair", + "l": "f_locker", + "n": "f_sink", + "f": "f_fridge", + "t": "f_table", + "[": "f_bed", + "L": "f_sofa", + "1": "f_armchair", + ";": "f_floor_lamp", + "0": "f_oven", + "D": "f_bookcase" + }, + "items": { + "{": [ { "item": "sewage_plant", "chance": 30 }, { "item": "supplies_plumbing", "chance": 20 } ], + "w": { "item": "supplies_hardware", "chance": 50 }, + "r": { "item": "tools_electronics", "chance": 30, "repeat": [ 1, 3 ] }, + "D": { "item": "dojo_manuals", "chance": 60, "repeat": [ 1, 2 ] }, + "[": { "item": "bed", "chance": 60 }, + "f": { "item": "fridgesnacks", "chance": 80, "repeat": [ 1, 2 ] } + }, + "place_loot": [ + { "item": "katana", "x": 2, "y": 11, "amount": 2 }, + { "item": "q_staff", "x": 3, "y": 12 }, + { "item": "television", "x": 1, "y": 15 }, + { "item": "judo_belt_orange", "x": 3, "y": 13 }, + { "item": "judo_belt_blue", "x": 4, "y": 13 }, + { "item": "pizza_cheese", "x": 2, "y": 21 } + ], + "place_monsters": [ { "monster": "GROUP_ZOMBIE", "x": [ 16, 20 ], "y": [ 11, 14 ], "density": 0.1 } ] + } + }, + { + "id": "cannibal_corpse", + "type": "item_group", + "subtype": "collection", + "items": [ { "group": "clothing_work_set", "chance": 40 }, { "group": "supplies_plumbing", "chance": 20 }, { "item": "corpse" } ] + }, + { + "id": "human_remains", + "type": "item_group", + "subtype": "collection", + "items": [ + { "item": "human_flesh", "chance": 70, "count-min": 1, "count-max": 10 }, + { "item": "hstomach_large", "chance": 60 }, + { "item": "hstomach", "chance": 60 }, + { "item": "bone_human", "prob": 90, "count-min": 1, "count-max": 5 }, + { "item": "rag_bloody", "prob": 90, "count-min": 1, "count-max": 4 } + ] + } +] diff --git a/data/json/obsolete_terrains.json b/data/json/obsolete_terrains.json index e16a6b6ecb234..92f7922e98a0b 100644 --- a/data/json/obsolete_terrains.json +++ b/data/json/obsolete_terrains.json @@ -261,6 +261,9 @@ "orchard_tree_apple", "orchard_stall", "orchard_processing", + "sewage_treatment", + "sewage_treatment_hub", + "sewage_treatment_under", "dairy_farm_NW", "dairy_farm_NE", "dairy_farm_SW", diff --git a/data/json/overmap/overmap_special/specials.json b/data/json/overmap/overmap_special/specials.json index e22cc31730153..e9bff855f60f5 100644 --- a/data/json/overmap/overmap_special/specials.json +++ b/data/json/overmap/overmap_special/specials.json @@ -153,30 +153,32 @@ "id": "Sewage Treatment Plant", "overmaps": [ { "point": [ 0, -1, 0 ], "overmap": "road_end_north" }, - { "point": [ 0, 0, 0 ], "overmap": "s_lot" }, - { "point": [ 0, 1, 0 ], "overmap": "sewage_treatment" }, - { "point": [ 0, 1, -1 ], "overmap": "sewage_treatment_hub" }, - { "point": [ 0, 0, -1 ], "overmap": "sewage_treatment_under" }, - { "point": [ -1, 0, -1 ], "overmap": "sewage_treatment_under" }, - { "point": [ 1, 0, -1 ], "overmap": "sewage_treatment_under" }, - { "point": [ -1, 1, -1 ], "overmap": "sewage_treatment_under" }, - { "point": [ 1, 1, -1 ], "overmap": "sewage_treatment_under" }, - { "point": [ -1, 2, -1 ], "overmap": "sewage_treatment_under" }, - { "point": [ 0, 2, -1 ], "overmap": "sewage_treatment_under" }, - { "point": [ 1, 2, -1 ], "overmap": "sewage_treatment_under" } + { "point": [ 0, 0, 0 ], "overmap": "sewage_treatment_0_0_0_north" }, + { "point": [ 0, 0, 1 ], "overmap": "sewage_treatment_0_0_roof_north" }, + { "point": [ 1, 0, 0 ], "overmap": "sewage_treatment_1_0_0_north" }, + { "point": [ 1, 0, 1 ], "overmap": "sewage_treatment_1_0_roof_north" }, + { "point": [ 0, 1, 0 ], "overmap": "sewage_treatment_0_1_0_north" }, + { "point": [ 0, 1, 1 ], "overmap": "sewage_treatment_0_1_roof_north" }, + { "point": [ 1, 1, 0 ], "overmap": "sewage_treatment_1_1_0_north" }, + { "point": [ 1, 1, 1 ], "overmap": "sewage_treatment_1_1_roof_north" }, + { "point": [ 0, 0, -1 ], "overmap": "sewage_treatment_0_0_-1_north" }, + { "point": [ 1, 0, -1 ], "overmap": "sewage_treatment_1_0_-1_north" }, + { "point": [ 2, 0, -1 ], "overmap": "sewage_treatment_2_0_-1_north" }, + { "point": [ 0, 1, -1 ], "overmap": "sewage_treatment_0_1_-1_north" }, + { "point": [ 1, 1, -1 ], "overmap": "sewage_treatment_1_1_-1_north" }, + { "point": [ 2, 1, -1 ], "overmap": "sewage_treatment_2_1_-1_north" } ], + "locations": [ "land" ], "connections": [ - { "point": [ 0, -1, 0 ] }, - { "point": [ 0, -1, -1 ], "terrain": "sewer", "connection": "sewer_tunnel", "from": [ 0, 0, -1 ] }, - { "point": [ 2, 1, -1 ], "terrain": "sewer", "connection": "sewer_tunnel", "from": [ 1, 1, -1 ] }, - { "point": [ 0, 3, -1 ], "terrain": "sewer", "connection": "sewer_tunnel", "from": [ 0, 2, -1 ] }, - { "point": [ -2, 1, -1 ], "terrain": "sewer", "connection": "sewer_tunnel", "from": [ -1, 1, -1 ] } + { "point": [ 0, -2, 0 ], "terrain": "road", "connection": "local_road", "from": [ 0, -1, 0 ] }, + { "point": [ -1, 0, -1 ], "terrain": "sewer", "connection": "sewer_tunnel", "from": [ 0, 0, -1 ] }, + { "point": [ 1, -1, -1 ], "terrain": "sewer", "connection": "sewer_tunnel", "from": [ 1, 0, -1 ] }, + { "point": [ 3, 0, -1 ], "terrain": "sewer", "connection": "sewer_tunnel", "from": [ 2, 0, -1 ] }, + { "point": [ 1, 2, -1 ], "terrain": "sewer", "connection": "sewer_tunnel", "from": [ 1, 1, -1 ] } ], - "locations": [ "land" ], "city_distance": [ 10, 20 ], "city_sizes": [ 4, 12 ], "occurrences": [ 0, 4 ], - "rotate": false, "flags": [ "CLASSIC" ] }, { diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_waste_junk.json b/data/json/overmap/overmap_terrain/overmap_terrain_waste_junk.json index cf22e7af95310..e6aa754827fdc 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_waste_junk.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_waste_junk.json @@ -1,31 +1,95 @@ [ { "type": "overmap_terrain", - "id": "sewage_treatment", - "name": "sewage treatment", + "id": "sewage_treatment_0_0_0", + "name": "sewage treatment plant", "sym": "P", "color": "red", "see_cost": 5, - "flags": [ "KNOWN_DOWN", "NO_ROTATE" ] + "flags": [ "KNOWN_DOWN" ] + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_0_0_roof", + "name": "open air", + "sym": ".", + "color": "blue", + "see_cost": 5 }, { "type": "overmap_terrain", - "id": "sewage_treatment_hub", - "name": "sewage treatment", + "id": "sewage_treatment_1_0_0", + "copy-from": "sewage_treatment_0_0_0" + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_1_0_roof", + "name": "sewage treatment plant roof", "sym": "P", - "color": "green", + "color": "red", + "see_cost": 5 + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_0_1_0", + "name": "sewage treatment plant", + "sym": "O", + "color": "blue", "see_cost": 5, - "extras": "build", - "flags": [ "KNOWN_UP", "NO_ROTATE" ] + "flags": [ "KNOWN_DOWN" ] + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_0_1_roof", + "name": "sewage treatment plant roof", + "sym": "O", + "color": "blue", + "see_cost": 5 + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_1_1_0", + "copy-from": "sewage_treatment_0_0_0" + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_1_1_roof", + "copy-from": "sewage_treatment_1_0_roof" }, { "type": "overmap_terrain", - "id": "sewage_treatment_under", - "name": "sewage treatment", + "id": "sewage_treatment_0_0_-1", + "name": "sewage treatment plant - underground", "sym": "P", "color": "green", "see_cost": 5, - "flags": [ "NO_ROTATE" ] + "extras": "build", + "flags": [ "KNOWN_UP" ] + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_1_0_-1", + "copy-from": "sewage_treatment_0_0_-1" + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_2_0_-1", + "copy-from": "sewage_treatment_0_0_-1" + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_0_1_-1", + "copy-from": "sewage_treatment_0_0_-1" + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_1_1_-1", + "copy-from": "sewage_treatment_0_0_-1" + }, + { + "type": "overmap_terrain", + "id": "sewage_treatment_2_1_-1", + "copy-from": "sewage_treatment_0_0_-1" }, { "type": "overmap_terrain", diff --git a/src/map.h b/src/map.h index 81ff1cdc813a8..b87d9f8e89894 100644 --- a/src/map.h +++ b/src/map.h @@ -1430,8 +1430,6 @@ class map float density ); void draw_temple( const oter_id &terrain_type, mapgendata &dat, const time_point &when, float density ); - void draw_sewer( const oter_id &terrain_type, mapgendata &dat, const time_point &when, - float density ); void draw_mine( const oter_id &terrain_type, mapgendata &dat, const time_point &when, float density ); void draw_spiral( const oter_id &terrain_type, mapgendata &dat, const time_point &when, diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 3db4ebff11d77..8bee8f2b922ca 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -2700,8 +2700,6 @@ void map::draw_map( const oter_id &terrain_type, const oter_id &t_north, const o draw_triffid( terrain_type, dat, when, density ); } else if( is_ot_match( "office", terrain_type, ot_match_type::prefix ) ) { draw_office_tower( terrain_type, dat, when, density ); - } else if( is_ot_match( "sewage", terrain_type, ot_match_type::prefix ) ) { - draw_sewer( terrain_type, dat, when, density ); } else if( is_ot_match( "spider", terrain_type, ot_match_type::prefix ) ) { draw_spider_pit( terrain_type, dat, when, density ); } else if( is_ot_match( "spiral", terrain_type, ot_match_type::prefix ) ) { @@ -4662,268 +4660,6 @@ void map::draw_temple( const oter_id &terrain_type, mapgendata &dat, const time_ } } -void map::draw_sewer( const oter_id &terrain_type, mapgendata &dat, const time_point &/*when*/, - const float /*density*/ ) -{ - computer *tmpcomp = nullptr; - - if( terrain_type == "sewage_treatment" ) { - fill_background( this, t_floor ); // Set all to floor - line( this, t_wall, 0, 0, 23, 0 ); // Top wall - line( this, t_window, 1, 0, 6, 0 ); // Its windows - line( this, t_wall, 0, 23, 23, 23 ); // Bottom wall - line( this, t_wall, 1, 5, 6, 5 ); // Interior wall (front office) - line( this, t_wall, 1, 14, 6, 14 ); // Interior wall (equipment) - line( this, t_wall, 1, 20, 7, 20 ); // Interior wall (stairs) - line( this, t_wall, 14, 15, 22, 15 ); // Interior wall (tank) - line( this, t_wall, 0, 1, 0, 22 ); // Left wall - line( this, t_wall, 23, 1, 23, 22 ); // Right wall - line( this, t_wall, 7, 1, 7, 5 ); // Interior wall (front office) - line( this, t_wall, 7, 14, 7, 19 ); // Interior wall (stairs) - line( this, t_wall, 4, 15, 4, 19 ); // Interior wall (mid-stairs) - line( this, t_wall, 14, 15, 14, 20 ); // Interior wall (tank) - line( this, t_wall_glass, 7, 6, 7, 13 ); // Interior glass (equipment) - line( this, t_wall_glass, 8, 20, 13, 20 ); // Interior glass (flow) - line_furn( this, f_counter, 1, 3, 3, 3 ); // Desk (front office); - line_furn( this, f_counter, 1, 6, 1, 13 ); // Counter (equipment); - // Central tanks: - square( this, t_sewage, 10, 3, 13, 6 ); - square( this, t_sewage, 17, 3, 20, 6 ); - square( this, t_sewage, 10, 10, 13, 13 ); - square( this, t_sewage, 17, 10, 20, 13 ); - // Drainage tank - square( this, t_sewage, 16, 16, 21, 18 ); - square( this, t_grate, 18, 16, 19, 17 ); - line( this, t_sewage, 17, 19, 20, 19 ); - line( this, t_sewage, 18, 20, 19, 20 ); - line( this, t_sewage, 2, 21, 19, 21 ); - line( this, t_sewage, 2, 22, 19, 22 ); - // Pipes and pumps - line( this, t_sewage_pipe, 1, 15, 1, 19 ); - line( this, t_sewage_pump, 1, 21, 1, 22 ); - // Stairs down - ter_set( point( 2, 15 ), t_stairs_down ); - // Now place doors - ter_set( point( rng( 2, 5 ), 0 ), t_door_c ); - ter_set( point( rng( 3, 5 ), 5 ), t_door_c ); - ter_set( point( 5, 14 ), t_door_c ); - ter_set( point( 7, rng( 15, 17 ) ), t_door_c ); - ter_set( point( 14, rng( 17, 19 ) ), t_door_c ); - if( one_in( 3 ) ) { // back door - ter_set( point( 23, rng( 19, 22 ) ), t_door_locked ); - } - ter_set( point( 4, 19 ), t_door_metal_locked ); - ter_set( point( 2, 19 ), t_console ); - ter_set( point( 6, 19 ), t_console ); - // Computers to unlock stair room, and items - tmpcomp = add_computer( tripoint( 2, 19, abs_sub.z ), _( "EnviroCom OS v2.03" ), 1 ); - tmpcomp->add_option( _( "Unlock stairs" ), COMPACT_OPEN, 0 ); - tmpcomp->add_failure( COMPFAIL_SHUTDOWN ); - - tmpcomp = add_computer( tripoint( 6, 19, abs_sub.z ), _( "EnviroCom OS v2.03" ), 1 ); - tmpcomp->add_option( _( "Unlock stairs" ), COMPACT_OPEN, 0 ); - tmpcomp->add_failure( COMPFAIL_SHUTDOWN ); - place_items( "sewage_plant", 80, point( 1, 6 ), point( 1, 13 ), false, 0 ); - - } else if( terrain_type == "sewage_treatment_hub" ) { - // Stairs up, center of 3x3 of treatment_below - - fill_background( this, t_rock_floor ); - // Top & left walls; right & bottom are handled by adjacent terrain - line( this, t_wall, 0, 0, 23, 0 ); - line( this, t_wall, 0, 1, 0, 23 ); - // Top-left room - line( this, t_wall, 8, 1, 8, 8 ); - line( this, t_wall, 1, 9, 9, 9 ); - line( this, t_wall_glass, rng( 1, 3 ), 9, rng( 4, 7 ), 9 ); - ter_set( point( 2, 15 ), t_stairs_up ); - ter_set( point( 8, 8 ), t_door_c ); - ter_set( point( 3, 0 ), t_door_c ); - - // Bottom-left room - stairs and equipment - line( this, t_wall, 1, 14, 8, 14 ); - line( this, t_wall_glass, rng( 1, 3 ), 14, rng( 5, 8 ), 14 ); - line( this, t_wall, 9, 14, 9, 23 ); - line( this, t_wall_glass, 9, 16, 9, 19 ); - square_furn( this, f_counter, 5, 16, 6, 20 ); - place_items( "sewage_plant", 80, point( 5, 16 ), point( 6, 20 ), false, 0 ); - ter_set( point( 0, 20 ), t_door_c ); - ter_set( point( 9, 20 ), t_door_c ); - - // Bottom-right room - line( this, t_wall, 14, 19, 14, 23 ); - line( this, t_wall, 14, 18, 19, 18 ); - line( this, t_wall, 21, 14, 23, 14 ); - ter_set( point( 14, 18 ), t_wall ); - ter_set( point( 14, 20 ), t_door_c ); - ter_set( point( 15, 18 ), t_door_c ); - line( this, t_wall, 20, 15, 20, 18 ); - - // Tanks and their content - for( int i = 9; i <= 16; i += 7 ) { - for( int j = 2; j <= 9; j += 7 ) { - square( this, t_rock, i, j, i + 5, j + 5 ); - square( this, t_sewage, i + 1, j + 1, i + 4, j + 4 ); - } - } - square( this, t_rock, 16, 15, 19, 17 ); // Wall around sewage from above - square( this, t_rock, 10, 15, 14, 17 ); // Extra walls for southward flow - // Flow in from north, east, and west always connects to the corresponding tank - square( this, t_sewage, 10, 0, 13, 2 ); // North -> NE tank - square( this, t_sewage, 21, 10, 23, 13 ); // East -> SE tank - square( this, t_sewage, 0, 10, 9, 13 ); // West -> SW tank - // Flow from south may go to SW tank or SE tank - square( this, t_sewage, 10, 16, 13, 23 ); - if( one_in( 2 ) ) { // To SW tank - square( this, t_sewage, 10, 14, 13, 17 ); - // Then, flow from above may be either to flow from south, to SE tank, or both - switch( rng( 1, 5 ) ) { - case 1: - case 2: // To flow from south - square( this, t_sewage, 14, 16, 19, 17 ); - line( this, t_bridge, 15, 16, 15, 17 ); - if( !one_in( 4 ) ) { - line( this, t_wall_glass, 16, 18, 19, 18 ); // Viewing window - } - break; - case 3: - case 4: // To SE tank - square( this, t_sewage, 18, 14, 19, 17 ); - if( !one_in( 4 ) ) { - line( this, t_wall_glass, 20, 15, 20, 17 ); // Viewing window - } - break; - case 5: // Both! - square( this, t_sewage, 14, 16, 19, 17 ); - square( this, t_sewage, 18, 14, 19, 17 ); - line( this, t_bridge, 15, 16, 15, 17 ); - if( !one_in( 4 ) ) { - line( this, t_wall_glass, 16, 18, 19, 18 ); // Viewing window - } - if( !one_in( 4 ) ) { - line( this, t_wall_glass, 20, 15, 20, 17 ); // Viewing window - } - break; - } - } else { // To SE tank, via flow from above - square( this, t_sewage, 14, 16, 19, 17 ); - square( this, t_sewage, 18, 14, 19, 17 ); - line( this, t_bridge, 15, 16, 15, 17 ); - if( !one_in( 4 ) ) { - line( this, t_wall_glass, 16, 18, 19, 18 ); // Viewing window - } - if( !one_in( 4 ) ) { - line( this, t_wall_glass, 20, 15, 20, 17 ); // Viewing window - } - } - - // Next, determine how the tanks interconnect. - int rn = rng( 1, 4 ); // Which of the 4 possible connections is missing? - if( rn != 1 ) { - line( this, t_sewage, 14, 4, 14, 5 ); - line( this, t_bridge, 15, 4, 15, 5 ); - line( this, t_sewage, 16, 4, 16, 5 ); - } - if( rn != 2 ) { - line( this, t_sewage, 18, 7, 19, 7 ); - line( this, t_bridge, 18, 8, 19, 8 ); - line( this, t_sewage, 18, 9, 19, 9 ); - } - if( rn != 3 ) { - line( this, t_sewage, 14, 11, 14, 12 ); - line( this, t_bridge, 15, 11, 15, 12 ); - line( this, t_sewage, 16, 11, 16, 12 ); - } - if( rn != 4 ) { - line( this, t_sewage, 11, 7, 12, 7 ); - line( this, t_bridge, 11, 8, 12, 8 ); - line( this, t_sewage, 11, 9, 12, 9 ); - } - // Bridge connecting bottom two rooms - line( this, t_bridge, 10, 20, 13, 20 ); - // Possibility of extra equipment shelves - if( !one_in( 3 ) ) { - line_furn( this, f_rack, 23, 1, 23, 4 ); - place_items( "sewage_plant", 60, point( 23, 1 ), point( 23, 4 ), false, 0 ); - } - - // Finally, choose what the top-left and bottom-right rooms do. - if( one_in( 2 ) ) { // Upper left is sampling, lower right valuable finds - // Upper left... - line( this, t_wall, 1, 3, 2, 3 ); - line( this, t_wall, 1, 5, 2, 5 ); - line( this, t_wall, 1, 7, 2, 7 ); - ter_set( point( 1, 4 ), t_sewage_pump ); - furn_set( point( 2, 4 ), f_counter ); - ter_set( point( 1, 6 ), t_sewage_pump ); - furn_set( point( 2, 6 ), f_counter ); - ter_set( point( 1, 2 ), t_console ); - tmpcomp = add_computer( tripoint( 1, 2, abs_sub.z ), _( "EnviroCom OS v2.03" ), 0 ); - tmpcomp->add_option( _( "Download Sewer Maps" ), COMPACT_MAP_SEWER, 0 ); - tmpcomp->add_option( _( "Divert sample" ), COMPACT_SAMPLE, 3 ); - tmpcomp->add_failure( COMPFAIL_PUMP_EXPLODE ); - tmpcomp->add_failure( COMPFAIL_PUMP_LEAK ); - // Lower right... - line_furn( this, f_counter, 15, 23, 22, 23 ); - place_items( "sewer", 65, point( 15, 23 ), point( 22, 23 ), false, 0 ); - line_furn( this, f_counter, 23, 15, 23, 19 ); - place_items( "sewer", 65, point( 23, 15 ), point( 23, 19 ), false, 0 ); - } else { // Upper left is valuable finds, lower right is sampling - // Upper left... - line_furn( this, f_counter, 1, 1, 1, 7 ); - place_items( "sewer", 65, point_south_east, point( 1, 7 ), false, 0 ); - line_furn( this, f_counter, 7, 1, 7, 7 ); - place_items( "sewer", 65, point( 7, 1 ), point( 7, 7 ), false, 0 ); - // Lower right... - line( this, t_wall, 17, 22, 17, 23 ); - line( this, t_wall, 19, 22, 19, 23 ); - line( this, t_wall, 21, 22, 21, 23 ); - ter_set( point( 18, 23 ), t_sewage_pump ); - furn_set( point( 18, 22 ), f_counter ); - ter_set( point( 20, 23 ), t_sewage_pump ); - furn_set( point( 20, 22 ), f_counter ); - ter_set( point( 16, 23 ), t_console ); - tmpcomp = add_computer( tripoint( 16, 23, abs_sub.z ), _( "EnviroCom OS v2.03" ), 0 ); - tmpcomp->add_option( _( "Download Sewer Maps" ), COMPACT_MAP_SEWER, 0 ); - tmpcomp->add_option( _( "Divert sample" ), COMPACT_SAMPLE, 3 ); - tmpcomp->add_failure( COMPFAIL_PUMP_EXPLODE ); - tmpcomp->add_failure( COMPFAIL_PUMP_LEAK ); - } - - } else if( terrain_type == "sewage_treatment_under" ) { - fill_background( this, t_floor ); - if( dat.north() == "sewage_treatment_under" || dat.north() == "sewage_treatment_hub" || - ( is_ot_match( "sewer", dat.north(), ot_match_type::type ) && connects_to( dat.north(), 2 ) ) ) { - if( dat.north() == "sewage_treatment_under" || dat.north() == "sewage_treatment_hub" ) { - line( this, t_wall, 0, 0, 23, 0 ); - ter_set( point( 3, 0 ), t_door_c ); - } - dat.n_fac = 1; - square( this, t_sewage, 10, 0, 13, 13 ); - } - if( dat.east() == "sewage_treatment_under" || dat.east() == "sewage_treatment_hub" || - ( is_ot_match( "sewer", dat.east(), ot_match_type::type ) && connects_to( dat.east(), 3 ) ) ) { - dat.e_fac = 1; - square( this, t_sewage, 10, 10, 23, 13 ); - } - if( dat.south() == "sewage_treatment_under" || dat.south() == "sewage_treatment_hub" || - ( is_ot_match( "sewer", dat.south(), ot_match_type::type ) && connects_to( dat.south(), 0 ) ) ) { - dat.s_fac = 1; - square( this, t_sewage, 10, 10, 13, 23 ); - } - if( dat.west() == "sewage_treatment_under" || dat.west() == "sewage_treatment_hub" || - ( is_ot_match( "sewer", dat.west(), ot_match_type::type ) && connects_to( dat.west(), 1 ) ) ) { - if( dat.west() == "sewage_treatment_under" || - dat.west() == "sewage_treatment_hub" ) { - line( this, t_wall, 0, 1, 0, 23 ); - ter_set( point( 0, 20 ), t_door_c ); - } - dat.w_fac = 1; - square( this, t_sewage, 0, 10, 13, 13 ); - } - } -} - void map::draw_mine( const oter_id &terrain_type, mapgendata &dat, const time_point &/*when*/, const float /*density*/ ) { diff --git a/src/overmap.cpp b/src/overmap.cpp index 8b171055c5e05..3d3ffaee23178 100644 --- a/src/overmap.cpp +++ b/src/overmap.cpp @@ -775,9 +775,6 @@ bool oter_t::is_hardcoded() const "office_tower_1_entrance", "office_tower_b", "office_tower_b_entrance", - "sewage_treatment", - "sewage_treatment_hub", - "sewage_treatment_under", "silo", "silo_finale", "slimepit", diff --git a/src/savegame.cpp b/src/savegame.cpp index d19c82272d4e3..5df2c56f9bc37 100644 --- a/src/savegame.cpp +++ b/src/savegame.cpp @@ -391,6 +391,7 @@ void overmap::convert_terrain( const std::unordered_map & }; std::vector nearby; + std::vector> convert_unrelated_adjacent_tiles; if( old == "apartments_con_tower_1_entrance" || old == "apartments_mod_tower_1_entrance" ) { @@ -575,6 +576,32 @@ void overmap::convert_terrain( const std::unordered_map & nearby.push_back( { 0, hospital, -2, hospital_entrance, hospital + "_8_north" } ); nearby.push_back( { 2, hospital, -2, hospital, hospital + "_9_north" } ); } + + } else if( old == "sewage_treatment" ) { + new_id = oter_id( "sewage_treatment_0_1_0_north" ); + convert_unrelated_adjacent_tiles.push_back( { tripoint_north, "sewage_treatment_0_0_0_north" } ); + convert_unrelated_adjacent_tiles.push_back( { tripoint_east, "sewage_treatment_1_1_0_north" } ); + convert_unrelated_adjacent_tiles.push_back( { tripoint_north_east, "sewage_treatment_1_0_0_north" } ); + convert_unrelated_adjacent_tiles.push_back( { tripoint_above, "sewage_treatment_0_1_roof_north" } ); + convert_unrelated_adjacent_tiles.push_back( { tripoint_north + tripoint_above, "sewage_treatment_0_0_roof_north" } ); + convert_unrelated_adjacent_tiles.push_back( { tripoint_east + tripoint_above, "sewage_treatment_1_1_roof_north" } ); + convert_unrelated_adjacent_tiles.push_back( { tripoint_north_east + tripoint_above, "sewage_treatment_1_0_roof_north" } ); + } else if( old == "sewage_treatment_under" ) { + const std::string base = "sewage_treatment_under"; + const std::string hub = "sewage_treatment_hub"; + nearby.push_back( { -1, hub, 0, base, "sewage_treatment_1_1_-1_north" } ); + nearby.push_back( { -1, base, 1, hub, "sewage_treatment_0_0_-1_north" } ); + nearby.push_back( { -1, base, 1, base, "sewage_treatment_1_0_-1_north" } ); + // Fill empty space with something other than drivethrus. + nearby.push_back( { 1, hub, 0, base, "empty_rock" } ); + nearby.push_back( { 1, base, 0, base, "empty_rock" } ); + nearby.push_back( { -1, base, -1, base, "empty_rock" } ); + nearby.push_back( { 0, base, -1, base, "empty_rock" } ); + nearby.push_back( { 1, base, -1, base, "empty_rock" } ); + } else if( old == "sewage_treatment_hub" ) { + new_id = oter_id( "sewage_treatment_0_1_-1_north" ); + convert_unrelated_adjacent_tiles.push_back( { tripoint( 2, 0, 0 ), "sewage_treatment_2_1_-1_north" } ); + convert_unrelated_adjacent_tiles.push_back( { tripoint( 2, -1, 0 ), "sewage_treatment_2_0_-1_north" } ); } else if( old == "cathedral_1_entrance" ) { const std::string base = "cathedral_1_"; const std::string other = "cathedral_1"; @@ -773,6 +800,10 @@ void overmap::convert_terrain( const std::unordered_map & break; } } + + for( const std::pair &conv : convert_unrelated_adjacent_tiles ) { + ter( pos + conv.first ) = oter_id( conv.second ); + } } }