v0.3.4 externalized challenge strings

This commit is contained in:
Evan Debenham 2015-12-30 23:30:13 -05:00 committed by Evan Debenham
parent 82e4a5b9d8
commit c1d55bcd77
3 changed files with 20 additions and 11 deletions

View File

@ -30,14 +30,14 @@ public class Challenges {
public static final int DARKNESS = 32;
public static final int NO_SCROLLS = 64;
public static final String[] NAMES = {
"On diet",
"Faith is my armor",
"Pharmacophobia",
"Barren land",
"Swarm intelligence",
"Into darkness",
"Forbidden runes"
public static final String[] NAME_IDS = {
"no_food",
"no_armor",
"no_healing",
"no_herbalism",
"swarm_intelligence",
"darkness",
"no_scrolls"
};
public static final int[] MASKS = {

View File

@ -697,4 +697,12 @@ badges$badge.games_played_3=500 games played
badges$badge.games_played_4=2000 games played
badges$badge.happy_end=Happy end
badges$badge.champion=Challenge won
badges$badge.supporter=Thanks for your support!
badges$badge.supporter=Thanks for your support!
challenges.no_food=On diet
challenges.no_armor=Faith is my armor
challenges.no_healing=Pharmacophobia
challenges.no_herbalism=Barren land
challenges.swarm_intelligence=Swarm intelligence
challenges.darkness=Into darkness
challenges.no_scrolls=Forbidden runes

View File

@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
import java.util.ArrayList;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.noosa.BitmapText;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
@ -57,9 +58,9 @@ public class WndChallenges extends Window {
boxes = new ArrayList<CheckBox>();
float pos = TTL_HEIGHT;
for (int i=0; i < Challenges.NAMES.length; i++) {
for (int i=0; i < Challenges.NAME_IDS.length; i++) {
CheckBox cb = new CheckBox( Challenges.NAMES[i] );
CheckBox cb = new CheckBox( Messages.get(Challenges.class, Challenges.NAME_IDS[i]) );
cb.checked( (checked & Challenges.MASKS[i]) != 0 );
cb.active = editable;