rename ore to the more generic name resources everywhere

This commit is contained in:
Matthias Mailänder
2014-05-17 14:38:07 +02:00
parent 30fa8f35d8
commit 3e627d2eba
24 changed files with 107 additions and 93 deletions

View File

@@ -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;
};

View File

@@ -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");