Skip to content

Commit

Permalink
Merge pull request #16 from randovania/feature/doors
Browse files Browse the repository at this point in the history
door lock rando support
  • Loading branch information
duncathan authored Jun 19, 2023
2 parents 9070aef + adc58a9 commit b489ebe
Show file tree
Hide file tree
Showing 31 changed files with 1,449 additions and 96 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.10"

- name: Install Python packages
run: python -m pip install --upgrade pip setuptools build

- name: build
run: python -m build

- name: Store the packages
uses: actions/upload-artifact@v2
with:
Expand All @@ -40,14 +40,13 @@ jobs:
test:
needs:
- build

runs-on: ubuntu-latest
name: Test Python ${{ matrix.python.version }}
strategy:
fail-fast: false
matrix:
python:
- {version: '3.9', wheel: 'cp39-cp39'}
- {version: '3.10', wheel: 'cp310-cp310'}
- {version: '3.11', wheel: 'cp311-cp311'}

Expand All @@ -65,7 +64,7 @@ jobs:
with:
name: python-package-distributions
path: dist/

- name: Install Python packages
run: python -m pip install --upgrade pip pytest

Expand Down Expand Up @@ -94,7 +93,7 @@ jobs:
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/

- name: Publish 📦 to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-exclude open_prime_rando/echoes/custom_assets *.pdn
5 changes: 3 additions & 2 deletions open_prime_rando/dynamic_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ def expand_schema(base_schema: dict, editor: PatcherEditor) -> dict:
schema = copy.deepcopy(base_schema)

world_props = schema["properties"]["worlds"]["properties"] = {}
for world, mlvl_id in open_prime_rando.echoes.asset_ids.world.NAME_TO_ID.items():
for world, mlvl_id in open_prime_rando.echoes.asset_ids.world.NAME_TO_ID_MLVL.items():
world_def = copy.deepcopy(schema["$defs"]["world"])
world_props[world] = world_def

mlvl = editor.get_mlvl(mlvl_id)
area_props = {}
world_def["properties"]["areas"] = {"type": "object", "additionalProperties": False, "properties": area_props}
# FIXME: setting it to True for now to fix elevator rooms breaking when renamed
world_def["properties"]["areas"] = {"type": "object", "additionalProperties": True, "properties": area_props}

world_details = open_prime_rando.echoes.asset_ids.world.load_dedicated_file(world)

Expand Down
2 changes: 1 addition & 1 deletion open_prime_rando/echoes/asset_ids/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from . import agon_wastes, great_temple, sanctuary_fortress, temple_grounds, torvus_bog, world

__all__ = [
agon_wastes, great_temple, sanctuary_fortress, temple_grounds, torvus_bog, world,
"agon_wastes", "great_temple", "sanctuary_fortress", "temple_grounds", "torvus_bog", "world",
]
151 changes: 150 additions & 1 deletion open_prime_rando/echoes/asset_ids/agon_wastes.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
WARRIORS_WALK_MREA = 0x33FACC15
WATERING_HOLE_MREA = 0x9B2B4246

