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.
Description
Alex left a comment on #4794 that sounded really sweet, and after noodling with it a bit with he and Egg we've unfortunately determined it's just not a good solution in this specific context in spite of how cool an idea it is, because the requirement for two different array index orders for the different switching behaviours mean we awkwardly need multiple enums and the nonzero array initialization to PARTY_SIZE makes it awkward to replace the big series of ID defines at the top of the
GetBestMonIntegrated
function. Unfortunate.That aside, one of the primary goals was to try to make the conditionals section a bit more readable, and Egg had this sweet suggestion for structuring them in the way I've done here. Also taken this opportunity to fix a typo of "per say" to "per se" which is definitely not either my or Egg's fault, adjust a few comments that referenced functions that no longer exist in the conditional block, and swap over the file's remaining
gItemsInfo
uses to the newItemID_
ones.This is a very minor refactor, but given that there are 3 tiny changes that would be nice to have I figured it was worth submitting now before we all forgot about it between now and whenever we add another feature in this section of the codebase.
People who collaborated with me on this PR
Egg, Alex and Duke
Discord contact info
@Pawkkie