v0.10.5.1

This commit is contained in:
Juan Pablo Arce
2020-09-22 11:31:56 -03:00
parent 44032d0ae0
commit 0002ad2c50
343 changed files with 12276 additions and 5023 deletions
@@ -9,7 +9,7 @@ namespace Barotrauma
foreach (PurchasedItem item in itemsToSell)
{
var itemValue = GetBuyValueAtCurrentLocation(item);
campaign.Map.CurrentLocation.StoreCurrentBalance -= itemValue;
Location.StoreCurrentBalance -= itemValue;
campaign.Money += itemValue;
PurchasedItems.Remove(item);
}
@@ -20,8 +20,8 @@ namespace Barotrauma
foreach (SoldItem item in itemsToBuy)
{
var itemValue = GetSellValueAtCurrentLocation(item.ItemPrefab);
if (location.StoreCurrentBalance < itemValue || item.Removed) { continue; }
location.StoreCurrentBalance += itemValue;
if (Location.StoreCurrentBalance < itemValue || item.Removed) { continue; }
Location.StoreCurrentBalance += itemValue;
campaign.Money -= itemValue;
SoldItems.Remove(item);
}
@@ -35,7 +35,7 @@ namespace Barotrauma
var itemValue = GetSellValueAtCurrentLocation(item.ItemPrefab);
// check if the store can afford the item and if the item hasn't been removed already
if (location.StoreCurrentBalance < itemValue || item.Removed) { continue; }
if (Location.StoreCurrentBalance < itemValue || item.Removed) { continue; }
if (!item.Removed && canAddToRemoveQueue && Entity.FindEntityByID(item.ID) is Item entity)
{
@@ -43,7 +43,7 @@ namespace Barotrauma
Entity.Spawner.AddToRemoveQueue(entity);
}
SoldItems.Add(item);
location.StoreCurrentBalance -= itemValue;
Location.StoreCurrentBalance -= itemValue;
campaign.Money += itemValue;
}
OnSoldItemsChanged?.Invoke();