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.utils.GLog;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -116,6 +117,22 @@ public class Ankh extends Item {
|
|||
public Glowing glowing() {
|
||||
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
|
||||
public int price() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user