refactor: add EquipmentInfo struct for cleaner equipment getter returns#17
Open
refactor: add EquipmentInfo struct for cleaner equipment getter returns#17
Conversation
694018f to
3b50e55
Compare
8a4b36f to
a268d44
Compare
3b50e55 to
d52773e
Compare
a268d44 to
209bf5e
Compare
- Add EquipmentInfo struct to Types.sol for grouped equipment data - Update _getEquippableWeapons to return EquipmentInfo struct - Update _getEquippableArmor to return EquipmentInfo struct - Update pollForFrontendData to use the new struct return values - Improves code readability by grouping related return values
d52773e to
07dd6e8
Compare
This file contains hidden or 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
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.
Summary
EquipmentInfostruct to group equipment-related return valuesChanges
EquipmentInfostruct to Types.sol containing:itemIDs: Array of equipment IDsitemNames: Array of equipment namescurrentItemID: Currently equipped item ID_getEquippableWeapons()to returnEquipmentInfostruct_getEquippableArmor()to returnEquipmentInfostructpollForFrontendData()to destructure the struct valuesBenefits
Test plan