v0.2.3e: added backend support for multiple quickslots (needs testing!)

This commit is contained in:
Evan Debenham
2015-01-19 12:01:04 -05:00
parent 72cbc3440f
commit e53c6b678f
9 changed files with 150 additions and 61 deletions
@@ -158,9 +158,6 @@ public class Dungeon {
public static Hero hero;
public static Level level;
// Either Item or Class<? extends Item>
public static Object quickslot;
public static int depth;
public static int gold;
// Reason of death
@@ -512,10 +509,6 @@ public class Dungeon {
Journal.storeInBundle( bundle );
Generator.storeInBundle( bundle );
if (quickslot instanceof Class) {
bundle.put( QUICKSLOT, ((Class<?>)quickslot).getName() );
}
Scroll.save( bundle );
Potion.save( bundle );
Wand.save( bundle );
@@ -642,16 +635,6 @@ public class Dungeon {
Badges.reset();
}
String qsClass = bundle.getString( QUICKSLOT );
if (qsClass != null) {
try {
quickslot = Class.forName( qsClass );
} catch (ClassNotFoundException e) {
}
} else {
quickslot = null;
}
hero = null;
hero = (Hero)bundle.get( HERO );