diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java index 190c3f366..65265d86f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java @@ -105,6 +105,15 @@ public class Ring extends KindofMisc { super(); reset(); } + + //anonymous rings are always IDed, do not affect ID status, + //and their sprite is replaced by a placeholder if they are not known, + //useful for items that appear in UIs, or which are only spawned for their effects + protected boolean anonymous = false; + public void anonymize(){ + if (!isKnown()) image = ItemSpriteSheet.RING_HOLDER; + anonymous = true; + } public void reset() { super.reset(); @@ -136,16 +145,18 @@ public class Ring extends KindofMisc { } public boolean isKnown() { - return handler != null && handler.isKnown( this ); + return anonymous || (handler != null && handler.isKnown( this )); } public void setKnown() { - if (!isKnown()) { - handler.know( this ); - } - - if (Dungeon.hero.isAlive()) { - Catalog.setSeen(getClass()); + if (!anonymous) { + if (!isKnown()) { + handler.know(this); + } + + if (Dungeon.hero.isAlive()) { + Catalog.setSeen(getClass()); + } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java index 308d7ee7f..7cb783854 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java @@ -266,7 +266,9 @@ public class MagesStaff extends MeleeWeapon { String info = super.info(); if (wand == null){ - info += "\n\n" + Messages.get(this, "no_wand"); + //FIXME this is removed because of journal stuff, and is generally unused. + //perhaps reword to fit in journal better + //info += "\n\n" + Messages.get(this, "no_wand"); } else { info += "\n\n" + Messages.get(this, "has_wand", Messages.get(wand, "name")) + " " + wand.statsDesc(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java index 125ddae9b..88c9cd650 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; @@ -680,6 +681,16 @@ public class WndJournal extends WndTabbed { this.item = item; this.seen = seen; + + if ( seen && !IDed ){ + if (item instanceof Ring){ + ((Ring) item).anonymize(); + } else if (item instanceof Potion){ + ((Potion) item).anonymize(); + } else if (item instanceof Scroll){ + ((Scroll) item).anonymize(); + } + } if (!seen) { icon.copy( new ItemSprite( ItemSpriteSheet.SOMETHING + spriteIndexes[currentItemIdx], null) ); @@ -694,8 +705,13 @@ public class WndJournal extends WndTabbed { public boolean onClick( float x, float y ) { if (inside( x, y ) && seen) { - GameScene.show(new WndTitledMessage( new Image(icon), - Messages.titleCase(item.trueName()), item.desc() )); + if (item instanceof ClassArmor){ + GameScene.show(new WndTitledMessage(new Image(icon), + Messages.titleCase(item.trueName()), item.desc())); + } else { + GameScene.show(new WndTitledMessage(new Image(icon), + Messages.titleCase(item.trueName()), item.info())); + } return true; } else { return false;