don't hardcode custom prerequisites anymore

to make those strings translatable
This commit is contained in:
Matthias Mailänder
2012-12-22 17:42:57 +01:00
parent b9194e4305
commit 8246b2f35f
4 changed files with 37 additions and 20 deletions

View File

@@ -90,16 +90,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
static string ActorName( string a )
{
// hack hack hack - going to die soon anyway
if (a == "barracks")
return "Infantry Production";
if (a == "vehicleproduction")
return "Vehicle Production";
if (a == "techcenter")
return "Tech Center";
if (a == "anypower")
return "Power Plant";
ActorInfo ai;
Rules.Info.TryGetValue(a.ToLowerInvariant(), out ai);
if (ai != null && ai.Traits.Contains<TooltipInfo>())

View File

@@ -323,16 +323,6 @@ namespace OpenRA.Mods.RA.Widgets
static string Description( string a )
{
// hack hack hack - going to die soon anyway
if (a == "barracks")
return "Infantry production";
if (a == "vehicleproduction")
return "Vehicle production";
if (a == "techcenter")
return "Tech Center";
if (a == "anypower")
return "Power Plant";
ActorInfo ai;
Rules.Info.TryGetValue(a.ToLowerInvariant(), out ai);
if (ai != null && ai.Traits.Contains<TooltipInfo>())

View File

@@ -734,3 +734,19 @@ ATWR:
DetectCloaked:
Range: 6
RenderRangeCircle:
# custom prerequisites:
BARRACKS:
Tooltip:
Name: Infantry Production
Description: Infantry Production
VEHICLEPRODUCTION:
Tooltip:
Name: Vehicle Production
Description: Vehicle Production
ANYPOWER:
Tooltip:
Name: Power Plant
Description: Power Plant

View File

@@ -1464,3 +1464,24 @@ WOOD:
HP: 100
Armor:
Type: Wood
# custom prerequisites:
BARRACKS:
Tooltip:
Name: Infantry Production
Description: Infantry Production
VEHICLEPRODUCTION:
Tooltip:
Name: Vehicle Production
Description: Vehicle Production
TECHCENTER:
Tooltip:
Name: Tech Center
Description: Tech Center
ANYPOWER:
Tooltip:
Name: Power Plant
Description: Power Plant