v0.3.4: externalized wand strings
This commit is contained in:
committed by
Evan Debenham
parent
1885fdc17a
commit
186c6cea91
@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SoulMark;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
@@ -56,11 +57,6 @@ public abstract class Wand extends Item {
|
||||
|
||||
public static final String AC_ZAP = "ZAP";
|
||||
|
||||
private static final String TXT_FIZZLES = "your wand fizzles; it must not have enough charge.";
|
||||
private static final String TXT_SELF_TARGET = "You can't target yourself";
|
||||
|
||||
private static final String TXT_IDENTIFY = "You are now familiar with your %s.";
|
||||
|
||||
private static final float TIME_TO_ZAP = 1f;
|
||||
|
||||
public int maxCharges = initialCharges();
|
||||
@@ -183,7 +179,7 @@ public abstract class Wand extends Item {
|
||||
@Override
|
||||
public String info() {
|
||||
return (cursed && cursedKnown) ?
|
||||
desc() + "\n\nThis wand is cursed, making its magic chaotic and random." :
|
||||
desc() + Messages.get(Wand.class, "cursed") :
|
||||
desc();
|
||||
}
|
||||
|
||||
@@ -254,7 +250,7 @@ public abstract class Wand extends Item {
|
||||
curCharges -= cursed ? 1 : chargesPerCast();
|
||||
if (!isIdentified() && usagesToKnow <= 0) {
|
||||
identify();
|
||||
GLog.w( TXT_IDENTIFY, name() );
|
||||
GLog.w( Messages.get(Wand.class, "identify", name()) );
|
||||
} else {
|
||||
if (curUser.heroClass == HeroClass.MAGE) levelKnown = true;
|
||||
updateQuickslot();
|
||||
@@ -302,7 +298,7 @@ public abstract class Wand extends Item {
|
||||
return price;
|
||||
}
|
||||
|
||||
private static final String UNFAMILIRIARITY = "unfamiliarity";
|
||||
private static final String UNFAMILIRIARITY = "unfamiliarity";
|
||||
private static final String CUR_CHARGES = "curCharges";
|
||||
private static final String CUR_CHARGE_KNOWN = "curChargeKnown";
|
||||
private static final String PARTIALCHARGE = "partialCharge";
|
||||
@@ -340,7 +336,7 @@ public abstract class Wand extends Item {
|
||||
int cell = shot.collisionPos;
|
||||
|
||||
if (target == curUser.pos || cell == curUser.pos) {
|
||||
GLog.i( TXT_SELF_TARGET );
|
||||
GLog.i( Messages.get(Wand.class, "self_target") );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -360,7 +356,7 @@ public abstract class Wand extends Item {
|
||||
CursedWand.cursedZap(curWand, curUser, new Ballistica( curUser.pos, target, Ballistica.MAGIC_BOLT));
|
||||
if (!curWand.cursedKnown){
|
||||
curWand.cursedKnown = true;
|
||||
GLog.n("This " + curItem.name() + " is cursed!");
|
||||
GLog.n(Messages.get(Wand.class, "curse_discover", curWand.name()));
|
||||
}
|
||||
} else {
|
||||
curWand.fx(shot, new Callback() {
|
||||
@@ -375,7 +371,7 @@ public abstract class Wand extends Item {
|
||||
|
||||
} else {
|
||||
|
||||
GLog.w( TXT_FIZZLES );
|
||||
GLog.w( Messages.get(Wand.class, "fizzles") );
|
||||
|
||||
}
|
||||
|
||||
@@ -384,7 +380,7 @@ public abstract class Wand extends Item {
|
||||
|
||||
@Override
|
||||
public String prompt() {
|
||||
return "Choose a location to zap";
|
||||
return Messages.get(Wand.class, "prompt");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user