From ee6b1f30a255af272f28c6c41a8b9420ec22c8cc Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 16 Jun 2025 13:39:18 -0400 Subject: [PATCH] v3.1.1: fixed cases of landmark entries from beacon not being cleared --- .../shatteredpixeldungeon/items/bags/ScrollHolder.java | 2 ++ .../shatteredpixeldungeon/items/spells/BeaconOfReturning.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java index 9df29859d..205bf5096 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/ScrollHolder.java @@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Stylus; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.spells.BeaconOfReturning; import com.shatteredpixel.shatteredpixeldungeon.items.spells.Spell; +import com.shatteredpixel.shatteredpixeldungeon.journal.Notes; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class ScrollHolder extends Bag { @@ -54,6 +55,7 @@ public class ScrollHolder extends Bag { super.onDetach(); for (Item item : items) { if (item instanceof BeaconOfReturning) { + Notes.remove(Notes.Landmark.BEACON_LOCATION, ((BeaconOfReturning) item).returnDepth); ((BeaconOfReturning) item).returnDepth = -1; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/BeaconOfReturning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/BeaconOfReturning.java index 8c927870d..7a17a654f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/BeaconOfReturning.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/BeaconOfReturning.java @@ -105,6 +105,10 @@ public class BeaconOfReturning extends Spell { } private void setBeacon(Hero hero ){ + if (returnDepth != -1){ + Notes.remove(Notes.Landmark.BEACON_LOCATION, returnDepth); + } + returnDepth = Dungeon.depth; returnBranch = Dungeon.branch; returnPos = hero.pos;