Skip to content

Commit

Permalink
Merge pull request #79852 from John-Candlebury/iso-office-level
Browse files Browse the repository at this point in the history
Isolation Protocol Office levels
  • Loading branch information
Maleclypse authored Feb 25, 2025
2 parents 7505ea6 + 16cf086 commit 5e5cf9d
Show file tree
Hide file tree
Showing 6 changed files with 1,087 additions and 5 deletions.
27 changes: 22 additions & 5 deletions data/mods/Isolation-Protocol/EOC/elevator_eoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,31 @@
"effect": [ { "run_eocs": [ "EOC_ISO_MICROLAB_SAFE_TP", "EOC_ISO_BIONIC_VAMPIRE_POWER_RESTORE" ] } ],
"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" ] } }
]
"if": { "math": [ "ISO_CURRENT_LEVEL < 4" ] },
"then": { "run_eocs": [ "EOC_ISO_MICROLAB_OFFICE_TP" ] },
"else": {
"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",
"id": "EOC_ISO_MICROLAB_OFFICE_TP",
"effect": [
{
"u_location_variable": { "global_val": "new_map" },
"target_params": { "om_terrain": "iso_elevator_office", "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_TP",
Expand Down
83 changes: 83 additions & 0 deletions data/mods/Isolation-Protocol/Map/levels/office_level.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[
{
"type": "overmap_special",
"id": "iso_office",
"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": [ "duct_to_surface", "duct_to_entrance", "office_to_office" ],
"overmaps": {
"surface": { "overmap": "nether_glass_impassable_north", "below": "duct_to_surface", "locations": [ "iso_nether" ] },
"closing_chunk": {
"overmap": "iso_office",
"north": "office_to_office",
"east": { "id": "office_to_office", "type": "available" },
"south": { "id": "office_to_office", "type": "available" },
"west": { "id": "office_to_office", "type": "available" }
},
"office": {
"overmap": "iso_office",
"north": { "id": "office_to_office", "alternatives": [ "office_to_office" ] },
"east": { "id": "office_to_office", "alternatives": [ "office_to_office" ] },
"south": { "id": "office_to_office", "alternatives": [ "office_to_office" ] },
"west": { "id": "office_to_office", "alternatives": [ "office_to_office" ] }
},
"iso_elevator": {
"overmap": "iso_elevator_office",
"above": "duct_to_surface",
"north": { "id": "office_to_office", "type": "available", "alternatives": [ "office_to_office" ] },
"east": { "id": "office_to_office", "type": "available", "alternatives": [ "office_to_office" ] },
"south": { "id": "office_to_office", "type": "available", "alternatives": [ "office_to_office" ] },
"west": { "id": "office_to_office", "type": "available", "alternatives": [ "office_to_office" ] }
},
"iso_next_level_elevator": {
"overmap": "iso_elevator_office_next",
"north": { "id": "office_to_office", "type": "available", "alternatives": [ "office_to_office" ] },
"east": { "id": "office_to_office", "type": "available", "alternatives": [ "office_to_office" ] },
"south": { "id": "office_to_office", "type": "available", "alternatives": [ "office_to_office" ] },
"west": { "id": "office_to_office", "type": "available", "alternatives": [ "office_to_office" ] }
}
},
"root": "surface",
"phases": [
[
{
"name": "start_chunk",
"chunk": [
{ "overmap": "iso_elevator", "pos": [ 0, 0, 0 ] },
{ "overmap": "office", "pos": [ 0, 1, 0 ] },
{ "overmap": "office", "pos": [ 1, 1, 0 ] },
{ "overmap": "office", "pos": [ 1, 0, 0 ] }
],
"max": 1
}
],
[ { "overmap": "office", "max": 15 } ],
[ { "overmap": "iso_next_level_elevator", "max": 2 } ],
[ { "overmap": "closing_chunk", "weight": 1 } ]
]
}
]
124 changes: 124 additions & 0 deletions data/mods/Isolation-Protocol/Map/mapgen/elevator.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,129 @@
"palettes": [ "microlab" ],
"terrain": { "`": "t_open_air", "E": "t_elevator_control_iso" }
}
},
{
"type": "mapgen",
"om_terrain": [ [ "iso_elevator_office" ] ],
"method": "json",
"object": {
"fill_ter": "t_strconc_floor",
"rows": [
"((((((((((((((((((((((((",
"( = = | dh (",
"( : [ = + (",
"( : := = |ddd ddd(",
"( : :=rr=BB | h h (",
"(|||||rr|||++||||||||||(",
"( h =rr rr| h (",
"(htt [rr h tt rr|ddd (",
"( tth=rrdd tt rr|h h (",
"(^h ^=rr h rr+ (",
"(|||||rrdd dd ddrr|||||(",
"(hd^ =rr h h hrr|rhr|(",
"( =rrdd dd ddrr|rtr|(",
"(hd =rr rr|rhr|(",
"( d =rr^^nFcc^^rr|rrr|(",
"(|||+|rr||||||||rr|+==|(",
"( t rr rr (",
"( (",
"(||||| ||| |||| ||||(",
"( d = |--22-##-22--|||",
"(hdh = |-Eee-##-eeE-|||",
"( d + |-eee-##-eee-|||",
"( &= ^|-----##-----|||",
"(((((((((((((((((((((((("
],
"terrain": { "`": "t_open_air", "E": "t_elevator_control_off" },
"place_nested": [
{
"chunks": [ "office_up_ew" ],
"x": 0,
"y": 0,
"neighbors": { "north": [ "iso_office", "iso_elevator_office_next", "iso_elevator_office" ] }
},
{
"chunks": [ "office_left_ns" ],
"x": 0,
"y": 0,
"neighbors": { "west": [ "iso_office", "iso_elevator_office_next", "iso_elevator_office" ] }
},
{
"chunks": [ "office_bottom_ew" ],
"x": 0,
"y": 0,
"neighbors": { "south": [ "iso_office", "iso_elevator_office_next", "iso_elevator_office" ] }
},
{
"chunks": [ "office_right_ns" ],
"x": 0,
"y": 0,
"neighbors": { "east": [ "iso_office", "iso_elevator_office_next", "iso_elevator_office" ] }
}
],
"palettes": [ "iso_office" ]
}
},
{
"type": "mapgen",
"om_terrain": [ [ "iso_elevator_office_next" ] ],
"method": "json",
"object": {
"fill_ter": "t_strconc_floor",
"rows": [
"((((((((((((((((((((((((",
"( = = | dh (",
"( : [ = + (",
"( : := = |ddd ddd(",
"( : :=rr=BB | h h (",
"(|||||rr|||++||||||||||(",
"( h =rr rr| h (",
"(htt [rr h tt rr|ddd (",
"( tth=rrdd tt rr|h h (",
"(^h ^=rr h rr+ (",
"(|||||rrdd dd ddrr|||||(",
"(hd^ =rr h h hrr|rhr|(",
"( =rrdd dd ddrr|rtr|(",
"(hd =rr rr|rhr|(",
"( d =rr^^nFcc^^rr|rrr|(",
"(|||+|rr||||||||rr|+==|(",
"( t rr rr (",
"( (",
"(||||| ||| |||| |||=(",
"( d = |--22-##-22--|||",
"(hdh = |-Eee-##-eeE-|||",
"( d + |-eee-##-eee-|||",
"( &= ^|-----##-----|||",
"(((((((((((((((((((((((("
],
"terrain": { "`": "t_open_air", "E": "t_elevator_control_iso" },
"place_nested": [
{
"chunks": [ "office_up_ew" ],
"x": 0,
"y": 0,
"neighbors": { "north": [ "iso_office", "iso_elevator_office_next", "iso_elevator_office" ] }
},
{
"chunks": [ "office_left_ns" ],
"x": 0,
"y": 0,
"neighbors": { "west": [ "iso_office", "iso_elevator_office_next", "iso_elevator_office" ] }
},
{
"chunks": [ "office_bottom_ew" ],
"x": 0,
"y": 0,
"neighbors": { "south": [ "iso_office", "iso_elevator_office_next", "iso_elevator_office" ] }
},
{
"chunks": [ "office_right_ns" ],
"x": 0,
"y": 0,
"neighbors": { "east": [ "iso_office", "iso_elevator_office_next", "iso_elevator_office" ] }
}
],
"palettes": [ "iso_office" ]
}
}
]
Loading

0 comments on commit 5e5cf9d

Please sign in to comment.