diff --git a/data/json/mapgen/microlab/microlab_generic_edge.json b/data/json/mapgen/microlab/microlab_generic_edge.json index d60909219f5e2..4f79fd31cd13d 100644 --- a/data/json/mapgen/microlab/microlab_generic_edge.json +++ b/data/json/mapgen/microlab/microlab_generic_edge.json @@ -8,6 +8,15 @@ "set": [ { "line": "terrain", "id": "t_concrete_wall", "x": 0, "y": 0, "x2": 23, "y2": 0 } ] } }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "concrete_wall_hole_ew", + "object": { + "mapgensize": [ 24, 24 ], + "set": [ { "line": "terrain", "id": "t_strconc_floor", "x": 11, "y": 0, "x2": 12, "y2": 0 } ] + } + }, { "type": "mapgen", "method": "json", @@ -23,6 +32,15 @@ "set": [ { "line": "terrain", "id": "t_concrete_wall", "x": 0, "y": 0, "x2": 0, "y2": 23 } ] } }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "concrete_wall_hole_ns", + "object": { + "mapgensize": [ 24, 24 ], + "set": [ { "line": "terrain", "id": "t_strconc_floor", "x": 0, "y": 11, "x2": 0, "y2": 12 } ] + } + }, { "type": "mapgen", "method": "json", @@ -46,6 +64,10 @@ { "else_chunks": [ "concrete_wall_ns" ], "x": 23, "y": 0, "neighbors": { "east": "microlab" } }, { "else_chunks": [ "concrete_wall_ew" ], "x": 0, "y": 23, "neighbors": { "south": "microlab" } }, { "else_chunks": [ "concrete_wall_ns" ], "x": 0, "y": 0, "neighbors": { "west": "microlab" } }, + { "chunks": [ "concrete_wall_hole_ew" ], "x": 0, "y": 0, "neighbors": { "north": "mlb_generic_subhallway" } }, + { "chunks": [ "concrete_wall_hole_ns" ], "x": 23, "y": 0, "neighbors": { "east": "mlb_generic_subhallway" } }, + { "chunks": [ "concrete_wall_hole_ew" ], "x": 0, "y": 23, "neighbors": { "south": "mlb_generic_subhallway" } }, + { "chunks": [ "concrete_wall_hole_ns" ], "x": 0, "y": 0, "neighbors": { "west": "mlb_generic_subhallway" } }, { "else_chunks": [ "concrete_corner" ], "x": 0, "y": 0, "neighbors": { "north_west": "microlab" } }, { "else_chunks": [ "concrete_corner" ], "x": 23, "y": 0, "neighbors": { "north_east": "microlab" } }, { "else_chunks": [ "concrete_corner" ], "x": 23, "y": 23, "neighbors": { "south_east": "microlab" } }, diff --git a/data/mods/Isolation-Protocol/EOC/elevator_eoc.json b/data/mods/Isolation-Protocol/EOC/elevator_eoc.json index 5f238e0ed0d77..af0d071d47ac1 100644 --- a/data/mods/Isolation-Protocol/EOC/elevator_eoc.json +++ b/data/mods/Isolation-Protocol/EOC/elevator_eoc.json @@ -22,7 +22,15 @@ "id": "EOC_ISO_DECIDE_LEVEL", "condition": { "math": [ "ISO_CURRENT_LEVEL % SAFEPOINT_INTERVAL", "==", "0" ] }, "effect": [ { "run_eocs": [ "EOC_ISO_MICROLAB_SAFE_TP" ] } ], - "false_effect": [ { "run_eocs": [ "EOC_ISO_MICROLAB_TP" ] } ] + "false_effect": [ + { + "switch": { "math": [ "rand(1)" ] }, + "cases": [ + { "case": 0, "effect": { "run_eocs": [ "EOC_ISO_MICROLAB_TP" ] } }, + { "case": 1, "effect": { "run_eocs": [ "EOC_ISO_MICROLAB_EMBED_TP" ] } } + ] + } + ] }, { "type": "effect_on_condition", @@ -37,6 +45,19 @@ { "u_teleport": { "global_val": "new_map" }, "force": true } ] }, + { + "type": "effect_on_condition", + "id": "EOC_ISO_MICROLAB_EMBED_TP", + "effect": [ + { + "u_location_variable": { "global_val": "new_map" }, + "target_params": { "om_terrain": "iso_elevator_microlab_embed", "z": -1, "random": true, "cant_see": true, "search_range": 180 }, + "terrain": "t_elevator", + "target_max_radius": 30 + }, + { "u_teleport": { "global_val": "new_map" }, "force": true } + ] + }, { "type": "effect_on_condition", "id": "EOC_ISO_MICROLAB_SAFE_TP", diff --git a/data/mods/Isolation-Protocol/Map/levels/microlab_chunks_level.json b/data/mods/Isolation-Protocol/Map/levels/microlab_chunks_level.json new file mode 100644 index 0000000000000..56d3e337a21f6 --- /dev/null +++ b/data/mods/Isolation-Protocol/Map/levels/microlab_chunks_level.json @@ -0,0 +1,172 @@ +[ + { + "type": "overmap_special", + "id": "iso_mslc", + "subtype": "mutable", + "locations": [ "iso_nether" ], + "city_distance": [ 0, -1 ], + "city_sizes": [ 0, -1 ], + "occurrences": [ 4, 4 ], + "flags": [ "ISO_MAP" ], + "check_for_locations": [ + [ [ 0, 0, 0 ], [ "iso_nether" ] ], + [ [ 0, 0, -1 ], [ "iso_nether" ] ], + [ [ 4, 0, -1 ], [ "iso_nether" ] ], + [ [ 3, 0, -1 ], [ "iso_nether" ] ], + [ [ 2, 0, -1 ], [ "iso_nether" ] ], + [ [ 1, 0, -1 ], [ "iso_nether" ] ], + [ [ -4, 0, -1 ], [ "iso_nether" ] ], + [ [ -3, 0, -1 ], [ "iso_nether" ] ], + [ [ -2, 0, -1 ], [ "iso_nether" ] ], + [ [ -1, 0, -1 ], [ "iso_nether" ] ], + [ [ 0, -4, -1 ], [ "iso_nether" ] ], + [ [ 0, -3, -1 ], [ "iso_nether" ] ], + [ [ 0, -2, -1 ], [ "iso_nether" ] ], + [ [ 0, -1, -1 ], [ "iso_nether" ] ], + [ [ 0, 4, -1 ], [ "iso_nether" ] ], + [ [ 0, 3, -1 ], [ "iso_nether" ] ], + [ [ 0, 2, -1 ], [ "iso_nether" ] ], + [ [ 0, 1, -1 ], [ "iso_nether" ] ] + ], + "joins": [ + "hallway_to_hallway", + "duct_to_surface", + "duct_to_entrance", + { "id": "hallway_to_microlab", "opposite": "microlab_to_hallway" }, + { "id": "microlab_to_hallway", "opposite": "hallway_to_microlab" }, + "microlab_to_microlab", + "microlab_entry_to_station", + "microlab_station_to_subway" + ], + "overmaps": { + "surface": { "overmap": "nether_glass_impassable_north", "below": "duct_to_surface", "locations": [ "iso_nether" ] }, + "closing_chunk": { "overmap": "iso_elevator_microlab_embed_next_north", "north": "microlab_to_hallway" }, + "microlab": { + "overmap": "microlab_generic", + "north": { "id": "microlab_to_microlab", "alternatives": [ "microlab_to_hallway" ] }, + "east": { "id": "microlab_to_microlab", "alternatives": [ "microlab_to_hallway" ] }, + "south": { "id": "microlab_to_microlab", "alternatives": [ "microlab_to_hallway" ] }, + "west": { "id": "microlab_to_microlab", "alternatives": [ "microlab_to_hallway" ] } + }, + "microlab_edge": { + "overmap": "microlab_generic_edge", + "north": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "east": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "south": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "west": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] } + }, + "microlab_subhallway": { "overmap": "mlb_generic_subhallway_north", "north": "microlab_to_microlab", "south": "hallway_to_microlab" }, + "iso_elevator": { + "overmap": "iso_elevator_microlab_embed_north", + "above": "duct_to_surface", + "north": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "east": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "south": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "west": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] } + }, + "iso_next_level_elevator": { + "overmap": "iso_elevator_microlab_embed_next_north", + "north": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "east": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "south": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] }, + "west": { "id": "microlab_to_microlab", "type": "available", "alternatives": [ "microlab_to_hallway" ] } + } + }, + "root": "surface", + "phases": [ + [ + { + "name": "start_chunk", + "chunk": [ + { "overmap": "microlab_subhallway", "pos": [ 0, 2, 0 ] }, + { "overmap": "iso_elevator", "pos": [ 0, 0, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, 1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, 1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, 0, 0 ] } + ], + "max": 1 + } + ], + [ + { + "name": "microlab_chunk", + "chunk": [ + { "overmap": "microlab_subhallway", "pos": [ 0, 1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, 0, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, 0, 0 ] } + ], + "max": 1 + } + ], + [ + { + "name": "microlab_chunk_1", + "chunk": [ + { "overmap": "microlab_subhallway", "pos": [ 0, 1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, 0, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, 0, 0 ] }, + { "overmap": "microlab_subhallway", "pos": [ 2, 0, 0 ], "rot": "west" } + ], + "max": 1 + } + ], + [ + { + "name": "microlab_chunkk_2", + "chunk": [ + { "overmap": "microlab_subhallway", "pos": [ 0, 1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, 0, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, 0, 0 ] } + ], + "max": { "poisson": 2 } + } + ], + [ + { + "name": "microlab_chunk_1", + "chunk": [ + { "overmap": "microlab_subhallway", "pos": [ 0, 1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, 0, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, 0, 0 ] }, + { "overmap": "microlab_subhallway", "pos": [ 2, 0, 0 ], "rot": "west" } + ], + "max": { "poisson": 0.5 } + } + ], + [ + { + "name": "microlab_chunkk_2", + "chunk": [ + { "overmap": "microlab_subhallway", "pos": [ 0, 1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, 0, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, 0, 0 ] } + ], + "max": { "poisson": 2 } + } + ], + [ + { + "name": "microlab_final_chunk", + "chunk": [ + { "overmap": "microlab_edge", "pos": [ 0, 0, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 0, -1, 0 ] }, + { "overmap": "iso_next_level_elevator", "pos": [ 1, -1, 0 ] }, + { "overmap": "microlab_edge", "pos": [ 1, 0, 0 ] } + ], + "max": 10 + } + ], + [ { "overmap": "closing_chunk", "weight": 1 } ] + ] + } +] diff --git a/data/mods/Isolation-Protocol/Map/mapgen/elevator.json b/data/mods/Isolation-Protocol/Map/mapgen/elevator.json index b8f5cad6adf1d..7adf9193ff05f 100644 --- a/data/mods/Isolation-Protocol/Map/mapgen/elevator.json +++ b/data/mods/Isolation-Protocol/Map/mapgen/elevator.json @@ -98,5 +98,77 @@ "palettes": [ "microlab_generic" ], "terrain": { "`": "t_open_air", "E": "t_elevator_control_iso" } } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": "iso_elevator_microlab_embed", + "object": { + "fill_ter": "t_strconc_floor", + "rows": [ + "||||||||||| |||||||||||", + "|####|XXX= =XXX|####|", + "|####|XXX= =XXX|####|", + "|####|XXX= =XXX|####|", + "|####|XXX= =XXX|####|", + "|#||||==== ====||||#|", + "|#|XX= YYPPPPYY =XX|#|", + "|#|XX= PPPP =XX|#|", + "|#|XX= PPPP =XX|#|", + "|#||||^ YYPPPPYY ^||||#|", + "|||||| ||||||", + " YYPPPPYY ", + " YYPPPPYY ", + "|||||||| |||| ||||||||", + "|####|--22-##-22--|####|", + "|####|-Eee-##-eeE-|####|", + "|####|-eee-##-eee-|####|", + "|####|--22-##-22--|####|", + "|#|||||| |||| ||||||#|", + "|#|XXX= YY =XXX|#|", + "|#|XXX=YPPPPPPPPY=XXX|#|", + "|#|XXX=YPPPPPPPPY=XXX|#|", + "|#|XXX= YY =XXX|#|", + "||||||||||| |||||||||||" + ], + "palettes": [ "microlab" ], + "terrain": { "`": "t_open_air", "E": "t_elevator_control_off" } + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": "iso_elevator_microlab_embed_next", + "object": { + "fill_ter": "t_strconc_floor", + "rows": [ + "||||||||||| |||||||||||", + "|####|XXX= =XXX|####|", + "|####|XXX= =XXX|####|", + "|####|XXX= =XXX|####|", + "|####|XXX= =XXX|####|", + "|#||||==== ====||||#|", + "|#|XX= YYPPPPYY =XX|#|", + "|#|XX= PPPP =XX|#|", + "|#|XX= PPPP =XX|#|", + "|#||||^ YYPPPPYY ^||||#|", + "|||||| ||||||", + " YYPPPPYY ", + " YYPPPPYY ", + "|||||||| |||| ||||||||", + "|####|--22-##-22--|####|", + "|####|-Eee-##-eeE-|####|", + "|####|-eee-##-eee-|####|", + "|####|--22-##-22--|####|", + "|#|||||| |||| ||||||#|", + "|#|XXX= YY =XXX|#|", + "|#|XXX=YPPPPPPPPY=XXX|#|", + "|#|XXX=YPPPPPPPPY=XXX|#|", + "|#|XXX= YY =XXX|#|", + "||||||||||| |||||||||||" + ], + "palettes": [ "microlab" ], + "terrain": { "`": "t_open_air", "E": "t_elevator_control_iso" } + } } ] diff --git a/data/mods/Isolation-Protocol/Map/mapgen/microlab_subhallway.json b/data/mods/Isolation-Protocol/Map/mapgen/microlab_subhallway.json new file mode 100644 index 0000000000000..8ab20a9969650 --- /dev/null +++ b/data/mods/Isolation-Protocol/Map/mapgen/microlab_subhallway.json @@ -0,0 +1,110 @@ +[ + { + "type": "mapgen", + "om_terrain": "mlb_generic_subhallway", + "method": "json", + "object": { + "fill_ter": "t_strconc_floor", + "rows": [ + "##########| |##########", + "#######||||YY||||#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######||||YY||||#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######||||YY||||#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######||||YY||||#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|XX= =XX|#######", + "#######|||| ||||#######", + "##########|YY|##########", + "##########| |##########" + ], + "palettes": [ "microlab" ], + "place_nested": [ { "chunks": [ { "param": "unique_foe", "fallback": "mnm_more_density" } ], "x": 0, "y": 0 } ] + } + }, + { + "type": "mapgen", + "om_terrain": "mlb_generic_subhallway", + "method": "json", + "object": { + "fill_ter": "t_strconc_floor", + "rows": [ + "##########| |##########", + "##########|YY||#########", + "##########| |#########", + "##########| |#########", + "##########| |#########", + "##########| |#########", + "##########| |#########", + "####||||||| |#########", + "####|i i | |#########", + "####| | |#########", + "####|2|2| | |#########", + "####|;|;| Y |#########", + "####||||| Y |#########", + "####|;|;| Y |#########", + "####|2|2| | |#########", + "####| | |#########", + "####|i i | |#########", + "####||||||| |#########", + "##########| |#########", + "##########| |#########", + "##########| |#########", + "##########| |#########", + "##########|YY||#########", + "##########| |##########" + ], + "palettes": [ "microlab" ], + "place_nested": [ { "chunks": [ { "param": "unique_foe", "fallback": "mnm_more_density" } ], "x": 0, "y": 0 } ] + } + }, + { + "type": "mapgen", + "om_terrain": "mlb_generic_subhallway", + "method": "json", + "object": { + "fill_ter": "t_strconc_floor", + "rows": [ + "##########| |##########", + "##########|YY|##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########|YY|##########", + "##########|YY|##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########| |##########", + "##########|YY|##########", + "##########| |##########" + ], + "palettes": [ "microlab" ], + "place_nested": [ { "chunks": [ { "param": "unique_foe", "fallback": "mnm_more_density" } ], "x": 0, "y": 0 } ] + } + } +] diff --git a/data/mods/Isolation-Protocol/Map/overmap.json b/data/mods/Isolation-Protocol/Map/overmap.json index 4df9585732dff..bf03446879955 100644 --- a/data/mods/Isolation-Protocol/Map/overmap.json +++ b/data/mods/Isolation-Protocol/Map/overmap.json @@ -1,12 +1,25 @@ [ { "type": "overmap_terrain", - "id": [ "iso_first_elevator", "iso_elevator", "iso_elevator_safe", "iso_next_level_elevator" ], + "id": [ + "iso_first_elevator", + "iso_elevator", + "iso_elevator_safe", + "iso_next_level_elevator", + "iso_elevator_microlab_embed", + "iso_elevator_microlab_embed_next" + ], "name": "lab elevator", "color": "light_red", "sym": "L", "see_cost": "high" }, + { + "type": "overmap_terrain", + "id": "mlb_generic_subhallway", + "copy-from": "microlab_generic", + "flags": [ "RISK_EXTREME", "SOURCE_CHEMISTRY", "SOURCE_MEDICINE" ] + }, { "type": "overmap_terrain", "id": [ "iso_hallway_isolated" ],