v0.10.5.1
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user