NAME_TO_ID = {
NAME_TO_ID_MREA = {
"Agon Energy Controller": 0x02FC3717,
"Agon Map Station": 0x845C85A7,
"Agon Temple": 0x75FC9AAE,
Expand Down Expand Up @@ -147,6 +147,155 @@
"Warrior's Walk": 0x33FACC15,
"Watering Hole": 0x9B2B4246,
}
# Generated by asset_id_files.py

AGON_ENERGY_CONTROLLER_MAPA = 0x2B29CC2A
AGON_MAP_STATION_MAPA = 0xAD897E9A
AGON_TEMPLE_MAPA = 0x5C296193
BATTLEGROUND_MAPA = 0xC3ACA911
BIOENERGY_PRODUCTION_MAPA = 0x3A92F695
BIOSTORAGE_ACCESS_MAPA = 0xF73EED55
BIOSTORAGE_STATION_MAPA = 0xA95C97D4
BITTER_WELL_MAPA = 0x2D243AE5
CENTRAL_MINING_STATION_MAPA = 0xDC73224F
CENTRAL_STATION_ACCESS_MAPA = 0xD7BC1BFE
COMMAND_CENTER_MAPA = 0x1817AE6A
COMMAND_CENTER_ACCESS_MAPA = 0x59567CC4
CONTROLLER_ACCESS_MAPA = 0x968662FD
CROSSROADS_MAPA = 0xA7F62002
DARK_AGON_ENERGY_CONTROLLER_MAPA = 0x9E08BB3B
DARK_AGON_TEMPLE_MAPA = 0x5CA0FFB7
DARK_AGON_TEMPLE_ACCESS_MAPA = 0x08D63393
DARK_CONTROLLER_ACCESS_MAPA = 0x8B26BCEC
DARK_OASIS_MAPA = 0xB02E6E42
DARK_TRANSIT_STATION_MAPA = 0xFEEB3655
DOOMED_ENTRY_MAPA = 0x8D4A7150
DOUBLE_PATH_MAPA = 0x563AB806
DUELLING_RANGE_MAPA = 0x16892404
FEEDING_PIT_MAPA = 0x2E8F8DD6
FEEDING_PIT_ACCESS_MAPA = 0xC9E03B98
HALL_OF_STAIRS_MAPA = 0x44C3BCBD
ING_CACHE_1_MAPA = 0x7B43D48B
ING_CACHE_2_MAPA = 0xBACD0B4B
ING_CACHE_3_MAPA = 0x93F61EC8
ING_CACHE_4_MAPA = 0xEC1232EE
JUDGMENT_PIT_MAPA = 0x42A20280
JUNCTION_SITE_MAPA = 0x3FDD3E5E
MAIN_ENERGY_CONTROLLER_MAPA = 0xF0FD6BFE
MAIN_REACTOR_MAPA = 0xE50C08A3
MINE_SHAFT_MAPA = 0xFE74AF0C
MINING_PLAZA_MAPA = 0x6BAA56A7
MINING_STATION_A_MAPA = 0xCA6B0942
MINING_STATION_ACCESS_MAPA = 0xA4AF84B1
MINING_STATION_B_MAPA = 0xF2AED7D0
OASIS_ACCESS_MAPA = 0xDB193F23
PHAZON_SITE_MAPA = 0x09DB0EDA
PLAZA_ACCESS_MAPA = 0x842D721A
PORTAL_ACCESS_MAPA = 0xA007BDC0
PORTAL_ACCESS_A_MAPA = 0x0AC71520
PORTAL_SITE_MAPA = 0x96AAAC11
PORTAL_TERMINAL_MAPA = 0x0218BF9A
SAND_CACHE_MAPA = 0xDD640C1A
SAND_PROCESSING_MAPA = 0x8D673043
SANDCANYON_MAPA = 0xCC62DD15
SAVE_STATION_1_MAPA = 0x73C0B513
SAVE_STATION_2_MAPA = 0x85F5B4B6
SAVE_STATION_3_MAPA = 0x2BAC0CD2
SAVE_STATION_A_MAPA = 0x79D48A6F
SAVE_STATION_C_MAPA = 0x90ACAD11
SECURITY_STATION_A_MAPA = 0xDEF659A7
SECURITY_STATION_B_MAPA = 0x230FA1D2
STORAGE_A_MAPA = 0x39E7C279
STORAGE_B_MAPA = 0xBF73B0D7
STORAGE_C_MAPA = 0x742F6372
STORAGE_D_MAPA = 0x692A53CA
TEMPLE_ACCESS_MAPA = 0x038D5779
TRANSIT_STATION_MAPA = 0x501C3E9D
TRANSPORT_CENTER_MAPA = 0x620A4C84
TRANSPORT_TO_SANCTUARY_FORTRESS_MAPA = 0xEF5EA06C
TRANSPORT_TO_TEMPLE_GROUNDS_MAPA = 0x7E1BC16F
TRANSPORT_TO_TORVUS_BOG_MAPA = 0x8E9B3B3F
TRIAL_GROUNDS_MAPA = 0xAF14500A
TRIAL_TUNNEL_MAPA = 0x6131B5CB
VENTILATION_AREA_A_MAPA = 0xADE5C6E8
VENTILATION_AREA_B_MAPA = 0x709EC836
WARRIORS_WALK_MAPA = 0x1A2F3728
WATERING_HOLE_MAPA = 0xB2FEB97B

NAME_TO_ID_MAPA = {
"Agon Energy Controller": 0x2B29CC2A,
"Agon Map Station": 0xAD897E9A,
"Agon Temple": 0x5C296193,
"Battleground": 0xC3ACA911,
"Bioenergy Production": 0x3A92F695,
"Biostorage Access": 0xF73EED55,
"Biostorage Station": 0xA95C97D4,
"Bitter Well": 0x2D243AE5,
"Central Mining Station": 0xDC73224F,
"Central Station Access": 0xD7BC1BFE,
"Command Center": 0x1817AE6A,
"Command Center Access": 0x59567CC4,
"Controller Access": 0x968662FD,
"Crossroads": 0xA7F62002,
"Dark Agon Energy Controller": 0x9E08BB3B,
"Dark Agon Temple": 0x5CA0FFB7,
"Dark Agon Temple Access": 0x08D63393,
"Dark Controller Access": 0x8B26BCEC,
"Dark Oasis": 0xB02E6E42,
"Dark Transit Station": 0xFEEB3655,
"Doomed Entry": 0x8D4A7150,
"Double Path": 0x563AB806,
"Duelling Range": 0x16892404,
"Feeding Pit": 0x2E8F8DD6,
"Feeding Pit Access": 0xC9E03B98,
"Hall of Stairs": 0x44C3BCBD,
"Ing Cache 1": 0x7B43D48B,
"Ing Cache 2": 0xBACD0B4B,
"Ing Cache 3": 0x93F61EC8,
"Ing Cache 4": 0xEC1232EE,
"Judgment Pit": 0x42A20280,
"Junction Site": 0x3FDD3E5E,
"Main Energy Controller": 0xF0FD6BFE,
"Main Reactor": 0xE50C08A3,
"Mine Shaft": 0xFE74AF0C,
"Mining Plaza": 0x6BAA56A7,
"Mining Station A": 0xCA6B0942,
"Mining Station Access": 0xA4AF84B1,
"Mining Station B": 0xF2AED7D0,
"Oasis Access": 0xDB193F23,
"Phazon Site": 0x09DB0EDA,
"Plaza Access": 0x842D721A,
"Portal Access": 0xA007BDC0,
"Portal Access A": 0x0AC71520,
"Portal Site": 0x96AAAC11,
"Portal Terminal": 0x0218BF9A,
"Sand Cache": 0xDD640C1A,
"Sand Processing": 0x8D673043,
"Sandcanyon": 0xCC62DD15,
"Save Station 1": 0x73C0B513,
"Save Station 2": 0x85F5B4B6,
"Save Station 3": 0x2BAC0CD2,
"Save Station A": 0x79D48A6F,
"Save Station C": 0x90ACAD11,
"Security Station A": 0xDEF659A7,
"Security Station B": 0x230FA1D2,
"Storage A": 0x39E7C279,
"Storage B": 0xBF73B0D7,
"Storage C": 0x742F6372,
"Storage D": 0x692A53CA,
"Temple Access": 0x038D5779,
"Transit Station": 0x501C3E9D,
"Transport Center": 0x620A4C84,
"Transport to Sanctuary Fortress": 0xEF5EA06C,
"Transport to Temple Grounds": 0x7E1BC16F,
"Transport to Torvus Bog": 0x8E9B3B3F,
"Trial Grounds": 0xAF14500A,
"Trial Tunnel": 0x6131B5CB,
"Ventilation Area A": 0xADE5C6E8,
"Ventilation Area B": 0x709EC836,
"Warrior's Walk": 0x1A2F3728,
"Watering Hole": 0xB2FEB97B,
}

DOCK_NAMES = {
"Agon Energy Controller": {
Expand Down
9 changes: 8 additions & 1 deletion open_prime_rando/echoes/asset_ids/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

FRONTEND04_MREA = 0xCEE3AF0D

NAME_TO_ID = {
NAME_TO_ID_MREA = {
"FrontEnd04": 0xCEE3AF0D,
}
# Generated by asset_id_files.py

FRONTEND04_MAPA = 0xE7365430

NAME_TO_ID_MAPA = {
"FrontEnd04": 0xE7365430,
}

DOCK_NAMES = {
"FrontEnd04": {
Expand Down
31 changes: 30 additions & 1 deletion open_prime_rando/echoes/asset_ids/great_temple.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
TRANSPORT_B_ACCESS_MREA = 0xFEB7BD27
TRANSPORT_C_ACCESS_MREA = 0x1A4DDCC0

NAME_TO_ID = {
NAME_TO_ID_MREA = {
"Controller Transport": 0x11E50BC6,
"Main Energy Controller": 0x02A01334,
"Sanctum": 0xD7C3B839,
Expand All @@ -27,6 +27,35 @@
"Transport B Access": 0xFEB7BD27,
"Transport C Access": 0x1A4DDCC0,
}
# Generated by asset_id_files.py

CONTROLLER_TRANSPORT_MAPA = 0x3830F0FB
MAIN_ENERGY_CONTROLLER_MAPA = 0x2B75E809
SANCTUM_MAPA = 0xFE164304
SANCTUM_ACCESS_MAPA = 0xE27873A6
SKY_TEMPLE_ENERGY_CONTROLLER_MAPA = 0x529F0152
TEMPLE_SANCTUARY_MAPA = 0x8B1E850F
TEMPLE_TRANSPORT_A_MAPA = 0x318EBBCD
TEMPLE_TRANSPORT_B_MAPA = 0xA6D44A39
TEMPLE_TRANSPORT_C_MAPA = 0xB1B5308D
TRANSPORT_A_ACCESS_MAPA = 0xCE4F5493
TRANSPORT_B_ACCESS_MAPA = 0xD762461A
TRANSPORT_C_ACCESS_MAPA = 0x339827FD

NAME_TO_ID_MAPA = {
"Controller Transport": 0x3830F0FB,
"Main Energy Controller": 0x2B75E809,
"Sanctum": 0xFE164304,
"Sanctum Access": 0xE27873A6,
"Sky Temple Energy Controller": 0x529F0152,
"Temple Sanctuary": 0x8B1E850F,
"Temple Transport A": 0x318EBBCD,
"Temple Transport B": 0xA6D44A39,
"Temple Transport C": 0xB1B5308D,
"Transport A Access": 0xCE4F5493,
"Transport B Access": 0xD762461A,
"Transport C Access": 0x339827FD,
}

DOCK_NAMES = {
"Controller Transport": {
Expand Down
9 changes: 8 additions & 1 deletion open_prime_rando/echoes/asset_ids/m01_sidehopperstation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

SIDEHOPPERSTATION_MREA = 0x02690DE1

NAME_TO_ID = {
NAME_TO_ID_MREA = {
"01_SidehopperStation": 0x02690DE1,
}
# Generated by asset_id_files.py

SIDEHOPPERSTATION_MAPA = 0x2BBCF6DC

NAME_TO_ID_MAPA = {
"01_SidehopperStation": 0x2BBCF6DC,
}

DOCK_NAMES = {
"01_SidehopperStation": {
Expand Down
9 changes: 8 additions & 1 deletion open_prime_rando/echoes/asset_ids/m02_spires.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

MULTI_SPIRES_MREA = 0x09749B2F

NAME_TO_ID = {
NAME_TO_ID_MREA = {
"07_Multi_Spires": 0x09749B2F,
}
# Generated by asset_id_files.py

MULTI_SPIRES_MAPA = 0x20A16012

NAME_TO_ID_MAPA = {
"07_Multi_Spires": 0x20A16012,
}

DOCK_NAMES = {
"07_Multi_Spires": {
Expand Down
9 changes: 8 additions & 1 deletion open_prime_rando/echoes/asset_ids/m03_crossfirechaos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

CROSSFIRECHAOS_MREA = 0x44D34A2E

NAME_TO_ID = {
NAME_TO_ID_MREA = {
"03_CrossfireChaos": 0x44D34A2E,
}
# Generated by asset_id_files.py

CROSSFIRECHAOS_MAPA = 0x6D06B113

NAME_TO_ID_MAPA = {
"03_CrossfireChaos": 0x6D06B113,
}

DOCK_NAMES = {
"03_CrossfireChaos": {
Expand Down
9 changes: 8 additions & 1 deletion open_prime_rando/echoes/asset_ids/m04_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

MULTI_PIPELINE_MREA = 0x845DCF93

NAME_TO_ID = {
NAME_TO_ID_MREA = {
"04_Multi_Pipeline": 0x845DCF93,
}
# Generated by asset_id_files.py

MULTI_PIPELINE_MAPA = 0xAD8834AE

NAME_TO_ID_MAPA = {
"04_Multi_Pipeline": 0xAD8834AE,
}

DOCK_NAMES = {
"04_Multi_Pipeline": {
Expand Down
9 changes: 8 additions & 1 deletion open_prime_rando/echoes/asset_ids/m05_spidercomplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

MULTI_SPIDERCOMPLEX_MREA = 0xE7095052

NAME_TO_ID = {
NAME_TO_ID_MREA = {
"05_Multi_spiderComplex": 0xE7095052,
}
# Generated by asset_id_files.py

MULTI_SPIDERCOMPLEX_MAPA = 0xCEDCAB6F

NAME_TO_ID_MAPA = {
"05_Multi_spiderComplex": 0xCEDCAB6F,
}

DOCK_NAMES = {
"05_Multi_spiderComplex": {
Expand Down
Loading

0 comments on commit b489ebe

Please sign in to comment.