v2.5.0: fixed some visual errors in new catalogs

This commit is contained in:
Evan Debenham
2024-08-21 11:10:13 -04:00
parent d24be97d11
commit d1c2d87d55
5 changed files with 20 additions and 1 deletions

View File

@@ -149,6 +149,10 @@ public class Potion extends Item {
public static void initColors() {
handler = new ItemStatusHandler<>( (Class<? extends Potion>[])Generator.Category.POTION.classes, colors );
}
public static void clearColors() {
handler = null;
}
public static void save( Bundle bundle ) {
handler.save( bundle );

View File

@@ -76,6 +76,10 @@ public class Ring extends KindofMisc {
public static void initGems() {
handler = new ItemStatusHandler<>( (Class<? extends Ring>[])Generator.Category.RING.classes, gems );
}
public static void clearGems(){
handler = null;
}
public static void save( Bundle bundle ) {
handler.save( bundle );

View File

@@ -104,6 +104,10 @@ public abstract class Scroll extends Item {
public static void initLabels() {
handler = new ItemStatusHandler<>( (Class<? extends Scroll>[])Generator.Category.SCROLL.classes, runes );
}
public static void clearLabels(){
handler = null;
}
public static void save( Bundle bundle ) {
handler.save( bundle );

View File

@@ -26,6 +26,9 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.journal.Journal;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
@@ -57,6 +60,10 @@ public class JournalScene extends PixelScene {
Badges.loadGlobal();
Journal.loadGlobal();
Potion.clearColors();
Scroll.clearLabels();
Ring.clearGems();
Music.INSTANCE.playTracks(
new String[]{Assets.Music.THEME_1, Assets.Music.THEME_2},
new float[]{1, 1},

View File

@@ -926,7 +926,7 @@ public class WndJournal extends WndTabbed {
} else {
icon.lightness(0f);
title = "???";
desc = Messages.get(CatalogTab.class, "not_seen_trap");
desc = Messages.get(CatalogTab.class, "not_seen_plant");
}
}