Replace Cash + Resources with GetCashAndResources()

This commit is contained in:
dnqbob
2023-09-07 07:17:54 +08:00
committed by Gustas
parent 931118e1d8
commit 19c8c36030
5 changed files with 8 additions and 8 deletions

View File

@@ -113,7 +113,7 @@ namespace OpenRA.Mods.Common.Traits
else
{
// Don't put the player into negative funds
amount = Math.Max(-(Cash + Resources), amount);
amount = Math.Max(-GetCashAndResources(), amount);
TakeCash(-amount);
}
@@ -182,7 +182,7 @@ namespace OpenRA.Mods.Common.Traits
public bool TakeCash(int num, bool notifyLowFunds = false)
{
if (Cash + Resources < num)
if (GetCashAndResources() < num)
{
if (notifyLowFunds && Game.RunTime > lastNotificationTime + Info.InsufficientFundsNotificationInterval)
{