From b592edb0ae146d659ede59fa23f62056ae24444f Mon Sep 17 00:00:00 2001 From: KorGgenT Date: Wed, 8 Apr 2020 13:49:12 -0400 Subject: [PATCH] fix opened cans --- src/savegame_json.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index 89f3ee06cd3ee..3d304990f6ec7 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -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 ) { @@ -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