forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Consolidate type properties #4185
Merged
AsparagusEduardo
merged 13 commits into
rh-hideout:upcoming
from
fdeblasio:consolidateTypes
Mar 12, 2024
Merged
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
898e754
Moved gTypeNames into gTypes
fdeblasio a701486
Added invalid move text to struct
fdeblasio 4d9c381
Added max move to struct
fdeblasio 8d10ac7
Added icon palette to struct
fdeblasio 545daef
Added macros for invalid and max moves
fdeblasio c1c6de3
Swapped palette and max move order
fdeblasio b9db91a
Renamed invalid to generic
fdeblasio 13c0896
Renamed invalid to generic in struct definition
fdeblasio ac2b0d4
Added zMoves and items to type struct
fdeblasio 259d2f7
Addressed comments
fdeblasio 920887f
Incorporated newer comments
fdeblasio 46c0047
Merge branch 'upcoming' into consolidateTypes
fdeblasio d8e01a1
Updated comment format
fdeblasio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Hmm, while useful as a reference for items associated to new types, the item fields aren't being used anywere in the code. Maybe adding them as comments as a reminder would be better if you're not planning in adding changes to the battle code.
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.
If this PR doesn't make any changes to the battle code (which I'm fine with) can that be captured in a later issue?
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.
I don't feel confortable introducing fields and data that aren't used at all :/
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.
I have to agree that if we add this information we may as well be using it in the same PR
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.
Plus, there's also the fact that you'd be moving data away from
gItemsInfo
, where most item info is stored.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.
I thought the idea was that some of these fields exist mostly to facilitate uses like psf's? Are there any official features which would want to know, e.g. "which Gem is associated with an arbitrary type?"
EDIT: I guess what I'm trying to say is that these could be useful even if they had zero uses throughout base Expansion.
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.
largely agree with @mrgriffin
This has never been a principle we've had in expansion
Like if we want to introduce that principle, I think its a different discussion entirely, but I don't want to hold this PR to a standard that doesn't actually exist yet
gItemsInfo
doesn't appear in the PR at all, nothing is being moved out of there (unless I'm missing something).I don't think its unreasonable or unusual to
I am trying not to unnecessarily bloat the scope of this PR.
that being said, I think everybody is happy if
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.
There's a difference between having Species data ready to use for the user for PoryMap and scripts and having data available for edge cases that need to write a custom function to use that data.
Same with this, the new function is used in scripts to set up pre-battle conditions without the need to write custom code for it.
Which function? Are you talking about
ReturnHeightStringNoWhitespace
? Because that's certainly being used by the Lotad/Seedot house.I meant in context that if you were to use this data, you'd have to remove it from
gItemsInfo
to avoid reduncancy.Sounds good to me at least. Again, this info is useful as a reference, for adding new types, but it also needs a reason to justify adding unused data into the rom.
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.
I think both have value, depending on whether you're going from type to item, or item to type; so you wouldn't want to move anything. (That's why earlier I suggested writing some quick tests that verify that if a type maps to something, the thing it maps to maps back to that type)