-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature/elevator map updates #255
Feature/elevator map updates #255
Conversation
- The colored arrows and text showing destination region on transporters are now updated - Elevator/Shuttle/Spaceball icons show the region/transporter they connect to (i.e. "TRANSPORT CAPSULE TO FERENIA - CENTRAL UNIT") - Room names are updated to show transport destinations (randovania-side change) - This depends on a sister branch in RDV, under steven11sjf/randovania : feature/dread-map-transport - added a value for transport connection name to the schema
for more information, see https://pre-commit.ci
usable.sScenarioName = elevator["destination"]["scenario"] | ||
usable.sTargetSpawnPoint = elevator["destination"]["actor"] | ||
_patch_actor(editor, elevator) | ||
_patch_minimap_arrows(editor, elevator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's future proof this and avoid calling these functions if we're dealing with a Teleportal
coords: tuple[int, int] | ||
disabled_id: str | ||
prefix: str | ||
offset: tuple[int, int] = (0, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you anticipate this field being used? if not, just remove it imo
class TransporterIcon: | ||
default_icon_id: str | ||
coords: tuple[int, int] | ||
disabled_id: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo give this a default of ''
- new function gets the usable, checks if its type is a elevator, train or capsule, and returns the usable - refactored TransporterIcon dataclass
…ven11sjf/open-dread-rando into feature/elevator-map-updates
for more information, see https://pre-commit.ci
|
||
class TransporterType(Enum): | ||
ELEVATOR = "ELEVATOR" | ||
TELEPORTER = "TELEPORTER" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be TRANSPORT
and TELEPORTAL
default_icon_id="UsableElevator", | ||
coords=(2,4), | ||
prefix="ELEVATOR TO ", | ||
disabled_id="DisabledElevator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's best to have a trailing comma for things like this to keep diffs cleaner
return TransporterType.TELEPORTER, usable | ||
else: | ||
raise ValueError(f"Elevator {elevator['teleporter']['scenario']}/{elevator['teleporter']['actor']} " | ||
"is not an elevator, shuttle, capsule or teleporter!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include the type of the usable in the error message too
try: | ||
usable = actor.pComponents.USABLE | ||
except AttributeError: | ||
raise ValueError(f'Actor {elevator["teleporter"]} is not a teleporter') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be "is not usable"
_patch_minimap_arrows(editor, elevator) | ||
_patch_map_icon(editor, elevator) | ||
else: | ||
# TODO implement teleporter rando |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw in _patch_actor
here for now, for the benefit of plando ppl
oh yeah also fix tests pls |
- updated test json by removing most elevator entries and keeping one correct one for schema validation - minor elevator.py fixes
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #255 +/- ##
==========================================
- Coverage 88.77% 0.00% -88.78%
==========================================
Files 35 35
Lines 1897 1946 +49
==========================================
- Hits 1684 0 -1684
- Misses 213 1946 +1733
☔ View full report in Codecov by Sentry. |
|
||
class TransporterType(Enum): | ||
TRANSPORT = "TRANSPORT" | ||
TELEPORTER = "TELEPORTER" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TELEPORTAL
!!!!!!!
!!!
Required for randovania/randovania#5070
Room names are updated to show where a transport goes (RDV-side change).
Minimap is updated to show destination region on the colored arrows from each transport.
Usable icon for the transport now shows the destination.