V0.1.1a: corrected Ankh not saving state (forgot to implement, doy..)
This commit is contained in:
parent
af01b4e3e8
commit
3ce1347e52
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -117,6 +118,22 @@ public class Ankh extends Item {
|
||||||
return isBlessed() ? WHITE : null;
|
return isBlessed() ? WHITE : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final String BLESSED = "blessed";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void storeInBundle( Bundle bundle ) {
|
||||||
|
super.storeInBundle( bundle );
|
||||||
|
bundle.put( BLESSED, blessed );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
|
super.restoreFromBundle( bundle );
|
||||||
|
//TODO: remove when saves from 0.1.1 are invalidated
|
||||||
|
if (bundle.contains( BLESSED ))
|
||||||
|
blessed = bundle.getBoolean( BLESSED );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int price() {
|
public int price() {
|
||||||
return 50 * quantity;
|
return 50 * quantity;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user