Skip to content

Commit

Permalink
Merge pull request #45 from randovania/feature/more-door-art
Browse files Browse the repository at this point in the history
more door art
  • Loading branch information
duncathan authored Jun 26, 2023
2 parents 10ecef5 + e3c8fab commit fb4eb11
Show file tree
Hide file tree
Showing 22 changed files with 93 additions and 18 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 7 additions & 1 deletion src/open_prime_rando/echoes/dock_lock_rando/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ def get_txtr(n: str, must_exist: bool = True) -> AssetId:
greyscale_emissive = get_txtr("custom_door_lock_greyscale_emissive.TXTR")
template = editor.get_parsed_asset(0xF115F575, type_hint=Cmdl)

for name in ("darkburst", "sunburst", "sonicboom", "screwattack", "echo_visor"):
for door_type in DOCK_TYPES.values():
if not (
isinstance(door_type, dock_type.BlastShieldDoorType)
and isinstance(door_type.shield_model, str)
):
continue
name = door_type.shield_model
txtr = get_txtr(f"custom_door_lock_{name}.TXTR")
emissive = get_txtr(f"custom_door_lock_{name}_emissive.TXTR", must_exist=False)
if emissive is None:
Expand Down
6 changes: 5 additions & 1 deletion src/open_prime_rando/echoes/dock_lock_rando/dock_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ def patch_door(self, editor: PatcherEditor, world_name: str, area_name: str, doc
unknown=False
))

model = editor._resolve_asset_id(self.shield_model)
shield_model = self.shield_model
if isinstance(shield_model, str):
shield_model = f"custom_door_lock_{shield_model}.CMDL"
model = editor._resolve_asset_id(shield_model)

