public static void restoreFromBundle( Bundle bundle ) { Bundle node = bundle.getBundle( NODE ); if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) { alternative = node.getBoolean( ALTERNATIVE ); given = node.getBoolean( GIVEN ); completed = node.getBoolean( COMPLETED ); reward = (Ring)node.get( REWARD ); } }
@SuppressWarnings("unchecked") @Override public void restoreFromBundle( Bundle bundle ) { hp = bundle.getInt( HP ); pos = bundle.getInt( POS ); type = Type.valueOf( bundle.getString( TYPE ) ); items = new LinkedList<Item>( (Collection<? extends Item>)(Object) bundle.getCollection( ITEMS ) ); }
@Override public void restoreFromBundle( Bundle bundle ) { pos = bundle.getInt( POS ); visible = bundle.getBoolean( VISIBLE ); if (bundle.contains(ACTIVE)){ active = bundle.getBoolean(ACTIVE); } }
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); talkedTo = bundle.getBoolean( TALKEDTO ); firstSummon = bundle.getBoolean( FIRSTSUMMON ); ghostID = bundle.getInt( GHOSTID ); droppedPetals = bundle.getInt( PETALS ); if (bundle.contains(WEAPON)) weapon = (MeleeWeapon)bundle.get( WEAPON ); if (bundle.contains(ARMOR)) armor = (Armor)bundle.get( ARMOR ); }
public static void restoreFromBundle( Bundle bundle ) { Bundle node = bundle.getBundle( NODE ); if (!node.isNull() && (spawned = node.getBoolean( SPAWNED ))) { alternative = node.getBoolean( ALTERNATIVE ); given = node.getBoolean( GIVEN ); completed = node.getBoolean( COMPLETED ); reforged = node.getBoolean( REFORGED ); } else { reset(); } }
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); hitsToKnow = bundle.getInt( UNFAMILIRIARITY ); inscribe((Glyph) bundle.get(GLYPH)); seal = (BrokenSeal)bundle.get(SEAL); //pre-0.6.5 saves if (bundle.contains(AUGMENT)) augment = bundle.getEnum(AUGMENT, Augment.class); }
@Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); page = bundle.getString( PAGE ); } }
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); roomExit = (Room)bundle.get( ARENA ); arenaDoor = bundle.getInt( DOOR ); enteredArena = bundle.getBoolean( ENTERED ); keyDropped = bundle.getBoolean( DROPPED ); }
public Collection<Bundlable> getCollection( String key ) { ArrayList<Bundlable> list = new ArrayList<Bundlable>(); try { JSONArray array = data.getJSONArray( key ); for (int i=0; i < array.length(); i++) { list.add( new Bundle( array.getJSONObject( i ) ).get() ); } } catch (JSONException e) { } return list; }
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); weapon = (Weapon)bundle.get( WEAPON ); }
@SuppressWarnings("unchecked") @Override public void restoreFromBundle( Bundle bundle ) { if (bundle.contains( ITEMS )) { items = new ArrayList<>((Collection<Item>) ((Collection<?>) bundle.getCollection(ITEMS))); } adjustStats( bundle.getInt( LEVEL ) ); super.restoreFromBundle(bundle); }
@Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); arenaDoor = bundle.getInt( DOOR ); enteredArena = bundle.getBoolean( ENTERED ); keyDropped = bundle.getBoolean( DROPPED ); }