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

@@ -432,7 +432,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var res = player.PlayerActor.Trait<PlayerResources>();
var cashText = new CachedTransform<int, string>(i => "$" + i);
template.Get<LabelWidget>("CASH").GetText = () => cashText.Update(res.Cash + res.Resources);
template.Get<LabelWidget>("CASH").GetText = () => cashText.Update(res.GetCashAndResources());
var incomeText = new CachedTransform<int, string>(i => "$" + i);
template.Get<LabelWidget>("INCOME").GetText = () => incomeText.Update(stats.DisplayIncome);
@@ -477,7 +477,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var res = player.PlayerActor.Trait<PlayerResources>();
var cashText = new CachedTransform<int, string>(i => "$" + i);
template.Get<LabelWidget>("CASH").GetText = () => cashText.Update(res.Cash + res.Resources);
template.Get<LabelWidget>("CASH").GetText = () => cashText.Update(res.GetCashAndResources());
var powerRes = player.PlayerActor.TraitOrDefault<PowerManager>();
if (powerRes != null)