Replaced "Earned this min" by an Oil Derrick count in the economy statistics

This commit is contained in:
abcdefg30
2019-09-01 00:42:31 +02:00
committed by teinarss
parent 1e6660ecb2
commit 912a424596
7 changed files with 76 additions and 101 deletions

View File

@@ -348,7 +348,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
template.Get<LabelWidget>("CASH").GetText = () => "$" + (res.Cash + res.Resources);
template.Get<LabelWidget>("EARNED_MIN").GetText = () => AverageEarnedPerMinute(res.Earned);
template.Get<LabelWidget>("EARNED_THIS_MIN").GetText = () => "$" + stats.EarnedThisMinute;
template.Get<LabelWidget>("EARNED").GetText = () => "$" + res.Earned;
template.Get<LabelWidget>("SPENT").GetText = () => "$" + res.Spent;
@@ -360,6 +359,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var harvesters = template.Get<LabelWidget>("HARVESTERS");
harvesters.GetText = () => world.ActorsHavingTrait<Harvester>().Count(a => a.Owner == player && !a.IsDead).ToString();
var derricks = template.GetOrNull<LabelWidget>("DERRICKS");
if (derricks != null)
derricks.GetText = () => world.ActorsHavingTrait<UpdatesDerrickCount>().Count(a => a.Owner == player && !a.IsDead).ToString();
return template;
}