rename ore to the more generic name resources everywhere
This commit is contained in:
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
var powerManager = world.LocalPlayer.PlayerActor.Trait<PowerManager>();
|
||||
var playerResources = world.LocalPlayer.PlayerActor.Trait<PlayerResources>();
|
||||
sidebarRoot.Get<LabelWidget>("CASH").GetText = () =>
|
||||
"${0}".F(playerResources.DisplayCash + playerResources.DisplayOre);
|
||||
"${0}".F(playerResources.DisplayCash + playerResources.DisplayResources);
|
||||
|
||||
playerWidgets.Get<ButtonWidget>("OPTIONS_BUTTON").OnClick = OptionsClicked;
|
||||
|
||||
@@ -104,14 +104,14 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
};
|
||||
|
||||
var siloBar = playerWidgets.Get<ResourceBarWidget>("SILOBAR");
|
||||
siloBar.GetProvided = () => playerResources.OreCapacity;
|
||||
siloBar.GetUsed = () => playerResources.Ore;
|
||||
siloBar.GetProvided = () => playerResources.ResourceCapacity;
|
||||
siloBar.GetUsed = () => playerResources.Resources;
|
||||
siloBar.TooltipFormat = "Silo Usage: {0}/{1}";
|
||||
siloBar.GetBarColor = () =>
|
||||
siloBar.GetBarColor = () =>
|
||||
{
|
||||
if (playerResources.Ore == playerResources.OreCapacity)
|
||||
if (playerResources.Resources == playerResources.ResourceCapacity)
|
||||
return Color.Red;
|
||||
if (playerResources.Ore >= 0.8 * playerResources.OreCapacity)
|
||||
if (playerResources.Resources >= 0.8 * playerResources.ResourceCapacity)
|
||||
return Color.Orange;
|
||||
return Color.LimeGreen;
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
|
||||
var costString = "$: {0}".F(cost);
|
||||
costLabel.GetText = () => costString;
|
||||
costLabel.GetColor = () => pr.DisplayCash + pr.DisplayOre >= cost
|
||||
costLabel.GetColor = () => pr.DisplayCash + pr.DisplayResources >= cost
|
||||
? Color.White : Color.Red;
|
||||
|
||||
var descString = tooltip.Description.Replace("\\n", "\n");
|
||||
|
||||
Reference in New Issue
Block a user