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 0630ff150..d4d38c039 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 @@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.ItemStatusHandler; import com.shatteredpixel.shatteredpixeldungeon.items.KindofMisc; import com.shatteredpixel.shatteredpixeldungeon.journal.Catalog; +import com.shatteredpixel.shatteredpixeldungeon.journal.Notes; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -177,8 +178,19 @@ public class Ring extends KindofMisc { public String info(){ //skip custom notes if anonymized and un-Ided - String desc = (anonymous && (handler == null || !handler.isKnown( this ))) ? super.desc() : super.info(); - + String desc; + if (anonymous && (handler == null || !handler.isKnown( this ))){ + desc = super.desc(); + } else { + //otherwise, check for item type note too, rings can have either + Notes.CustomRecord note = Notes.findCustomRecord(getClass()); + if (note != null){ + desc = Messages.get(this, "custom_note", note.title()) + "\n\n" + super.info(); + } else { + desc = super.info(); + } + } + if (cursed && isEquipped( Dungeon.hero )) { desc += "\n\n" + Messages.get(Ring.class, "cursed_worn"); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/CustomNoteButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/CustomNoteButton.java index e66a45908..28db928b0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/CustomNoteButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/CustomNoteButton.java @@ -156,6 +156,9 @@ public class CustomNoteButton extends IconButton { @Override public boolean itemSelectable(Item item) { if (item instanceof EquipableItem){ + if (item instanceof Ring && Notes.findCustomRecord(item.getClass()) != null){ + return false; + } return ((EquipableItem) item).customNoteID == -1 || Notes.findCustomRecord(((EquipableItem) item).customNoteID) == null; } else {