v1.1.0: fixed bundling errors with summon elemental and reclaim trap
This commit is contained in:
parent
4d643fda6b
commit
203f61a520
|
@ -125,13 +125,13 @@ public class ReclaimTrap extends TargetedSpell {
|
|||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put(STORED_TRAP, storedTrap);
|
||||
if (storedTrap != null) bundle.put(STORED_TRAP, storedTrap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
storedTrap = bundle.getClass(STORED_TRAP);
|
||||
if (bundle.contains(STORED_TRAP)) storedTrap = bundle.getClass(STORED_TRAP);
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
|
|
@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.Random;
|
||||
import com.watabou.utils.Reflection;
|
||||
|
@ -122,6 +123,20 @@ public class SummonElemental extends Spell {
|
|||
return desc;
|
||||
}
|
||||
|
||||
private static final String SUMMON_CLASS = "summon_class";
|
||||
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put(SUMMON_CLASS, summonClass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
summonClass = bundle.getClass(SUMMON_CLASS);
|
||||
}
|
||||
|
||||
public WndBag.ItemSelector selector = new WndBag.ItemSelector() {
|
||||
@Override
|
||||
public String textPrompt() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user