v1.0.3: fixed some aspects of lost inventory being lost on save/load
This commit is contained in:
parent
72e0b6ee1c
commit
724ffbb85b
|
@ -152,13 +152,13 @@ public class Belongings implements Iterable<Item> {
|
|||
backpack.restoreFromBundle( bundle );
|
||||
|
||||
weapon = (KindOfWeapon) bundle.get(WEAPON);
|
||||
if (weapon != null) {
|
||||
weapon.activate(owner);
|
||||
if (weapon() != null) {
|
||||
weapon().activate(owner);
|
||||
}
|
||||
|
||||
armor = (Armor)bundle.get( ARMOR );
|
||||
if (armor != null){
|
||||
armor.activate( owner );
|
||||
if (armor() != null){
|
||||
armor().activate( owner );
|
||||
}
|
||||
|
||||
//pre-0.8.2
|
||||
|
@ -189,9 +189,9 @@ public class Belongings implements Iterable<Item> {
|
|||
ring = (Ring) bundle.get(RING);
|
||||
}
|
||||
|
||||
if (artifact != null) artifact.activate(owner);
|
||||
if (misc != null) misc.activate( owner );
|
||||
if (ring != null) ring.activate( owner );
|
||||
if (artifact() != null) artifact().activate(owner);
|
||||
if (misc() != null) misc().activate( owner );
|
||||
if (ring() != null) ring().activate( owner );
|
||||
}
|
||||
|
||||
public static void preview( GamesInProgress.Info info, Bundle bundle ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user