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 DarkSteel and other EIO items display #7

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

ghostflyby
Copy link

DarkSteel tools and armors implement their isDamaged() method as returning a constant false, causing handleDefault to return null on such items when ShowWhenFull config set to true.

In order not to add a extra check for handleDefault, changes are made inside handleDarkSteelItems method.

Other possible, but in my opinion, problematic fixes are there.

  1. This can also be fixed on the EIO side, but such a wired constant false might be intended for other uses which is far beyond my knowing.
  2. A simple fix could be changing the handleDefault to check item damage by comparing max and current, but other mods might override the isDamaged method too to do something else.

As a result this PR might seem more complex then it might should have been.

in order not to add a extra check for `handleDefault`, changes are made inside `handleDarkSteelItems`.
@Caedis
Copy link
Member

Caedis commented Aug 3, 2023

Huh, I didnt even think to check how EIO handled damaged items. Good catch

@Caedis Caedis merged commit 078b590 into GTNewHorizons:master Aug 3, 2023
@ghostflyby ghostflyby deleted the fix_darksteel_display branch August 3, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants