Build 0.20.11.0

This commit is contained in:
Markus Isberg
2022-12-07 17:40:58 +02:00
parent f5cd0dbd1c
commit a10cc13566
19 changed files with 141 additions and 62 deletions
@@ -1061,11 +1061,9 @@ namespace Barotrauma
}
// Update store stock when saving and quitting in an outpost (normally updated when CampaignMode.End() is called)
if (GameSession?.Campaign is SinglePlayerCampaign spCampaign && Level.IsLoadedFriendlyOutpost && spCampaign.Map?.CurrentLocation != null && spCampaign.CargoManager != null)
if (GameSession?.Campaign is SinglePlayerCampaign spCampaign && Level.IsLoadedFriendlyOutpost)
{
spCampaign.Map.CurrentLocation.AddStock(spCampaign.CargoManager.SoldItems);
spCampaign.CargoManager.ClearSoldItemsProjSpecific();
spCampaign.Map.CurrentLocation.RemoveStock(spCampaign.CargoManager.PurchasedItems);
spCampaign.UpdateStoreStock();
}
SaveUtil.SaveGame(GameSession.SavePath);