stockpiles: Fix unusable and usable loading for weapon and armor

Fixes #1294
develop
Pauli 2018-06-14 22:18:15 +03:00
parent ca744139f0
commit 6f7ace1f6d
1 changed files with 4 additions and 0 deletions

@ -1964,6 +1964,8 @@ void StockpileSerializer::read_weapons()
bool usable = weapons.usable(); bool usable = weapons.usable();
debug() << "unusable " << unusable << endl; debug() << "unusable " << unusable << endl;
debug() << "usable " << usable << endl; debug() << "usable " << usable << endl;
mPile->settings.weapons.unusable = unusable;
mPile->settings.weapons.usable = usable;
// weapon type // weapon type
unserialize_list_itemdef ( [=] ( const size_t & idx ) -> const std::string& unserialize_list_itemdef ( [=] ( const size_t & idx ) -> const std::string&
@ -2127,6 +2129,8 @@ void StockpileSerializer::read_armor()
bool usable = armor.usable(); bool usable = armor.usable();
debug() << "unusable " << unusable << endl; debug() << "unusable " << unusable << endl;
debug() << "usable " << usable << endl; debug() << "usable " << usable << endl;
mPile->settings.armor.unusable = unusable;
mPile->settings.armor.usable = usable;
// body type // body type
unserialize_list_itemdef ( [=] ( const size_t & idx ) -> const std::string& unserialize_list_itemdef ( [=] ( const size_t & idx ) -> const std::string&