Faction Test 100.10.0.0

This commit is contained in:
Markus Isberg
2022-12-07 17:46:02 +02:00
parent de250b4a64
commit e0c3754621
19 changed files with 147 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);