From 4f629d88685b19dddbcb52fed2a1a7def6fa9395 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 4 Nov 2019 10:32:57 -0500 Subject: [PATCH] v0.8.0: various bugfixes and small tweaks: - fixed mobs sometimes not walking onto traps/chasms when they're flying" - fixed minor visual bugs with items dropping in rare cases - fixed target quickslot target indicator not following enemies - "hide navigation bar" setting is now called "fullscreen" on all platforms --- .../shatteredpixeldungeon/actors/mobs/Mob.java | 3 ++- .../shatteredpixeldungeon/items/Item.java | 3 ++- .../shatteredpixeldungeon/ui/QuickSlotButton.java | 10 +++++++++- .../shatteredpixeldungeon/windows/WndSettings.java | 5 +---- .../messages/windows/windows.properties | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index e7ce48b57..92e594c7e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -340,7 +340,8 @@ public abstract class Mob extends Char { path = null; - if (Actor.findChar( target ) == null && Dungeon.level.passable[target]) { + if (Actor.findChar( target ) == null && + (Dungeon.level.passable[target] || (flying && Dungeon.level.avoid[target]))) { step = target; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java index 91d9213c3..1ab99b383 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java @@ -113,7 +113,8 @@ public class Item implements Bundlable { public void doDrop( Hero hero ) { hero.spendAndNext(TIME_TO_DROP); - Dungeon.level.drop(detachAll(hero.belongings.backpack), hero.pos).sprite.drop(hero.pos); + int pos = hero.pos; + Dungeon.level.drop(detachAll(hero.belongings.backpack), pos).sprite.drop(pos); } //resets an item's properties, to ensure consistency between runs diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java index f1dfba76f..6143cf627 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java @@ -132,7 +132,15 @@ public class QuickSlotButton extends Button implements WndBag.Listener { crossB.y = y + (height - crossB.height) / 2; PixelScene.align(crossB); } - + + @Override + public void update() { + super.update(); + if (targeting && lastTarget != null && lastTarget.sprite != null){ + crossM.point(lastTarget.sprite.center(crossM)); + } + } + @Override public KeyAction keyAction() { switch (slotNum){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java index abcd84b4b..a593d8c2a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java @@ -268,7 +268,7 @@ public class WndSettings extends WndTabbed { slots.setRect(0, chkFlipTags.bottom() + GAP_TINY, WIDTH, SLIDER_HEIGHT); add(slots); - CheckBox chkFullscreen = new CheckBox( Messages.get(this, "nav_bar") ) { + CheckBox chkFullscreen = new CheckBox( Messages.get(this, "fullscreen") ) { @Override protected void onClick() { super.onClick(); @@ -277,9 +277,6 @@ public class WndSettings extends WndTabbed { }; chkFullscreen.setRect( 0, slots.bottom() + GAP_SML, WIDTH, BTN_HEIGHT ); chkFullscreen.checked(SPDSettings.fullscreen()); - if (DeviceCompat.isDesktop()){ - chkFullscreen.text( "Fullscreen" ); - } chkFullscreen.enable(DeviceCompat.supportsFullScreen()); add(chkFullscreen); diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties index 1b9d27132..983f62b2e 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/windows/windows.properties @@ -121,7 +121,7 @@ windows.wndsettings$uitab.center=Center windows.wndsettings$uitab.flip_toolbar=Flip Toolbar windows.wndsettings$uitab.flip_indicators=Flip Indicators windows.wndsettings$uitab.quickslots=Quickslots -windows.wndsettings$uitab.nav_bar=Hide Navigation Bar +windows.wndsettings$uitab.fullscreen=Fullscreen windows.wndsettings$uitab.system_font=System Font windows.wndsettings$audiotab.music_vol=Music Volume windows.wndsettings$audiotab.music_mute=Mute Music