forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Egg Move Refactor #4534
Merged
Merged
Egg Move Refactor #4534
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
AlexOn1ine
reviewed
May 17, 2024
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.
Tried running the script in my repo and got this:
egg_move_refactor.py:18: SyntaxWarning: invalid escape sequence '\('
for mon in re.findall("egg_moves\((.*),", data):
egg_move_refactor.py:26: SyntaxWarning: invalid escape sequence '\('
data = re.sub(" egg_moves\(%s," % mon, "static const u16 s%sEggMoveLearnset[] = {" % monname, data)
egg_move_refactor.py:28: SyntaxWarning: invalid escape sequence '\)'
data = re.sub("\),\n", ",\n MOVE_UNAVAILABLE,\n};\n", data) # add terminator to each old macro
egg_move_refactor.py:42: SyntaxWarning: invalid escape sequence '\.'
data = re.sub("\.teachableLearnset = s%sTeachableLearnset,\n" % mon, ".teachableLearnset = s%sTeachableLearnset,\n .eggMoveLearnset = s%sEggMoveLearnset,\n" % (mon, mon), data)
egg_move_refactor.py:44: SyntaxWarning: invalid escape sequence '\.'
macrocheck = re.findall("\.teachableLearnset = s%sTeachableLearnset,( *)\\\\" % mon, data)
egg_move_refactor.py:46: SyntaxWarning: invalid escape sequence '\.'
data = re.sub("\.teachableLearnset = s%sTeachableLearnset,%s\\\\" % (mon, macrocheck[0]), ".teachableLearnset = s%sTeachableLearnset,%s\\\\\n .eggMoveLearnset = s%sEggMoveLearnset,%s\\\\" % (mon, macrocheck[0], mon, " " * (len(macrocheck[0]) + 4)), data)
Edit: it seems like the script did it's thing though
Ah, this is me not making it raw strings again. I'll try to fix it |
AlexOn1ine
approved these changes
May 19, 2024
This was referenced May 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supersedes #4488 with a clean git history and a migration script
Description
Refactors Egg moves so they're not a giant array with weird offsets anymore but rather structured lists like the teachable learnsets. All functionality is otherwise kept as similar to the original as possible, so this should not cause any real issues with feature branches.
egg_moves.h
as well as thegBaseStats
files are exactly as they would be when running the migration script on the current version of upcoming.Issue(s) that this PR fixes
Fixes #3653
Discord contact info
bassoonian