From 44cead224475fa23e5b97a40ab85fc6cd5f37e26 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 28 Dec 2015 23:24:55 -0500 Subject: [PATCH] v0.3.4: fixed TXT_YOU_NOW_HAVE --- .../shatteredpixeldungeon/actors/hero/Hero.java | 7 ++----- .../shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java | 5 ++--- .../shatteredpixeldungeon/items/quest/Pickaxe.java | 3 ++- .../shatteredpixeldungeon/windows/WndImp.java | 4 ++-- .../shatteredpixeldungeon/windows/WndSadGhost.java | 4 ++-- .../shatteredpixeldungeon/windows/WndWandmaker.java | 4 ++-- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index a79bc3757..dd197d6ea 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -127,9 +127,6 @@ public class Hero extends Char { public static final int MAX_LEVEL = 30; - //TODO: remove this static variable - public static final String TXT_YOU_NOW_HAVE = Messages.get(Hero.class, "you_now_have"); - public static final int STARTING_STR = 10; private static final float TIME_TO_REST = 1f; @@ -615,9 +612,9 @@ public class Hero extends Char { ((item instanceof ScrollOfUpgrade || item instanceof ScrollOfMagicalInfusion) && ((Scroll)item).isKnown()) || ((item instanceof PotionOfStrength || item instanceof PotionOfMight) && ((Potion)item).isKnown()); if (important) { - GLog.p( TXT_YOU_NOW_HAVE, item.name() ); + GLog.p( Messages.get(this, "you_now_have", item.name()) ); } else { - GLog.i( TXT_YOU_NOW_HAVE, item.name() ); + GLog.i( Messages.get(this, "you_now_have", item.name()) ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java index c2d6c9460..beeebeeef 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; import java.util.Collection; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.watabou.noosa.audio.Sample; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; @@ -29,8 +30,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Journal; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.quest.DarkGold; @@ -101,7 +100,7 @@ public class Blacksmith extends NPC { Pickaxe pick = new Pickaxe(); if (pick.doPickUp( Dungeon.hero )) { - GLog.i( Hero.TXT_YOU_NOW_HAVE, pick.name() ); + GLog.i( Messages.get(Dungeon.hero, "you_now_have", pick.name() )); } else { Dungeon.level.drop( pick, Dungeon.hero.pos ).sprite.drop(); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java index 02b07fe9a..c5da4a64d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.quest; import java.util.ArrayList; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.watabou.noosa.audio.Sample; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -113,7 +114,7 @@ public class Pickaxe extends Weapon { DarkGold gold = new DarkGold(); if (gold.doPickUp( Dungeon.hero )) { - GLog.i( Hero.TXT_YOU_NOW_HAVE, gold.name() ); + GLog.i( Messages.get(Dungeon.hero, "you_now_have", gold.name()) ); } else { Dungeon.level.drop( gold, hero.pos ).sprite.drop(); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java index b3fc65996..94cc8c0e6 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java @@ -20,9 +20,9 @@ */ package com.shatteredpixel.shatteredpixeldungeon.windows; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.watabou.noosa.BitmapTextMultiline; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Imp; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.quest.DwarfToken; @@ -81,7 +81,7 @@ public class WndImp extends Window { reward.identify(); if (reward.doPickUp( Dungeon.hero )) { - GLog.i( Hero.TXT_YOU_NOW_HAVE, reward.name() ); + GLog.i( Messages.get(Dungeon.hero, "you_now_have", reward.name()) ); } else { Dungeon.level.drop( reward, imp.pos ).sprite.drop(); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java index f2d8fa2c9..0cf023cc3 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java @@ -22,9 +22,9 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.FetidRatSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollTricksterSprite; @@ -121,7 +121,7 @@ public class WndSadGhost extends Window { hide(); if (reward.doPickUp( Dungeon.hero )) { - GLog.i( Hero.TXT_YOU_NOW_HAVE, reward.name() ); + GLog.i( Messages.get(Dungeon.hero, "you_now_have", reward.name()) ); } else { Dungeon.level.drop( reward, ghost.pos ).sprite.drop(); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java index e52810019..399d0a907 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java @@ -22,10 +22,10 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; import com.shatteredpixel.shatteredpixeldungeon.items.quest.CorpseDust; import com.shatteredpixel.shatteredpixeldungeon.items.quest.Embers; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.plants.Rotberry; import com.watabou.noosa.BitmapTextMultiline; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; @@ -110,7 +110,7 @@ public class WndWandmaker extends Window { reward.identify(); if (reward.doPickUp( Dungeon.hero )) { - GLog.i( Hero.TXT_YOU_NOW_HAVE, reward.name() ); + GLog.i( Messages.get(Dungeon.hero, "you_now_have", reward.name()) ); } else { Dungeon.level.drop( reward, wandmaker.pos ).sprite.drop(); }