Skip to content

Commit

Permalink
Merge pull request #39372 from KorGgenT/fix-opened-cans
Browse files Browse the repository at this point in the history
fix opened cans
  • Loading branch information
ZhilkinSerg authored Apr 8, 2020
2 parents cc03785 + b592edb commit 9b63057
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/savegame_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2267,11 +2267,6 @@ void item::io( Archive &archive )
gun_set_mode( gun_mode_id( mode ) );
}

// Sealed item migration: items with "unseals_into" set should always have contents
if( contents.empty() && is_non_resealable_container() ) {
convert( type->container->unseals_into );
}

// Books without any chapters don't need to store a remaining-chapters
// counter, it will always be 0 and it prevents proper stacking.
if( get_chapters() == 0 ) {
Expand Down Expand Up @@ -2325,6 +2320,11 @@ void item::deserialize( JsonIn &jsin )
} else {
data.read( "contents", contents );
}

// Sealed item migration: items with "unseals_into" set should always have contents
if( contents.empty() && is_non_resealable_container() ) {
convert( type->container->unseals_into );
}
}

void item::serialize( JsonOut &json ) const
Expand Down

0 comments on commit 9b63057

Please sign in to comment.