don't hardcode custom prerequisites anymore
to make those strings translatable
This commit is contained in:
@@ -90,16 +90,6 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
|
|
||||||
static string ActorName( string a )
|
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;
|
ActorInfo ai;
|
||||||
Rules.Info.TryGetValue(a.ToLowerInvariant(), out ai);
|
Rules.Info.TryGetValue(a.ToLowerInvariant(), out ai);
|
||||||
if (ai != null && ai.Traits.Contains<TooltipInfo>())
|
if (ai != null && ai.Traits.Contains<TooltipInfo>())
|
||||||
|
|||||||
@@ -323,16 +323,6 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
|
|
||||||
static string Description( string a )
|
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;
|
ActorInfo ai;
|
||||||
Rules.Info.TryGetValue(a.ToLowerInvariant(), out ai);
|
Rules.Info.TryGetValue(a.ToLowerInvariant(), out ai);
|
||||||
if (ai != null && ai.Traits.Contains<TooltipInfo>())
|
if (ai != null && ai.Traits.Contains<TooltipInfo>())
|
||||||
|
|||||||
@@ -734,3 +734,19 @@ ATWR:
|
|||||||
DetectCloaked:
|
DetectCloaked:
|
||||||
Range: 6
|
Range: 6
|
||||||
RenderRangeCircle:
|
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
|
||||||
@@ -1464,3 +1464,24 @@ WOOD:
|
|||||||
HP: 100
|
HP: 100
|
||||||
Armor:
|
Armor:
|
||||||
Type: Wood
|
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
|
||||||
Reference in New Issue
Block a user