v1.4.0: adjusted daily seeds to be out of the user-enterable range

This commit is contained in:
Evan Debenham
2022-08-21 13:32:25 -04:00
parent 42197fdbad
commit de369be7ca
2 changed files with 9 additions and 3 deletions

View File

@@ -197,10 +197,11 @@ public class Dungeon {
mobsToChampion = -1;
if (daily) {
seed = SPDSettings.lastDaily();
//Ensures that daily seeds are not in the range of user-enterable seeds
seed = SPDSettings.lastDaily() + DungeonSeed.TOTAL_SEEDS;
DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, Locale.ROOT);
format.setTimeZone(TimeZone.getTimeZone("UTC"));
customSeedText = format.format(new Date(seed));
customSeedText = format.format(new Date(SPDSettings.lastDaily()));
} else if (!SPDSettings.customSeed().isEmpty()){
customSeedText = SPDSettings.customSeed();
seed = DungeonSeed.convertFromText(customSeedText);

View File

@@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.journal.Notes;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.Toolbar;
import com.shatteredpixel.shatteredpixeldungeon.utils.DungeonSeed;
import com.watabou.noosa.Game;
import com.watabou.utils.Bundlable;
import com.watabou.utils.Bundle;
@@ -99,7 +100,11 @@ public enum Rankings {
if (rec.daily){
latestDaily = rec;
dailyScoreHistory.put(Dungeon.seed, rec.score);
if (Dungeon.seed <= DungeonSeed.TOTAL_SEEDS) {
dailyScoreHistory.put(Dungeon.seed, rec.score);
} else {
dailyScoreHistory.put(Dungeon.seed - DungeonSeed.TOTAL_SEEDS, rec.score);
}
save();
return;
}