BaseMod icon indicating copy to clipboard operation
BaseMod copied to clipboard

The Unlock screen has some visual bugs

Open BlackSharpYL opened this issue 7 years ago • 4 comments

20181005173357 20181005173637

BlackSharpYL avatar Oct 06 '18 00:10 BlackSharpYL

Card illustrations should not be "Beta" and relics should not be that small...

BlackSharpYL avatar Oct 06 '18 00:10 BlackSharpYL

The relics issue appears to be because relics are intended to also supply a 256x256 "largeRelics" version of their image.

com.megacrit.cardcrawl.neow.NeowUnlockScreen:open() calls com.megacrit.cardcrawl.relics.AbstractRelic:loadLargeImage() which attempts to fill in the largeImage texture from images/largeRelics/.

However, basemod.abstracts.CustomRelic just populates the largeImage with the same texture used for the regular image size.

Seeonee avatar Mar 16 '19 18:03 Seeonee

I've made a patch for this; however, it would technically override anyone who was using CustomRelic but then going in and manually replacing AbstractRelic.largeImg with their own (properly large) Texture.

Seeonee avatar Mar 16 '19 19:03 Seeonee

Note: an alternative fix would be to just leave largeImg null in the CustomRelic constructor. The largeImg field is only actually used in two ways within SlayTheSpire:

  • AbstractRelic.render() has logic to render the largeImg if it exists and if you're on the NeowUnlockScreen. Leaving it null would allow the alternate "upscale the default image" logic to fire (similar to my pull request, but way simpler).
  • SingleRelicViewPopup.initializeLargeImg() tries to load the same image path, but doesn't actually use the AbstractRelic.largeImg field. This means that leaving it null won't change the current behavior: initializeLargeImg() will still try (and fail) to load a nonexistent image. That's (already) fine, because SingleRelicViewPopup.renderRelicImage() also has "upscale the default image" logic if the largeImg it loaded is null.

Seeonee avatar Mar 17 '19 00:03 Seeonee