lock = default.add_instance_with(Actor(
editor_properties=EditorProperties(
name=f"{self.name} Blast Shield Lock",
Expand Down
65 changes: 55 additions & 10 deletions src/open_prime_rando/echoes/dock_lock_rando/dock_type_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"Analysis indicates that the Blast Shield is invulnerable to most weapons. The Screw Attack may damage it."
),
map_icon=DoorMapIcon.ScrewAttack,
shield_model="custom_door_lock_screwattack.CMDL",
shield_model="screw_attack",
),
"Bomb": dock_type.BlastShieldDoorType(
name="Bomb",
Expand All @@ -137,7 +137,7 @@
"A Morph Ball Bomb blast may damage it."
),
map_icon=DoorMapIcon.Bomb,
shield_model="custom_door_lock_sonicboom.CMDL",
shield_model="morph_ball_bombs",
),
"Boost": dock_type.BlastShieldDoorType(
name="Boost",
Expand All @@ -153,7 +153,7 @@
"Analysis indicates that the Blast Shield is invulnerable to most weapons. The Boost Ball may damage it."
),
map_icon=DoorMapIcon.Boost,
shield_model=0xBFB4A8EE,
shield_model="boost_ball",
),
"Grapple": dock_type.GrappleDoorType(
name="Grapple",
Expand All @@ -179,7 +179,7 @@
"A massive burst of dark energy may damage it."
),
map_icon=DoorMapIcon.Dark,
shield_model="custom_door_lock_darkburst.CMDL",
shield_model="darkburst",
),
"Sunburst": dock_type.BlastShieldDoorType(
name="Sunburst",
Expand All @@ -192,7 +192,7 @@
"A massive burst of light energy may damage it."
),
map_icon=DoorMapIcon.Light,
shield_model="custom_door_lock_sunburst.CMDL",
shield_model="sunburst",
),
"SonicBoom": dock_type.BlastShieldDoorType(
name="SonicBoom",
Expand All @@ -205,7 +205,7 @@
"A massive burst of light and dark energy may damage it."
),
map_icon=DoorMapIcon.Annihilator,
shield_model="custom_door_lock_sonicboom.CMDL",
shield_model="sonic_boom",
),
"AgonEnergy": dock_type.PlanetaryEnergyDoorType(
name="AgonEnergy",
Expand Down Expand Up @@ -249,11 +249,11 @@
shell_color=Color(1/16, 1/16, 1/16, 1),
scan_text=(
"There is a Blast Shield on the door blocking access. ",
"Sonic detection gear needed to interface with this system."
"Sonic detection gear needed to interface with this system. "
"Neutralizing the control emitter may disable it."
),
map_icon=DoorMapIcon.EchoVisor,
shield_model="custom_door_lock_echo_visor.CMDL",
shield_model="echo_visor",
visor_flags=VisorFlags.Echo,
player_controller_proxy=8,
),
Expand All @@ -264,12 +264,57 @@
shell_color=Color(1, 0, 0, 1),
scan_text=(
"There is a Blast Shield on the door blocking access. ",
"Scans indicate presence of a control system."
"Scans indicate presence of a control system. "
"Interface method unknown. Control units not present in the visible spectrum or current timespace. "
),
map_icon=DoorMapIcon.DarkVisor,
shield_model=0xBFB4A8EE,
shield_model="dark_visor",
visor_flags=VisorFlags.Dark,
player_controller_proxy=7,
),
"Cannon": dock_type.BlastShieldDoorType(
name="Cannon",
vulnerability=dataclasses.replace(
resist_all_vuln,
cannon_ball=vulnerable_no_splash
),
shell_model=normal_door_model,
shell_color=Color(1, 1/3, 0, 1),
scan_text=(
"There is a Blast Shield on the door blocking access. ",
"Analysis indicates that the Blast Shield is invulnerable to most weapons. The Cannon Ball may damage it."
),
map_icon=DoorMapIcon.Boost,
shield_model="cannon_ball",
),
"Charge": dock_type.BlastShieldDoorType(
name="Charge",
vulnerability=dataclasses.replace(
resist_all_vuln,
power_charge=vulnerable,
entangler=vulnerable,
light_blast=vulnerable,
sonic_boom=vulnerable,
),
shell_model=normal_door_model,
shell_color=Color(0, 1, 1, 1),
scan_text=(
"There is a Blast Shield on the door blocing access. ",
"Analysis indicates that the Blast Shield is invulnerable to normal beam fire. "
"The Charge Beam may damage it."
),
map_icon=DoorMapIcon.Normal,
shield_model="charge_beam"
),
"Power": dock_type.NormalDoorType(
name="Power",
vulnerability=dataclasses.replace(resist_all_vuln, power=vulnerable),
shell_color=Color(1, 0.8, 0, 1),
scan_text=(
"There is a Blast Shield on the door blocking access. ",
"Analysis indicates that the Blast Shield is invulnerable to light and dark energy. "
"The Power Beam may damage it."
),
map_icon=DoorMapIcon.PowerBomb # TODO: give it its own?
)
}
5 changes: 4 additions & 1 deletion src/open_prime_rando/echoes/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@
"TorvusEnergy",
"SanctuaryEnergy",
"DarkVisor",
"EchoVisor"
"EchoVisor",
"Cannon",
"Charge",
"Power"
]
},
"area_identifier": {
Expand Down
27 changes: 22 additions & 5 deletions tests/echoes/test_echoes_dock_lock_rando.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,30 @@
'custom_door_lock_echo_visor.TXTR': 3456085708,
'custom_door_lock_echo_visor_emissive.TXTR': 1855515304,
'custom_door_lock_greyscale_emissive.TXTR': 3597936245,
'custom_door_lock_screwattack.CMDL': 1232841653,
'custom_door_lock_screwattack.TXTR': 781552186,
'custom_door_lock_screwattack_emissive.TXTR': 1230915219,
'custom_door_lock_sonicboom.CMDL': 1368621368,
'custom_door_lock_sonicboom.TXTR': 914202807,
'custom_door_lock_boost_ball.CMDL': 3448653349,
'custom_door_lock_boost_ball.TXTR': 2858444714,
'custom_door_lock_boost_ball_emissive.TXTR': 679049133,
'custom_door_lock_cannon_ball.CMDL': 3063077393,
'custom_door_lock_cannon_ball.TXTR': 3514629022,
'custom_door_lock_cannon_ball_emissive.TXTR': 3792718965,
'custom_door_lock_charge_beam.CMDL': 3005557644,
'custom_door_lock_charge_beam.TXTR': 3570076163,
'custom_door_lock_charge_beam_emissive.TXTR': 1595153749,
'custom_door_lock_dark_visor.CMDL': 2145020805,
'custom_door_lock_dark_visor.TXTR': 406080010,
'custom_door_lock_dark_visor_emissive.TXTR': 775355676,
'custom_door_lock_morph_ball_bombs.CMDL': 3083075990,
'custom_door_lock_morph_ball_bombs.TXTR': 3492421657,
'custom_door_lock_morph_ball_bombs_emissive.TXTR': 805979281,
'custom_door_lock_screw_attack.CMDL': 1760304179,
'custom_door_lock_screw_attack.TXTR': 251805116,
'custom_door_lock_screw_attack_emissive.TXTR': 1723694793,
'custom_door_lock_sonic_boom.CMDL': 1667093720,
'custom_door_lock_sonic_boom.TXTR': 78902615,
'custom_door_lock_sonic_boom_emissive.TXTR': 2606270890,
'custom_door_lock_sunburst.CMDL': 987291923,
'custom_door_lock_sunburst.TXTR': 1563869340,
'custom_door_lock_sunburst_emissive.TXTR': 2638796108,
}


Expand Down

0 comments on commit fb4eb11

Please sign in to comment.