v0.3.4: externalized level feature strings
This commit is contained in:
parent
2c76c77360
commit
4a9208bbf3
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Blandfruit;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||
|
@ -33,13 +34,6 @@ import java.util.Iterator;
|
|||
|
||||
public class AlchemyPot {
|
||||
|
||||
private static final String TXT_SELECT_SEED = "Select a seed to throw";
|
||||
private static final String TXT_POT = "Alchemy Pot";
|
||||
private static final String TXT_FRUIT = "Cook a Blandfruit";
|
||||
private static final String TXT_POTION = "Brew a Potion";
|
||||
private static final String TXT_OPTIONS =
|
||||
"Do you want to cook a Blandfruit with a seed, or brew a Potion from seeds?";
|
||||
|
||||
public static Hero hero;
|
||||
public static int pos;
|
||||
|
||||
|
@ -60,13 +54,16 @@ public class AlchemyPot {
|
|||
curItem = items.next();
|
||||
if (curItem instanceof Blandfruit && ((Blandfruit) curItem).potionAttrib == null){
|
||||
GameScene.show(
|
||||
new WndOptions(TXT_POT, TXT_OPTIONS, TXT_FRUIT, TXT_POTION) {
|
||||
new WndOptions(Messages.get(AlchemyPot.class, "pot"),
|
||||
Messages.get(AlchemyPot.class, "options"),
|
||||
Messages.get(AlchemyPot.class, "fruit"),
|
||||
Messages.get(AlchemyPot.class, "potion")) {
|
||||
@Override
|
||||
protected void onSelect(int index) {
|
||||
if (index == 0) {
|
||||
curItem.cast( AlchemyPot.hero, AlchemyPot.pos );
|
||||
} else
|
||||
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, TXT_SELECT_SEED);
|
||||
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, Messages.get(AlchemyPot.class, "select_seed"));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -75,7 +72,7 @@ public class AlchemyPot {
|
|||
}
|
||||
|
||||
if (!foundFruit)
|
||||
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, TXT_SELECT_SEED);
|
||||
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, Messages.get(AlchemyPot.class, "select_seed"));
|
||||
}
|
||||
|
||||
private static final WndBag.Listener itemSelector = new WndBag.Listener() {
|
||||
|
|
|
@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.features;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
|
@ -39,23 +40,19 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Chasm {
|
||||
|
||||
private static final String TXT_CHASM = "Chasm";
|
||||
private static final String TXT_YES = "Yes, I know what I'm doing";
|
||||
private static final String TXT_NO = "No, I changed my mind";
|
||||
private static final String TXT_JUMP =
|
||||
"Do you really want to jump into the chasm? A fall that far will be painful.";
|
||||
|
||||
public static boolean jumpConfirmed = false;
|
||||
|
||||
public static void heroJump( final Hero hero ) {
|
||||
GameScene.show(
|
||||
new WndOptions( TXT_CHASM, TXT_JUMP, TXT_YES, TXT_NO ) {
|
||||
new WndOptions( Messages.get(Chasm.class, "chasm"),
|
||||
Messages.get(Chasm.class, "jump"),
|
||||
Messages.get(Chasm.class, "yes"),
|
||||
Messages.get(Chasm.class, "no") ) {
|
||||
@Override
|
||||
protected void onSelect( int index ) {
|
||||
if (index == 0) {
|
||||
|
@ -108,7 +105,7 @@ public class Chasm {
|
|||
Badges.validateDeathFromFalling();
|
||||
|
||||
Dungeon.fail( ResultDescriptions.FALL );
|
||||
GLog.n( "You fell to death..." );
|
||||
GLog.n( Messages.get(Chasm.class, "ondeath") );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.levels.features;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.HallsLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
|
@ -33,91 +35,23 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
|
|||
|
||||
public class Sign {
|
||||
|
||||
private static final String TXT_DEAD_END =
|
||||
"What are you doing here?!";
|
||||
|
||||
private static final String[] TIPS = {
|
||||
"Almost all equipment has a strength requirement. Don't overestimate your strength, using equipment you can't " +
|
||||
"handle has big penalties!\n\nRaising your strength is not the only way to access better equipment, " +
|
||||
"you can also lower equipment strength requirements with Scrolls of Upgrade.\n\n\n" +
|
||||
"Items found in the dungeon will often be unidentified. Some items will have unknown effects, others " +
|
||||
"may be upgraded, or degraded and cursed! Unidentified items are unpredictable, so be careful!",
|
||||
"Charging forward recklessly is a great way to get killed.\n\n" +
|
||||
"Slowing down a bit to examine enemies and use the environment and items to your advantage can make a " +
|
||||
"big difference.\n\nYou can double tap or hold on the examine button to search for secrets. " +
|
||||
"The dungeon is full of traps and hidden passageways, keep your eyes open!",
|
||||
"Levelling up is important!\n\nBeing about the same level as the floor you are on is a good idea. " +
|
||||
"Hunger may keep you moving in search of more food, but don't be afraid to slow down a little and train." +
|
||||
"\n\n\nHunger and health are both resources, and using them well can mean starving yourself in order" +
|
||||
" to help conserve food, if you have some health to spare.",
|
||||
"The rogue isn't the only character that benefits from being sneaky. You can retreat to the other side of a " +
|
||||
"door to ambush a chasing opponent for a guaranteed hit!" +
|
||||
"\n\nAny attack on an unaware opponent is guaranteed to hit them.",
|
||||
|
||||
"Note to all sewer maintenance & cleaning crews: TURN BACK NOW. Some sort of sludge monster has made its home" +
|
||||
" here and several crews have been lost trying to deal with it.\n\n" +
|
||||
"Approval has been given to seal off the lower sewers, this area has been condemned, LEAVE NOW.",
|
||||
|
||||
"Pixel-Mart - all you need for successful adventure!",
|
||||
"Identify your potions and scrolls as soon as possible. Don't put it off to the moment " +
|
||||
"when you actually need them.",
|
||||
"Being hungry doesn't hurt, but starving does hurt.",
|
||||
"Surprise attack has a better chance to hit. For example, you can ambush your enemy behind " +
|
||||
"a closed door when you know it is approaching.",
|
||||
|
||||
"Thomas,\n\n" +
|
||||
"You've been a great friend, so I'm going to do you a favour. When you get to your shift tonight, check Tengu's cell, then get out.\n\n" +
|
||||
"Doesn't matter if the prisoners try and escape, pretty soon nobody will be able to leave this place.\n\n" +
|
||||
"That freak has to stay secured though, if he escapes there's no telling what he'll do, just make sure tengu's cell is locked, then get out.\n\n" +
|
||||
"Don't bother looking for me after this, a captain must go down with his ship.\n" +
|
||||
"- Warden Smith",
|
||||
|
||||
"Pixel-Mart. Spend money. Live longer.",
|
||||
"When you're attacked by several monsters at the same time, try to retreat behind a door.",
|
||||
"If you are burning, you can't put out the fire in the water while levitating.",
|
||||
"There is no sense in possessing more than one unblessed Ankh at the same time, " +
|
||||
"because you will lose them upon resurrecting.",
|
||||
|
||||
"DANGER! Heavy machinery can cause injury, loss of limbs or death!",
|
||||
|
||||
"Pixel-Mart. A safer life in dungeon.",
|
||||
"When you upgrade an enchanted weapon, there is a chance to destroy that enchantment.",
|
||||
"In a Well of Transmutation you can get an item, that cannot be obtained otherwise.",
|
||||
"The only way to enchant a weapon is by upgrading it with a Scroll of Magical Infusion.",
|
||||
|
||||
"No weapons allowed in the presence of His Majesty!",
|
||||
|
||||
"Pixel-Mart. Special prices for demon hunters!",
|
||||
|
||||
//hmm.. I wonder what this is?
|
||||
"error RaW i work",
|
||||
"frOthinG moBs yelp",
|
||||
"CoCoOn furor rises"
|
||||
};
|
||||
|
||||
private static final String TXT_BURN =
|
||||
"As you try to read the sign it bursts into greenish flames.";
|
||||
|
||||
public static void read( int pos ) {
|
||||
|
||||
if (Dungeon.level instanceof DeadEndLevel) {
|
||||
|
||||
GameScene.show( new WndMessage( TXT_DEAD_END ) );
|
||||
GameScene.show( new WndMessage( Messages.get(Sign.class, "dead_end") ) );
|
||||
|
||||
} else {
|
||||
|
||||
int index = Dungeon.depth - 1;
|
||||
GameScene.show( new WndMessage( Messages.get(Sign.class, "tip_"+Dungeon.depth) ) );
|
||||
|
||||
if (index < TIPS.length) {
|
||||
GameScene.show( new WndMessage( TIPS[index] ) );
|
||||
|
||||
if (index >= 21) {
|
||||
if (Dungeon.level instanceof HallsLevel) {
|
||||
|
||||
Dungeon.level.destroy( pos );
|
||||
GameScene.updateMap( pos );
|
||||
GameScene.discoverTile( pos, Terrain.SIGN );
|
||||
|
||||
GLog.w( TXT_BURN );
|
||||
GLog.w( Messages.get(Sign.class, "burn") );
|
||||
|
||||
CellEmitter.get( pos ).burst( ElmoParticle.FACTORY, 6 );
|
||||
Sample.INSTANCE.play( Assets.SND_BURNING );
|
||||
|
@ -126,4 +60,3 @@ public class Sign {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -392,4 +392,41 @@ actors.char.smb_missed=%s %s %s's attack
|
|||
actors.char.out_of_paralysis=The pain snapped %s out of paralysis
|
||||
actors.char.def_verb=dodged
|
||||
|
||||
levels.features.alchemypot.select_seed=Select a seed to throw
|
||||
levels.features.alchemypot.pot=Alchemy Pot
|
||||
levels.features.alchemypot.fruit=Cook a Blandfruit
|
||||
levels.features.alchemypot.potion=Brew a Potion
|
||||
levels.features.alchemypot.options=Do you want to cook a Blandfruit with a seed, or brew a Potion from seeds?
|
||||
levels.features.chasm.chasm=Chasm
|
||||
levels.features.chasm.yes=Yes, I know what I'm doing
|
||||
levels.features.chasm.no=No, I changed my mind
|
||||
levels.features.chasm.jump=Do you really want to jump into the chasm? A fall that far will be painful.
|
||||
levels.features.chasm.ondeath=You fell to death...
|
||||
levels.features.sign.dead_end=What are you doing here?!
|
||||
levels.features.sign.tip_1=Almost all equipment has a strength requirement. Don't overestimate your strength, using equipment you can't handle has big penalties!\n\nRaising your strength is not the only way to access better equipment, you can also lower equipment strength requirements with Scrolls of Upgrade.\n\n\nItems found in the dungeon will often be unidentified. Some items will have unknown effects, others may be upgraded, or degraded and cursed! Unidentified items are unpredictable, so be careful!
|
||||
levels.features.sign.tip_2=Charging forward recklessly is a great way to get killed.\n\nSlowing down a bit to examine enemies and use the environment and items to your advantage can make a big difference.\n\nYou can double tap or hold on the examine button to search for secrets. The dungeon is full of traps and hidden passageways, keep your eyes open!
|
||||
levels.features.sign.tip_3="Levelling up is important!\n\nBeing about the same level as the floor you are on is a good idea. Hunger may keep you moving in search of more food, but don't be afraid to slow down a little and train.\n\n\nHunger and health are both resources, and using them well can mean starving yourself in order to help conserve food, if you have some health to spare.
|
||||
levels.features.sign.tip_4=The rogue isn't the only character that benefits from being sneaky. You can retreat to the other side of a door to ambush a chasing opponent for a guaranteed hit!\n\nAny attack on an unaware opponent is guaranteed to hit them.
|
||||
levels.features.sign.tip_5=Note to all sewer maintenance & cleaning crews: TURN BACK NOW. Some sort of sludge monster has made its home here and several crews have been lost trying to deal with it.\n\nApproval has been given to seal off the lower sewers, this area has been condemned, LEAVE NOW.
|
||||
levels.features.sign.tip_6=Pixel-Mart - all you need for successful adventure!
|
||||
levels.features.sign.tip_7=Identify your potions and scrolls as soon as possible. Don't put it off to the moment when you actually need them.
|
||||
levels.features.sign.tip_8=Being hungry doesn't hurt, but starving does hurt.
|
||||
levels.features.sign.tip_9=Surprise attack has a better chance to hit. For example, you can ambush your enemy behind a closed door when you know it is approaching.
|
||||
levels.features.sign.tip_10=Thomas,\n\nYou've been a great friend, so I'm going to do you a favour. When you get to your shift tonight, check Tengu's cell, then get out.\n\nDoesn't matter if the prisoners try and escape, pretty soon nobody will be able to leave this place.\n\nThat freak has to stay secured though, if he escapes there's no telling what he'll do, just make sure tengu's cell is locked, then get out.\n\nDon't bother looking for me after this, a captain must go down with his ship.\n- Warden Smith
|
||||
levels.features.sign.tip_11=Pixel-Mart. Spend money. Live longer.
|
||||
levels.features.sign.tip_12=When you're attacked by several monsters at the same time, try to retreat behind a door.
|
||||
levels.features.sign.tip_13=If you are burning, you can't put out the fire in the water while levitating.
|
||||
levels.features.sign.tip_14=There is no sense in possessing more than one unblessed Ankh at the same time, because you will lose them upon resurrecting.
|
||||
levels.features.sign.tip_15=DANGER! Heavy machinery can cause injury, loss of limbs or death!
|
||||
levels.features.sign.tip_16=Pixel-Mart. A safer life in dungeon.
|
||||
levels.features.sign.tip_17=When you upgrade an enchanted weapon, there is a chance to destroy that enchantment.
|
||||
levels.features.sign.tip_18=In a Well of Transmutation you can get an item, that cannot be obtained otherwise.
|
||||
levels.features.sign.tip_19=The only way to enchant a weapon is by upgrading it with a Scroll of Magical Infusion.
|
||||
levels.features.sign.tip_20=No weapons allowed in the presence of His Majesty!
|
||||
levels.features.sign.tip_21=Pixel-Mart. Special prices for demon hunters!
|
||||
levels.features.sign.tip_22=error RaW i work
|
||||
levels.features.sign.tip_23=frOthinG moBs yelp
|
||||
levels.features.sign.tip_24=CoCoOn furor rises
|
||||
levels.features.sign.burn=As you try to read the sign it bursts into greenish flames.
|
||||
|
||||
items.bags.bag.name=backpack
|
||||
|
|
Loading…
Reference in New Issue
Block a user