v0.6.1: final cleanup of limited drops changes

This commit is contained in:
Evan Debenham 2017-07-26 20:00:57 -04:00 committed by Evan Debenham
parent 4c31d69d5d
commit 98210ee915
2 changed files with 7 additions and 6 deletions

View File

@ -452,7 +452,7 @@ public class Dungeon {
private static final String DEPTH = "depth";
private static final String DROPPED = "dropped%d";
private static final String LEVEL = "level";
private static final String LIMDROPS = "limiteddrops";
private static final String LIMDROPS = "limited_drops";
private static final String CHAPTERS = "chapters";
private static final String QUESTS = "quests";
private static final String BADGES = "badges";
@ -606,8 +606,9 @@ public class Dungeon {
if (fullLoad) {
if( version <= 199 ){
LimitedDrops.legacyRestore( bundle.getIntArray(LIMDROPS) );
//pre-0.6.1
if( bundle.contains("limiteddrops") ){
LimitedDrops.legacyRestore( bundle.getIntArray("limiteddrops") );
} else {
LimitedDrops.restore( bundle.getBundle(LIMDROPS) );
}

View File

@ -178,15 +178,15 @@ public abstract class Level implements Bundlable {
if (Dungeon.posNeeded()) {
addItemToSpawn( new PotionOfStrength() );
Dungeon.limitedDrops.strengthPotions.count++;
Dungeon.LimitedDrops.STRENGTH_POTIONS.count++;
}
if (Dungeon.souNeeded()) {
addItemToSpawn( new ScrollOfUpgrade() );
Dungeon.limitedDrops.upgradeScrolls.count++;
Dungeon.LimitedDrops.UPGRADE_SCROLLS.count++;
}
if (Dungeon.asNeeded()) {
addItemToSpawn( new Stylus() );
Dungeon.limitedDrops.arcaneStyli.count++;
Dungeon.LimitedDrops.ARCANE_STYLI.count++;
}
DriedRose rose = Dungeon.hero.belongings.getItem( DriedRose.class );