Skip to content
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

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

Merged
merged 9 commits into from
Apr 11, 2024

Conversation

iTrooz
Copy link
Contributor

@iTrooz iTrooz commented Apr 6, 2024

PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION

  • Please check if the PR fulfills these requirements
  • The commit message are well described
  • (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
  • 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, Added some methods to the MEBridge #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
Copy link
Contributor Author

iTrooz commented Apr 6, 2024

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 iTrooz changed the title ME Bridge: use IBasicCellItem interface instead of BasicStorageCell to recognize portable cells fix: ME Bridge: use IBasicCellItem interface instead of BasicStorageCell to recognize portable cells Apr 6, 2024
@iTrooz
Copy link
Contributor Author

iTrooz commented Apr 6, 2024

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 iTrooz changed the title fix: ME Bridge: use IBasicCellItem interface instead of BasicStorageCell to recognize portable cells fix: ME Bridge: Add support for child classes created by other mods Apr 6, 2024
@SirEndii SirEndii self-requested a review April 10, 2024 10:07
@SirEndii
Copy link
Member

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 SirEndii merged commit 4036e91 into IntelligenceModding:dev/1.20.1 Apr 11, 2024
2 checks passed
@iTrooz iTrooz deleted the portable branch April 11, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants