Skip to content

Commit

Permalink
Isolation Protocol: New lab shape (#75788)
Browse files Browse the repository at this point in the history
* IP: New lab

* Move terrains to isolation protocol

I'll probably move them backto vanilla later tbh.
  • Loading branch information
John-Candlebury authored Aug 21, 2024
1 parent 5441d21 commit 6412e91
Show file tree
Hide file tree
Showing 6 changed files with 412 additions and 2 deletions.
22 changes: 22 additions & 0 deletions data/json/mapgen/microlab/microlab_generic_edge.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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" } },
Expand Down
23 changes: 22 additions & 1 deletion data/mods/Isolation-Protocol/EOC/elevator_eoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
172 changes: 172 additions & 0 deletions data/mods/Isolation-Protocol/Map/levels/microlab_chunks_level.json
Original file line number Diff line number Diff line change
@@ -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 } ]
]
}
]
72 changes: 72 additions & 0 deletions data/mods/Isolation-Protocol/Map/mapgen/elevator.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
}
}
]
Loading

0 comments on commit 6412e91

Please sign in to comment.