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

Outer Wilds: Added warp path logic to BHF #7

Open
wants to merge 6 commits into
base: outer_wilds
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions worlds/outer_wilds/locations_and_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,19 @@ def has_codes(state): return state.has("Nomai Warp Codes", p)

mw.get_region("White Hole Station", p).add_exits(["Brittle Hollow"], {"Brittle Hollow": has_codes})
else:
# Hang on to the pertinent warp connections
bhf_connection = None
bhng_connection = None
whs_connection = None

for (platform_1, platform_2) in world.warps:
if platform_1 == "BHF": bhf_connection = platform_2
elif platform_1 == "BHNG": bhng_connection = platform_2
elif platform_1 == "WHS": whs_connection = platform_2
if platform_2 == "BHF": bhf_connection = platform_1
elif platform_2 == "BHNG": bhng_connection = platform_1
elif platform_2 == "WHS": whs_connection = platform_1

region_name_1 = warp_platform_to_logical_region[platform_1]
region_name_2 = warp_platform_to_logical_region[platform_2]
if region_name_1 == region_name_2:
Expand All @@ -202,6 +214,18 @@ def rule(state: CollectionState) -> bool:
r2 = mw.get_region(region_name_2, p)
r1.connect(r2, "%s->%s warp" % (region_name_1, region_name_2), rule)
r2.connect(r1, "%s->%s warp" % (region_name_2, region_name_1), rule)

# To access the Black Hole Forge without the Launch Codes, there needs to be
# a path from Brittle Hollow proper to the Hanging City Ceiling. This path
# exists if the BHF warp is connected to one of the other two warps accessible
# from Brittle Hollow (BHNG/WHS) either directly, or indirectly through the
# Hourglass Twins. This means that there is no path if either BHF or both of
# BHNG & WHS connect to an isolated warp pad (i.e. SS, ATP, TH, GD).
hourglass_twins = ("ET", "ST", "ETT", "ATT", "THT", "BHT", "GDT")
if bhf_connection in ("BHNG", "WHS") or (
bhf_connection in hourglass_twins and (
bhng_connection in hourglass_twins or whs_connection in hourglass_twins)):
mw.get_region("Forge via Warps Only", p).connect(mw.get_region("Black Hole Forge", p), "Forge Warp Path")


# In the .jsonc files we use, a location or region connection's "access rule" is defined
Expand Down
7 changes: 4 additions & 3 deletions worlds/outer_wilds/shared_static_logic/connections.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
// This connection is tricky because you need to reach the forge controls in Hanging City first,
// and then get back to whichever warp pad connects to Hanging City Ceiling _in the same loop_.
// I believe that requires either the Spaceship or a "warp path" from the Northern Glacier pad to
// the Hanging City Ceiling pad. The latter is hard to write logic for, so we require the ship.
// And once the ship is required, { "region": "Brittle Hollow" } would be redundant.
{ "from": "Hanging City Ceiling", "to": "Black Hole Forge", "requires": [ { "item": "Launch Codes" } ] },
// the Hanging City Ceiling pad. The warp path connection is conditionally added elsewhere if it exists.
{ "from": "Hanging City Ceiling", "to": "Forge via Ship & Warps", "requires": [ { "item": "Launch Codes" } ] },
{ "from": "Forge via Ship & Warps", "to": "Black Hole Forge", "requires": [] },
{ "from": "Hanging City Ceiling", "to": "Forge via Warps Only", "requires": [] },

{ "from": "Space", "to": "GD Ocean Depths", "requires": [ { "item": "Tornado Aerodynamic Adjustments" } ] },
{ "from": "GD Ocean Depths", "to": "GD Core", "requires": [ { "item": "Electrical Insulation" }, { "item": "Spacesuit" } ] },
Expand Down
Binary file modified worlds/outer_wilds/shared_static_logic/static_logic.pickle
Binary file not shown.
Loading