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

Rename special map constants, treat warp ids as strings #1755

Merged
merged 2 commits into from
Oct 19, 2022

Conversation

GriffinRichards
Copy link
Member

@GriffinRichards GriffinRichards commented Aug 26, 2022

NOTE: The following script will automate the changes in this PR
https://gist.github.com/huderlem/b4e342f44093cb40971b36b5aed411c0

This addresses two changes that are breaking changes for Porymap 4.5.0.

  • The map constant currently called MAP_NONE is a special indicator value used exclusively by dynamic warps (warps with more than one potential destination). It's been renamed to MAP_DYNAMIC. MAP_UNDEFINED could reasonably take the name MAP_NONE, but this would be likely to silently break downstream changes.
  • Treat warp ids as strings. This allows constants to be used for them (which happens in vanilla for dynamic warps). This was done with a basic regex find ("dest_warp_id": ([0-9]+)) and replace ("dest_warp_id": "\1") in Sublime Text.

As usual this has been opened as a draft until a version of Porymap is released that supports these changes.

@GriffinRichards GriffinRichards changed the base branch from master to porymap-5 September 30, 2022 05:32
@GriffinRichards GriffinRichards marked this pull request as ready for review October 19, 2022 02:45
@GriffinRichards GriffinRichards merged commit a418f8d into pret:porymap-5 Oct 19, 2022
@GriffinRichards GriffinRichards deleted the map-dynamic branch October 19, 2022 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant