AdvancedPeripherals
AdvancedPeripherals copied to clipboard
fix: ME Bridge: Add support for child classes created by other mods
PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION
- Please check if the PR fulfills these requirements
- [x] The commit message are well described
- [x] (not needed) Docs have been added / updated (for features or maybe bugs which were noted). If not, please update the needed documentation here. This is not mandatory
- [x] All changes have fully been tested
- What kind of change does this PR introduce? (Bug fix, feature, ...)
When adding some methods for AE2 network usage, https://github.com/IntelligenceModding/AdvancedPeripherals/pull/404 seems to not have taken into account portable cells. Right now, these cells can be put in a AE2 Drive, but won't be counted by methods like
getTotalItemStorage()
Looking around the source, it seems like IBasicCellItem is a common interface for classical and portable cells, so I used it instead.
-
What is the current behavior? (You can also link to an open issue here) See above
-
What is the new behavior (if this is a feature change)? See above
-
Does this PR introduce a breaking change? (What changes might users need to make in their scripts due to this PR?) No
-
Other information:
Oops sorry, I targeted 1.20 instead of 1.19. Want me to create another PR ? You might need to cherry-pick to the other branch in any case tho
After more investigation I found another problem that affected me: the "ME Extended Drive" from ExtendedAE, which is a child class of DriveBlockEntity, wasn't read.
I also fixed this in this PR, and renamed it accordingly
In the long term, a better solution would be to directly integrate with ExtendedAE since there are other stuff that doesn't work (for example their "ME Tag Storage Bus", which isn't a child class of anything interesting at first glance, except maybe IStorageProvider)
Oops sorry, I targeted 1.20 instead of 1.19. Want me to create another PR ? You might need to cherry-pick to the other branch in any case tho
It's okay for now, not a big deal But targeting 1.19 the next time would be nice
Your PR looks solid, I'm gonna test this a bit in the course of the day