AdvancedPeripherals icon indicating copy to clipboard operation
AdvancedPeripherals copied to clipboard

fix: ME Bridge: Add support for child classes created by other mods

Open iTrooz opened this issue 1 year ago • 2 comments

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:

iTrooz avatar Apr 06 '24 01:04 iTrooz

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

iTrooz avatar Apr 06 '24 01:04 iTrooz

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)

iTrooz avatar Apr 06 '24 16:04 iTrooz

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

SirEndii avatar Apr 10 '24 10:04 SirEndii