v2.5.0: game opts are now always visible and explain that you need a win

This commit is contained in:
Evan Debenham
2024-08-21 14:32:50 -04:00
parent e86707bedb
commit aedd3d04bb
2 changed files with 174 additions and 143 deletions
@@ -64,11 +64,14 @@ scenes.heroselectscene.daily_no=No
scenes.heroselectscene.daily_repeat=You have already played today's daily. You can replay it if you like, but only as an unranked practice run.\n\nAfter you complete the replay, you will be able to view it from the daily rankings window for a short time before the record is deleted.\n\nWould you like to replay today's daily with your currently selected hero and challenges? scenes.heroselectscene.daily_repeat=You have already played today's daily. You can replay it if you like, but only as an unranked practice run.\n\nAfter you complete the replay, you will be able to view it from the daily rankings window for a short time before the record is deleted.\n\nWould you like to replay today's daily with your currently selected hero and challenges?
scenes.heroselectscene.daily_unavailable_long=It seems you've started a daily that's in the future! This can happen if you recently changed timezones, or if you changed your system clock. _Your next daily will be available in %d days._ scenes.heroselectscene.daily_unavailable_long=It seems you've started a daily that's in the future! This can happen if you recently changed timezones, or if you changed your system clock. _Your next daily will be available in %d days._
scenes.heroselectscene.daily_existing=You already have a daily run in progress. You must end that run before starting another daily. scenes.heroselectscene.daily_existing=You already have a daily run in progress. You must end that run before starting another daily.
scenes.heroselectscene.daily_nowin=Every day a new game is available that is the same for everyone! This 'daily run' generates the same dungeon for every person who plays it (so long as they are also playing the same game version).\n\n_You must win at least one game before you are able to play daily runs._
scenes.heroselectscene.custom_seed_title=Enter a Custom Seed scenes.heroselectscene.custom_seed_title=Enter a Custom Seed
scenes.heroselectscene.custom_seed_desc=The same seed and game version always generate the same dungeon! _Custom seed games cannot earn badges or contribute to games played, and appear at the bottom of the rankings page._ scenes.heroselectscene.custom_seed_desc=The game uses a seed code for dungeon generation, the same seed and game version always generate the same dungeon! _Custom seed games cannot earn badges or contribute to games played, and appear at the bottom of the rankings page._
scenes.heroselectscene.custom_seed_duplicate=You already have a regular game in progress with that seed. You must end that game before using that custom seed. scenes.heroselectscene.custom_seed_duplicate=You already have a regular game in progress with that seed. You must end that game before using that custom seed.
scenes.heroselectscene.custom_seed_nowin=The game uses a seed code for dungeon generation, the same seed and game version always generate the same dungeon!\n\n_You must win at least one game before you are able to enter custom seeds._
scenes.heroselectscene.custom_seed_set=Set scenes.heroselectscene.custom_seed_set=Set
scenes.heroselectscene.custom_seed_clear=Clear scenes.heroselectscene.custom_seed_clear=Clear
scenes.heroselectscene.challenges_nowin=Challenges are optional modifiers that make the game more difficult. Some challenges make the dungeon more dangerous, others reduce the power of your abilities or items.\n\n_You must win at least one game before you are able to enable challenges._
scenes.interlevelscene$mode.descend=Descending scenes.interlevelscene$mode.descend=Descending
scenes.interlevelscene$mode.ascend=Ascending scenes.interlevelscene$mode.ascend=Ascending
@@ -45,6 +45,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndKeyBindings;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage; import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndTextInput; import com.shatteredpixel.shatteredpixeldungeon.windows.WndTextInput;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndTitledMessage;
import com.watabou.gltextures.TextureCache; import com.watabou.gltextures.TextureCache;
import com.watabou.input.PointerEvent; import com.watabou.input.PointerEvent;
import com.watabou.noosa.Camera; import com.watabou.noosa.Camera;
@@ -209,9 +210,11 @@ public class HeroSelectScene extends PixelScene {
updateOptionsColor(); updateOptionsColor();
btnOptions.visible = false; btnOptions.visible = false;
if (DeviceCompat.isDebug() || Badges.isUnlocked(Badges.Badge.VICTORY)){ if(!SPDSettings.intro()){
add(btnOptions); add(btnOptions);
} else { }
if (!Badges.isUnlocked(Badges.Badge.VICTORY) && !DeviceCompat.isDebug()){
Dungeon.challenges = 0; Dungeon.challenges = 0;
SPDSettings.challenges(0); SPDSettings.challenges(0);
SPDSettings.customSeed(""); SPDSettings.customSeed("");
@@ -578,10 +581,18 @@ public class HeroSelectScene extends PixelScene {
buttons = new ArrayList<>(); buttons = new ArrayList<>();
spacers = new ArrayList<>(); spacers = new ArrayList<>();
if (DeviceCompat.isDebug() || Badges.isUnlocked(Badges.Badge.VICTORY)){
StyledButton seedButton = new StyledButton(Chrome.Type.BLANK, Messages.get(HeroSelectScene.class, "custom_seed"), 6){ StyledButton seedButton = new StyledButton(Chrome.Type.BLANK, Messages.get(HeroSelectScene.class, "custom_seed"), 6){
@Override @Override
protected void onClick() { protected void onClick() {
if (!Badges.isUnlocked(Badges.Badge.VICTORY) && !DeviceCompat.isDebug()){
ShatteredPixelDungeon.scene().addToFront( new WndTitledMessage(
Icons.get(Icons.SEED),
Messages.get(HeroSelectScene.class, "custom_seed"),
Messages.get(HeroSelectScene.class, "custom_seed_nowin"))
);
return;
}
String existingSeedtext = SPDSettings.customSeed(); String existingSeedtext = SPDSettings.customSeed();
ShatteredPixelDungeon.scene().addToFront( new WndTextInput(Messages.get(HeroSelectScene.class, "custom_seed_title"), ShatteredPixelDungeon.scene().addToFront( new WndTextInput(Messages.get(HeroSelectScene.class, "custom_seed_title"),
Messages.get(HeroSelectScene.class, "custom_seed_desc"), Messages.get(HeroSelectScene.class, "custom_seed_desc"),
@@ -634,6 +645,15 @@ public class HeroSelectScene extends PixelScene {
protected void onClick() { protected void onClick() {
super.onClick(); super.onClick();
if (!Badges.isUnlocked(Badges.Badge.VICTORY) && !DeviceCompat.isDebug()){
ShatteredPixelDungeon.scene().addToFront( new WndTitledMessage(
Icons.get(Icons.CALENDAR),
Messages.get(HeroSelectScene.class, "daily"),
Messages.get(HeroSelectScene.class, "daily_nowin"))
);
return;
}
long diff = (SPDSettings.lastDaily() + DAY) - Game.realTime; long diff = (SPDSettings.lastDaily() + DAY) - Game.realTime;
if (diff > 24*HOUR){ if (diff > 24*HOUR){
ShatteredPixelDungeon.scene().addToFront(new WndMessage(Messages.get(HeroSelectScene.class, "daily_unavailable_long", (diff / DAY)+1))); ShatteredPixelDungeon.scene().addToFront(new WndMessage(Messages.get(HeroSelectScene.class, "daily_unavailable_long", (diff / DAY)+1)));
@@ -723,6 +743,15 @@ public class HeroSelectScene extends PixelScene {
StyledButton challengeButton = new StyledButton(Chrome.Type.BLANK, Messages.get(WndChallenges.class, "title"), 6){ StyledButton challengeButton = new StyledButton(Chrome.Type.BLANK, Messages.get(WndChallenges.class, "title"), 6){
@Override @Override
protected void onClick() { protected void onClick() {
if (!Badges.isUnlocked(Badges.Badge.VICTORY) && !DeviceCompat.isDebug()){
ShatteredPixelDungeon.scene().addToFront( new WndTitledMessage(
Icons.get(Icons.CHALLENGE_GREY),
Messages.get(WndChallenges.class, "title"),
Messages.get(HeroSelectScene.class, "challenges_nowin")
));
return;
}
ShatteredPixelDungeon.scene().addToFront(new WndChallenges(SPDSettings.challenges(), true) { ShatteredPixelDungeon.scene().addToFront(new WndChallenges(SPDSettings.challenges(), true) {
public void onBackPressed() { public void onBackPressed() {
super.onBackPressed(); super.onBackPressed();
@@ -736,7 +765,6 @@ public class HeroSelectScene extends PixelScene {
challengeButton.icon(Icons.get(SPDSettings.challenges() > 0 ? Icons.CHALLENGE_COLOR : Icons.CHALLENGE_GREY)); challengeButton.icon(Icons.get(SPDSettings.challenges() > 0 ? Icons.CHALLENGE_COLOR : Icons.CHALLENGE_GREY));
add(challengeButton); add(challengeButton);
buttons.add(challengeButton); buttons.add(challengeButton);
}
for (int i = 1; i < buttons.size(); i++){ for (int i = 1; i < buttons.size(); i++){
ColorBlock spc = new ColorBlock(1, 1, 0xFF000000); ColorBlock spc = new ColorBlock(1, 1, 0xFF000000);