Clean up Buildable vs Tooltip vs Valued. cnc only.

This commit is contained in:
Paul Chote
2010-08-26 18:00:48 +12:00
parent 7b7b9d3319
commit 1d7ca206f4
15 changed files with 381 additions and 261 deletions

View File

@@ -39,9 +39,9 @@ namespace OpenRA.GameRules
foreach( var b in player.World.Queries.OwnedBy[player].Where( x=>x.Info.Traits.Contains<BuildingInfo>() ) )
{
ret[ b.Info.Name ].Add( b );
var buildable = b.Info.Traits.GetOrDefault<BuildableInfo>();
if( buildable != null )
foreach( var alt in buildable.AlternateName )
var tt = b.Info.Traits.GetOrDefault<TooltipInfo>();
if( tt != null )
foreach( var alt in tt.AlternateName )
ret[ alt ].Add( b );
}
return ret;

View File

@@ -13,26 +13,34 @@ namespace OpenRA.Traits
public class ValuedInfo : ITraitInfo
{
public readonly int Cost = 0;
public readonly string Description = "";
public readonly string LongDesc = "";
public readonly string[] Owner = { };
public virtual object Create(ActorInitializer init) { return new Valued(); }
public object Create(ActorInitializer init) { return new Valued(); }
}
public class BuildableInfo : ValuedInfo
public class TooltipInfo : ITraitInfo
{
public readonly string Description = "";
public readonly string Name = "";
public readonly string Icon = null;
public readonly string[] AlternateName = { };
public object Create(ActorInitializer init) { return new Tooltip(); }
}
public class BuildableInfo : ITraitInfo
{
[ActorReference]public readonly string[] Prerequisites = { };
[ActorReference] public readonly string[] BuiltAt = { };
public readonly string Icon = null;
public readonly string[] AlternateName = { };
[ActorReference]
public readonly string[] Prerequisites = { };
[ActorReference]
public readonly string[] BuiltAt = { };
public readonly string[] Owner = { };
// todo: UI fluff; doesn't belong here
public readonly int BuildPaletteOrder = 9999;
public readonly string Hotkey = null;
public override object Create(ActorInitializer init) { return new Buildable(); }
public object Create(ActorInitializer init) { return new Buildable(); }
}
class Valued { } /* halfway to buildable */
class Buildable { }
class Valued { }
class Buildable { }
class Tooltip { }
}

View File

@@ -54,7 +54,7 @@ namespace OpenRA.Traits
for (var n = 0; n < order.TargetLocation.X; n++) // repeat count
{
var unit = Rules.Info[order.TargetString];
var ui = unit.Traits.Get<BuildableInfo>();
var cost = unit.Traits.Contains<ValuedInfo>() ? unit.Traits.Get<ValuedInfo>().Cost : 0;
var time = GetBuildTime(self, order.TargetString);
if (!Rules.TechTree.BuildableItems(order.Player, unit.Category).Contains(order.TargetString))
@@ -63,7 +63,7 @@ namespace OpenRA.Traits
bool hasPlayedSound = false;
BeginProduction(unit.Category,
new ProductionItem(order.TargetString, (int)time, ui.Cost,
new ProductionItem(order.TargetString, (int)time, cost,
() => self.World.AddFrameEndTask(
_ =>
{
@@ -102,8 +102,8 @@ namespace OpenRA.Traits
return 0;
if (Game.LobbyInfo.GlobalSettings.AllowCheats && self.Trait<DeveloperMode>().FastBuild) return 0;
var ui = unit.Traits.Get<BuildableInfo>();
var time = ui.Cost
var cost = unit.Traits.Contains<ValuedInfo>() ? unit.Traits.Get<ValuedInfo>().Cost : 0;
var time = cost
* self.Owner.PlayerActor.Info.Traits.Get<ProductionQueueInfo>().BuildSpeed /* todo: country-specific build speed bonus */
* (25 * 60) /* frames per min */ /* todo: build acceleration, if we do that */
/ 1000;

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Traits
if (owner.Country == null)
return;
var effectivePrereq = prerequisites.Where( a => a.Traits.Get<BuildableInfo>().Owner.Contains( owner.Country.Race ) );
var effectivePrereq = prerequisites.Where( a => a.Traits.Contains<BuildableInfo>() && a.Traits.Get<BuildableInfo>().Owner.Contains( owner.Country.Race ) );
var nowHasPrerequisites = effectivePrereq.Any() &&
effectivePrereq.All( a => buildings[ a.Name ].Any( b => !b.Trait<Building>().Disabled ) );

View File

@@ -96,7 +96,7 @@ namespace OpenRA.Traits
var buildings = Rules.TechTree.GatherBuildings(Owner);
var effectivePrereq = Info.Prerequisites
.Select(a => a.ToLowerInvariant())
.Where(a => Rules.Info[a].Traits.Get<ValuedInfo>().Owner.Contains(Owner.Country.Race));
.Where(a => Rules.Info[a].Traits.Get<BuildableInfo>().Owner.Contains(Owner.Country.Race));
if (Info.Prerequisites.Count() == 0)
return Owner.PlayerActor.Trait<PlayerResources>().GetPowerState() == PowerState.Normal;

View File

@@ -47,8 +47,8 @@ namespace OpenRA.Widgets
if (actor == null || !actor.IsVisible(world.LocalPlayer))
return;
var text = actor.Info.Traits.Contains<ValuedInfo>()
? actor.Info.Traits.Get<ValuedInfo>().Description
var text = actor.Info.Traits.Contains<TooltipInfo>()
? actor.Info.Traits.Get<TooltipInfo>().Name
: actor.Info.Name;
var text2 = (actor.Owner.NonCombatant)
? "" : "{0}".F(actor.Owner.PlayerName);

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.RA.Crates
public override int GetSelectionShares(Actor collector)
{
var valuedInfo = Rules.Info[Info.Unit].Traits.Get<ValuedInfo>();
var valuedInfo = Rules.Info[Info.Unit].Traits.Get<BuildableInfo>();
return valuedInfo.Owner.Contains(collector.Owner.Country.Race)
? base.GetSelectionShares(collector)
: 0; // this unit is not buildable by the collector's country, so

View File

@@ -61,7 +61,7 @@ namespace OpenRA.Mods.RA.Widgets
.Where(u => u.Traits.Contains<BuildableInfo>())
.ToDictionary(
u => u.Name,
u => SpriteSheetBuilder.LoadAllSprites(u.Traits.Get<BuildableInfo>().Icon ?? (u.Name + "icon"))[0]);
u => SpriteSheetBuilder.LoadAllSprites(u.Traits.Get<TooltipInfo>().Icon ?? (u.Name + "icon"))[0]);
var groups = Rules.Categories();
@@ -331,7 +331,7 @@ namespace OpenRA.Mods.RA.Widgets
if( a[ 0 ] == '@' )
return "any " + a.Substring( 1 );
else
return Rules.Info[ a.ToLowerInvariant() ].Traits.Get<ValuedInfo>().Description;
return Rules.Info[ a.ToLowerInvariant() ].Traits.Get<TooltipInfo>().Name;
}
void HandleBuildPalette( World world, string item, bool isLmb )
@@ -457,24 +457,25 @@ namespace OpenRA.Mods.RA.Widgets
var p = pos.ToFloat2() - new float2(297, -3);
var info = Rules.Info[unit];
var tooltip = info.Traits.Get<TooltipInfo>();
var buildable = info.Traits.Get<BuildableInfo>();
var cost = info.Traits.Get<ValuedInfo>().Cost;
var buildings = Rules.TechTree.GatherBuildings( pl );
var canBuildThis = Rules.TechTree.CanBuild(info, pl, buildings);
var longDescSize = Game.Renderer.RegularFont.Measure(buildable.LongDesc.Replace("\\n", "\n")).Y;
var longDescSize = Game.Renderer.RegularFont.Measure(tooltip.Description.Replace("\\n", "\n")).Y;
if (!canBuildThis) longDescSize += 8;
WidgetUtils.DrawPanel("dialog4", new Rectangle(Game.viewport.Width - 300, pos.Y, 300, longDescSize + 65));
Game.Renderer.BoldFont.DrawText(
buildable.Description + ((buildable.Hotkey != null)? " ({0})".F(buildable.Hotkey.ToUpper()) : ""),
tooltip.Name + ((buildable.Hotkey != null)? " ({0})".F(buildable.Hotkey.ToUpper()) : ""),
p.ToInt2() + new int2(5, 5), Color.White);
var resources = pl.PlayerActor.Trait<PlayerResources>();
DrawRightAligned("${0}".F(buildable.Cost), pos + new int2(-5, 5),
(resources.DisplayCash + resources.DisplayOre >= buildable.Cost ? Color.White : Color.Red ));
DrawRightAligned("${0}".F(cost), pos + new int2(-5, 5),
(resources.DisplayCash + resources.DisplayOre >= cost ? Color.White : Color.Red ));
var lowpower = resources.GetPowerState() != PowerState.Normal;
var time = ProductionQueue.GetBuildTime(pl.PlayerActor, info.Name)
@@ -500,7 +501,7 @@ namespace OpenRA.Mods.RA.Widgets
}
p += new int2(0, 15);
Game.Renderer.RegularFont.DrawText(buildable.LongDesc.Replace("\\n", "\n"),
Game.Renderer.RegularFont.DrawText(tooltip.Description.Replace("\\n", "\n"),
p.ToInt2(), Color.White);
Game.Renderer.RgbaSpriteRenderer.Flush();

View File

@@ -6,8 +6,8 @@ V01:
Building:
Footprint: xx xx
Dimensions: 2,2
Valued:
Description: Church
Tooltip:
Name: Church
V02:
Inherits: ^CivBuilding
@@ -147,15 +147,18 @@ BARB:
Health:
HP: 100
Armor: none
Valued:
Description: Wire Fence
Tooltip:
Name: Wire Fence
Icon: barbicnh
WOOD:
Inherits: ^Wall
Health:
HP: 100
Armor: none
Valued:
Description: Wooden Fence
Tooltip:
Name: Wooden Fence
Icon: woodicnh
BRIDGE1:
Inherits: ^Bridge

View File

@@ -102,7 +102,8 @@
Bounds: 12,17,0,-9
Valued:
Cost: 70
Description: Civilian
Tooltip:
Name: Civilian
Mobile:
Speed: 4
Health:
@@ -186,16 +187,16 @@
Armor: wood
Building:
-RepairableBuilding:
Valued:
Description: Civilian Building
Tooltip:
Name: Civilian Building
^CivField:
Inherits: ^CivBuilding
-Selectable:
DeadBuildingState:
Zombie: true
Valued:
Description: Field
Tooltip:
Name: Field
RenderBuilding:
OverrideTheater: DESERT
OverrideImage: v23
@@ -227,8 +228,8 @@
^Tree:
Category: Building
Valued:
Description: Tree
Tooltip:
Name: Tree
RenderBuilding:
Palette: terrain
Building:
@@ -239,8 +240,8 @@
Terrain: Tree
^Rock:
Category: Building
Valued:
Description: Rock
Tooltip:
Name: Rock
RenderBuilding:
Palette: terrain
Building:
@@ -264,8 +265,8 @@
^Bridge:
Category: Building
Valued:
Description: Bridge
Tooltip:
Name: Bridge
Targetable:
TargetTypes: Ground, Water
BelowUnits:

View File

@@ -1,12 +1,14 @@
E1:
Inherits: ^Infantry
Valued:
Cost: 100
Tooltip:
Name: Minigunner
Description: General-purpose infantry.\n Strong vs Infantry\n Weak vs Vehicles
Icon: e1icnh
Buildable:
BuildPaletteOrder: 10
Owner: gdi, nod
Cost: 100
Description: Minigunner
LongDesc: General-purpose infantry.\n Strong vs Infantry\n Weak vs Vehicles
Icon: e1icnh
Selectable:
Bounds: 12,17,0,-6
Mobile:
@@ -19,14 +21,16 @@ E1:
E2:
Inherits: ^Infantry
Valued:
Cost: 160
Tooltip:
Name: Grenadier
Description: Infantry armed with grenades. \n Strong vs Buildings, Infantry\n Weak vs Vehicles
Icon: e2icnh
Buildable:
BuildPaletteOrder: 40
Prerequisites: hq
Owner: gdi
Cost: 160
Description: Grenadier
LongDesc: Infantry armed with grenades. \n Strong vs Buildings, Infantry\n Weak vs Vehicles
Icon: e2icnh
Selectable:
Bounds: 12,17,0,-6
Mobile:
@@ -41,13 +45,15 @@ E2:
E3:
Inherits: ^Infantry
Valued:
Cost: 300
Tooltip:
Name: Rocket Soldier
Description: Anti-tank/Anti-aircraft infantry. \n Strong vs Tanks, Aircraft\n Weak vs Infantry
Icon: e3icnh
Buildable:
BuildPaletteOrder: 20
Owner: nod, gdi
Cost: 300
Description: Rocket Soldier
LongDesc: Anti-tank/Anti-aircraft infantry. \n Strong vs Tanks, Aircraft\n Weak vs Infantry
Icon: e3icnh
Selectable:
Bounds: 12,17,0,-6
Mobile:
@@ -62,14 +68,16 @@ E3:
E4:
Inherits: ^Infantry
Valued:
Cost: 200
Tooltip:
Name: Flamethrower
Description: Advanced Anti-infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles
Icon: e4icnh
Buildable:
BuildPaletteOrder: 40
Owner: nod
Prerequisites: hq
Cost: 200
Description: Flamethrower
LongDesc: Advanced Anti-infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles
Icon: e4icnh
Selectable:
Bounds: 12,17,0,-6
Mobile:
@@ -87,13 +95,15 @@ E4:
E5:
Inherits: ^Infantry
Valued:
Cost: 300
Tooltip:
Name: Chem Warrior
Description: Advanced Anti-infantry unit.\n Strong vs Infantry\n Weak vs Vehicles
Icon: e5icnh
Buildable:
BuildPaletteOrder: 50
Owner: nod
Cost: 300
Description: Chem Warrior
LongDesc: Advanced Anti-infantry unit.\n Strong vs Infantry\n Weak vs Vehicles
Icon: e5icnh
Prerequisites: tmpl
Selectable:
Bounds: 12,17,0,-6
@@ -113,13 +123,15 @@ E5:
E6:
Inherits: ^Infantry
Valued:
Cost: 500
Tooltip:
Name: Engineer
Description: Infiltrates and captures enemy structures.\n Strong vs Nothing\n Weak vs Everything
Icon: e6icnh
Buildable:
BuildPaletteOrder: 30
Owner: gdi,nod
Cost: 500
Description: Engineer
LongDesc: Infiltrates and captures enemy structures.\n Strong vs Nothing\n Weak vs Everything
Icon: e6icnh
Selectable:
Bounds: 12,17,0,-6
Mobile:
@@ -135,14 +147,16 @@ E6:
RMBO:
Inherits: ^Infantry
Valued:
Cost: 1000
Tooltip:
Icon: rmboicnh
Name: Commando
Description: Elite sniper infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles
Buildable:
BuildPaletteOrder: 50
Owner: gdi
Cost: 1000
Prerequisites: eye
Icon: rmboicnh
Description: Commando
LongDesc: Elite sniper infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles
Selectable:
Bounds: 12,17,0,-6
Voice: CommandoVoice

View File

@@ -2,7 +2,10 @@ FACT:
Inherits: ^Building
Valued:
Cost: 2000
Description: Construction Yard
Tooltip:
Name: Construction Yard
Icon: mcvicnh
Description: Builds structures
Building:
Power: 15
Footprint: xxx xxx xxx
@@ -23,13 +26,15 @@ FACT:
Facing: 108
NUKE:
Inherits: ^Building
Buildable:
Valued:
Cost: 300
Tooltip:
Name: Power Plant
Icon: nukeicnh
Description: Provides power for other structures
Buildable:
BuildPaletteOrder: 10
Owner: gdi,nod
Cost: 300
Description: Power Plant
LongDesc: Provides power for other structures
Building:
Power: 100
Footprint: x_ xx
@@ -44,14 +49,16 @@ NUKE:
PROC.proxy:
Inherits: ^Building
Buildable:
Valued:
Cost: 2000
Tooltip:
Name: Tiberium Refinery
Icon: procicnh
Description: Processes raw Tiberium into useable resources
Buildable:
BuildPaletteOrder: 30
Prerequisites: nuke
Owner: gdi,nod
Cost: 2000
Description: Tiberium Refinery
LongDesc: Processes raw Tiberium into useable resources
Building:
Power: -50
Footprint: ___xx xxxxx xxx__ xxx__
@@ -69,8 +76,10 @@ PROC:
Inherits: ^Building
Valued:
Cost: 1700
Description: Tiberium Refinery
LongDesc: Processes raw Tiberium into useable resources
Tooltip:
Name: Tiberium Refinery
Icon: procicnh
Description: Processes raw Tiberium into useable resources
Building:
Power: -30
Footprint: ___ xxx ===
@@ -106,14 +115,16 @@ PROC:
SpawnOffset: 3,1
SILO:
Inherits: ^Building
Buildable:
Valued:
Cost: 150
Tooltip:
Name: Tiberium Silo
Icon: siloicnh
Description: Stores processed Tiberium
Buildable:
BuildPaletteOrder: 20
Prerequisites: proc
Owner: gdi,nod
Cost: 150
Description: Tiberium Silo
LongDesc: Stores processed Tiberium
Building:
Power: -10
Footprint: xx
@@ -134,15 +145,17 @@ SILO:
PYLE:
Inherits: ^Building
Buildable:
Valued:
Cost: 300
Tooltip:
Name: Barracks
Icon: pyleicnh
Description: Trains infantry
AlternateName: @Barracks
Buildable:
BuildPaletteOrder: 40
Prerequisites: nuke
Owner: gdi
Cost: 300
Description: Barracks
LongDesc: Trains infantry
AlternateName: @Barracks
Building:
Power: -20
Footprint: xx xx
@@ -163,15 +176,17 @@ PYLE:
HAND:
Inherits: ^Building
Buildable:
Valued:
Cost: 300
Tooltip:
Name: Hand of Nod
Icon: handicnh
Description: Trains infantry
AlternateName: @Barracks
Buildable:
BuildPaletteOrder: 40
Prerequisites: nuke
Owner: nod
Cost: 300
Description: Hand of Nod
LongDesc: Trains infantry
AlternateName: @Barracks
Building:
Power: -20
Footprint: __ xx xx
@@ -192,15 +207,17 @@ HAND:
AFLD:
Inherits: ^Building
Buildable:
Valued:
Cost: 2000
Tooltip:
Name: Airstrip
Icon: afldicnh
AlternateName: @Vehicle Production
Description: Provides a dropzone for vehicle reinforcements
Buildable:
BuildPaletteOrder: 60
Prerequisites: proc
Owner: nod
Cost: 2000
Description: Airstrip
AlternateName: @Vehicle Production
LongDesc: Provides a dropzone for vehicle reinforcements
Building:
Power: -30
Footprint: xxxx xxxx
@@ -223,15 +240,17 @@ AFLD:
WEAP:
Inherits: ^Building
Buildable:
Valued:
Cost: 2000
Tooltip:
Name: Weapons Factory
Icon: weapicnh
AlternateName: @Vehicle Production
Description: Assembly point for vehicle reinforcements
Buildable:
BuildPaletteOrder: 60
Prerequisites: proc
Owner: gdi
Cost: 2000
Description: Weapons Factory
AlternateName: @Vehicle Production
LongDesc: Assembly point for vehicle reinforcements
Building:
Power: -30
Footprint: ___ xxx ===
@@ -256,14 +275,16 @@ HQ:
RequiresPower:
CanPowerDown:
Inherits: ^Building
Buildable:
Valued:
Cost: 1000
Tooltip:
Name: Communications Center
Icon: hqicnh
Description: Provides an overview of the battlefield.\n Requires power to operate.
Buildable:
BuildPaletteOrder: 80
Prerequisites: proc
Owner: gdi,nod
Cost: 1000
Description: Communications Center
LongDesc: Provides an overview of the battlefield.\n Requires power to operate.
Building:
Power: -40
Footprint: __ xx
@@ -281,14 +302,16 @@ HQ:
NUK2:
Inherits: ^Building
Buildable:
Valued:
Cost: 500
Tooltip:
Name: Advanced Power Plant
Icon:nuk2icnh
Description: Provides more power, cheaper than the \nstandard Power Plant
Buildable:
BuildPaletteOrder: 90
Prerequisites: hq
Owner: gdi,nod
Cost: 500
Description: Advanced Power Plant
LongDesc: Provides more power, cheaper than the \nstandard Power Plant
Building:
Power: 200
Footprint: xx xx
@@ -303,14 +326,16 @@ NUK2:
FIX:
Inherits: ^Building
Buildable:
Valued:
Cost: 1200
Tooltip:
Name: Repair Facility
Icon: fixicnh
Description: Repairs vehicles and allows the\nconstruction of additional bases.
Buildable:
BuildPaletteOrder: 70
Prerequisites: @Vehicle Production
Owner: gdi,nod
Cost: 1200
Description: Repair Facility
LongDesc: Repairs vehicles and allows the\nconstruction of additional bases.
Building:
Power: -30
Footprint: _x_ xxx _x_
@@ -328,14 +353,16 @@ FIX:
HPAD:
Inherits: ^Building
Buildable:
Valued:
Cost: 1500
Tooltip:
Name: Helipad
Icon:hpadicnh
Description: Produces and reloads helicopters
Buildable:
BuildPaletteOrder: 50
Prerequisites: @Barracks
Owner: gdi,nod
Cost: 1500
Description: Helipad
LongDesc: Produces and reloads helicopters
Building:
Power: -10
Footprint: xx xx
@@ -361,15 +388,17 @@ EYE:
RequiresPower:
CanPowerDown:
Inherits: ^Building
Buildable:
Valued:
Cost: 1800
Tooltip:
Name: Advanced Communications Center
Icon: eyeicnh
Description: Provides access to the Ion Cannon.\n Requires power to operate.
AlternateName: @Superweapon
Buildable:
BuildPaletteOrder: 100
Prerequisites: hq
Owner: gdi
Cost: 1800
Description: Advanced Communications Center
LongDesc: Provides access to the Ion Cannon.\n Requires power to operate.
AlternateName: @Superweapon
Building:
Power: -200
Footprint: __ xx
@@ -388,15 +417,17 @@ TMPL:
RequiresPower:
CanPowerDown:
Inherits: ^Building
Buildable:
Valued:
Cost: 2000
Tooltip:
Name: Temple of Nod
Icon: tmplicnh
Description: Place of worship and secret missile silo.\nRequires power to operate.
AlternateName: @Superweapon
Buildable:
BuildPaletteOrder: 100
Prerequisites: hq
Owner: nod
Cost: 2000
Description: Temple of Nod
LongDesc: Place of worship and secret missile silo.\nRequires power to operate.
AlternateName: @Superweapon
Building:
Power: -150
Footprint: ___ xxx xxx
@@ -415,14 +446,16 @@ OBLI:
Category: Defense
RequiresPower:
Inherits: ^Building
Buildable:
Valued:
Cost: 1500
Tooltip:
Name: Obelisk of Light
Icon:obliicnh
Description: Advanced base defense. Requires power\nto operate.\n Strong vs Tanks, Infantry\n Weak vs Aircraft
Buildable:
BuildPaletteOrder: 60
Prerequisites: tmpl
Owner: nod
Cost: 1500
Description: Obelisk of Light
LongDesc: Advanced base defense. Requires power\nto operate.\n Strong vs Tanks, Infantry\n Weak vs Aircraft
Building:
Power: -150
Footprint: _ x
@@ -446,14 +479,16 @@ OBLI:
CYCL:
Category: Defense
Inherits: ^Wall
Buildable:
Valued:
Cost: 25
Tooltip:
Name: Chain Link Barrier
Icon:cyclicnh
Description: Stops infantry and blocks enemy fire.\nCan be crushed by tanks.
Buildable:
BuildPaletteOrder: 10
Prerequisites: fact
Owner: nod
Cost: 25
Description: Chain Link Barrier
LongDesc: Stops infantry and blocks enemy fire.\nCan be crushed by tanks.
Health:
HP: 300
Armor: none
@@ -461,14 +496,16 @@ CYCL:
SBAG:
Category: Defense
Inherits: ^Wall
Buildable:
Valued:
Cost: 25
Tooltip:
Name: Sandbag Barrier
Icon:sbagicnh
Description: Stops infantry and blocks enemy fire.\nCan be crushed by tanks.
Buildable:
BuildPaletteOrder: 20
Prerequisites: fact
Owner: gdi
Cost: 25
Description: Sandbag Barrier
LongDesc: Stops infantry and blocks enemy fire.\nCan be crushed by tanks.
Health:
HP: 250
Armor: none
@@ -476,14 +513,16 @@ SBAG:
BRIK:
Category: Defense
Inherits: ^Wall
Buildable:
Valued:
Cost: 100
Tooltip:
Name: Concrete Barrier
Icon:brikicnh
Description: Stop units and blocks enemy fire.
Buildable:
BuildPaletteOrder: 30
Prerequisites: fact
Owner: gdi,nod
Cost: 100
Description: Concrete Barrier
LongDesc: Stop units and blocks enemy fire.
Health:
HP: 1000
Armor: heavy
@@ -493,14 +532,16 @@ BRIK:
GUN:
Category: Defense
Inherits: ^Building
Buildable:
Valued:
Cost: 600
Tooltip:
Name: Turret
Icon: gunicnh
Description: Anti-Armor base defense.\n Strong vs Tanks\n Weak vs Infantry, Aircraft
Buildable:
BuildPaletteOrder: 40
Prerequisites: hand
Owner: nod
Cost: 600
Description: Turret
LongDesc: Anti-Armor base defense.\n Strong vs Tanks\n Weak vs Infantry, Aircraft
Building:
Power: -20
Health:
@@ -522,14 +563,16 @@ GUN:
SAM:
Category: Defense
Inherits: ^Building
Buildable:
Valued:
Cost: 750
Tooltip:
Name: SAM Site
Icon: samicnh
Description: Anti-Air base defense.\n Strong vs Aircraft\n Weak vs Infantry, Tanks
Buildable:
BuildPaletteOrder: 50
Prerequisites: hand
Owner: nod
Cost: 750
Description: SAM Site
LongDesc: Anti-Air base defense.\n Strong vs Aircraft\n Weak vs Infantry, Tanks
Building:
Power: -20
Footprint: xx
@@ -553,14 +596,16 @@ SAM:
GTWR:
Category: Defense
Inherits: ^Building
Buildable:
Valued:
Cost: 500
Tooltip:
Name: Guard Tower
Icon: gtwricnh
Description: Basic defensive structure.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft
Buildable:
BuildPaletteOrder: 50
Prerequisites: pyle
Owner: gdi
Cost: 500
Description: Guard Tower
LongDesc: Basic defensive structure.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft
Building:
Power: -10
Health:
@@ -578,14 +623,16 @@ GTWR:
ATWR:
Category: Defense
Inherits: ^Building
Buildable:
Valued:
Cost: 1000
Tooltip:
Name: Advanced Guard Tower
Icon: atwricnh
Description: Anti-armor defensive structure.\n Strong vs Light Vehicles, Tanks\n Weak vs Infantry
Buildable:
BuildPaletteOrder: 60
Prerequisites: hq
Owner: gdi
Cost: 1000
Description: Advanced Guard Tower
LongDesc: Anti-armor defensive structure.\n Strong vs Light Vehicles, Tanks\n Weak vs Infantry
Building:
Power: -20
Health:

View File

@@ -146,9 +146,8 @@ World:
WaterChance: 0
CRATE:
Valued:
Cost: 0
Description: Crate
Tooltip:
Name: Crate
Crate:
Lifetime: 120
TerrainTypes: Clear, Rough, Road, Ore, Beach

View File

@@ -4,8 +4,8 @@ SPLIT2:
Palette: terrain
SeedsResource:
ResourceType:Tiberium
Valued:
Description: Blossom Tree
Tooltip:
Name: Blossom Tree
-Selectable:
RadarColorFromTerrain:
Terrain: Ore
@@ -16,8 +16,8 @@ SPLIT3:
Palette: terrain
SeedsResource:
ResourceType:Tiberium
Valued:
Description: Blossom Tree
Tooltip:
Name: Blossom Tree
-Selectable:
RadarColorFromTerrain:
Terrain: Ore

View File

@@ -1,13 +1,15 @@
MCV:
Inherits: ^Vehicle
Buildable:
Valued:
Cost: 2000
Tooltip:
Name: Mobile Construction Vehicle
Icon: mcvicnh
Description: Deploys into another Construction Yard.\n Unarmed
Buildable:
BuildPaletteOrder: 70
Prerequisites: fix
Owner: gdi,nod
Cost: 2000
Description: Mobile Construction Vehicle
LongDesc: Deploys into another Construction Yard.\n Unarmed
Selectable:
Priority: 3
Mobile:
@@ -28,14 +30,16 @@ MCV:
HARV:
Inherits: ^Tank
Buildable:
Valued:
Cost: 1400
Tooltip:
Name: Harvester
Icon: harvicnh
Description: Collects Tiberium for processing.\n Unarmed
Buildable:
BuildPaletteOrder: 10
Prerequisites: proc
Owner: gdi,nod
Cost: 1400
Description: Harvester
LongDesc: Collects Tiberium for processing.\n Unarmed
Selectable:
Priority: 7
Harvester:
@@ -54,14 +58,16 @@ HARV:
APC:
Inherits: ^Tank
Buildable:
Valued:
Cost: 700
Tooltip:
Name: Armored Personnel Carrier
Icon: apcicnh
Description: Tough infantry transport.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft
Buildable:
BuildPaletteOrder: 30
Prerequisites: pyle
Owner: gdi
Cost: 700
Description: Armored Personnel Carrier
LongDesc: Tough infantry transport.\n Strong vs Infantry, Light Vehicles\n Weak vs Tanks, Aircraft
Mobile:
ROT: 5
Speed: 15
@@ -84,14 +90,16 @@ APC:
ARTY:
Inherits: ^Tank
Buildable:
Valued:
Cost: 600
Tooltip:
Name: Artillery
Icon:artyicnh
Description: Long-range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Buildable:
BuildPaletteOrder: 40
Prerequisites: hq
Owner: gdi
Cost: 600
Description: Artillery
LongDesc: Long-range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Mobile:
ROT: 2
Speed: 6
@@ -108,14 +116,16 @@ ARTY:
FTNK:
Inherits: ^Tank
Buildable:
Valued:
Cost: 800
Tooltip:
Name: Flame Tank
Icon: ftnkicnh
Description: Heavily armored flame-throwing vehicle.\n Strong vs Infantry, Buildings\n Weak vs Aircraft
Buildable:
BuildPaletteOrder: 50
Prerequisites: hq
Owner: nod
Cost: 800
Description: Flame Tank
LongDesc: Heavily armored flame-throwing vehicle.\n Strong vs Infantry, Buildings\n Weak vs Aircraft
Mobile:
ROT: 5
Speed: 9
@@ -133,14 +143,16 @@ FTNK:
BGGY:
Inherits: ^Vehicle
Buildable:
Valued:
Cost: 300
Tooltip:
Name: Nod Buggy
Icon: bggyicnh
Description: Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft
Buildable:
BuildPaletteOrder: 20
Prerequisites: afld
Owner: nod
Cost: 300
Description: Nod Buggy
LongDesc: Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft
Mobile:
ROT: 10
Speed: 18
@@ -160,14 +172,16 @@ BGGY:
BIKE:
Inherits: ^Vehicle
Buildable:
Valued:
Cost: 450
Tooltip:
Name: Recon Bike
Icon: bikeicnh
Description: Fast scout vehicle, armed with \nrockets.\n Strong vs Vehicles, Aircraft\n Weak vs Infantry
Buildable:
BuildPaletteOrder: 30
Prerequisites: afld
Owner: nod
Cost: 450
Description: Recon Bike
LongDesc: Fast scout vehicle, armed with \nrockets.\n Strong vs Vehicles, Aircraft\n Weak vs Infantry
Mobile:
ROT: 10
Speed: 20
@@ -188,14 +202,16 @@ BIKE:
JEEP:
Inherits: ^Vehicle
Buildable:
Valued:
Cost: 400
Tooltip:
Name: Hum-Vee
Icon: jeepicnh
Description: Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft
Buildable:
BuildPaletteOrder: 20
Prerequisites: weap
Owner: gdi
Cost: 400
Description: Hum-Vee
LongDesc: Fast scout & anti-infantry vehicle.\n Strong vs Infantry\n Weak vs Tanks, Aircraft
Mobile:
ROT: 10
Speed: 15
@@ -215,14 +231,16 @@ JEEP:
LTNK:
Inherits: ^Tank
Buildable:
Valued:
Cost: 600
Tooltip:
Name: Light Tank
Icon: ltnkicnh
Description: Light Tank, good for scouting.\n Strong vs Light Vehicles\n Weak vs Tanks, Aircraft
Buildable:
BuildPaletteOrder: 30
Prerequisites: hq
Owner: nod
Cost: 600
Description: Light Tank
LongDesc: Light Tank, good for scouting.\n Strong vs Light Vehicles\n Weak vs Tanks, Aircraft
Mobile:
Speed: 9
Health:
@@ -245,14 +263,16 @@ LTNK:
MTNK:
Inherits: ^Tank
Buildable:
Valued:
Cost: 800
Tooltip:
Name: Medium Tank
Icon: mtnkicnh
Description: General-Purpose GDI Tank.\n Strong vs Tanks, Light Vehicles\n Weak vs Infantry, Aircraft
Buildable:
BuildPaletteOrder: 30
Prerequisites: hq
Owner: gdi
Cost: 800
Description: Medium Tank
LongDesc: General-Purpose GDI Tank.\n Strong vs Tanks, Light Vehicles\n Weak vs Infantry, Aircraft
Mobile:
Speed: 9
Health:
@@ -275,14 +295,16 @@ MTNK:
HTNK:
Inherits: ^Tank
Buildable:
Valued:
Cost: 1500
Tooltip:
Name: Mammoth Tank
Icon: htnkicnh
Description: Heavily armored GDI Tank.\n Strong vs Everything
Buildable:
BuildPaletteOrder: 60
Prerequisites: eye
Owner: gdi
Cost: 1500
Description: Mammoth Tank
LongDesc: Heavily armored GDI Tank.\n Strong vs Everything
Mobile:
Crushes: wall, heavywall
Speed: 3
@@ -310,14 +332,16 @@ HTNK:
MSAM:
Inherits: ^Tank
Buildable:
Valued:
Cost: 800
Tooltip:
Name: Rocket Launcher
Icon: msamicnh
Description: Long range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Buildable:
BuildPaletteOrder: 50
Prerequisites: hq
Owner: gdi
Cost: 800
Description: Rocket Launcher
LongDesc: Long range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Mobile:
Speed: 6
Health:
@@ -342,14 +366,16 @@ MSAM:
MLRS:
Inherits: ^Tank
Buildable:
Valued:
Cost: 750
Tooltip:
Name: SSM Launcher
Icon: mlrsicnh
Description: Long range artillery.\n Strong vs Infantry, Aircraft\n Weak vs Tanks, Aircraft
Buildable:
BuildPaletteOrder: 60
Prerequisites: hq
Owner: nod
Cost: 750
Description: SSM Launcher
LongDesc: Long range artillery.\n Strong vs Infantry, Aircraft\n Weak vs Tanks, Aircraft
Mobile:
Speed: 6
Health:
@@ -369,14 +395,16 @@ MLRS:
STNK:
Inherits: ^Vehicle
Buildable:
Valued:
Cost: 900
Tooltip:
Name: Stealth Tank
Icon: stnkicnh
Description: Missile tank that can bend light around \nitself to become invisible\n Strong vs Infantry, Aircraft\n Weak vs Tanks
Buildable:
BuildPaletteOrder: 90
Prerequisites: tmpl
Owner: nod
Cost: 900
Description: Stealth Tank
LongDesc: Missile tank that can bend light around \nitself to become invisible\n Strong vs Infantry, Aircraft\n Weak vs Tanks
Mobile:
Speed: 15
Health:
@@ -396,15 +424,17 @@ STNK:
TRAN:
Inherits: ^Helicopter
Buildable:
Valued:
Cost: 1500
Tooltip:
Name: Chinook Transport
Icon:tranicnh
Description: Fast Infantry Transport Helicopter.\n Unarmed
Buildable:
BuildPaletteOrder: 10
Prerequisites: hpad
BuiltAt: hpad
Owner: gdi,nod
Cost: 1500
Description: Chinook Transport
LongDesc: Fast Infantry Transport Helicopter.\n Unarmed
Helicopter:
LandWhenIdle: true
ROT: 5
@@ -425,15 +455,17 @@ TRAN:
HELI:
Inherits: ^Helicopter
Buildable:
Valued:
Cost: 1200
Tooltip:
Name: Apache Longbow
Icon: heliicnh
Description: Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry
Buildable:
BuildPaletteOrder: 20
Prerequisites: hpad, hq
BuiltAt: hpad
Owner: nod
Cost: 1200
Description: Apache Longbow
LongDesc: Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry
Helicopter:
ROT: 4
Speed: 20
@@ -453,15 +485,17 @@ HELI:
ORCA:
Inherits: ^Helicopter
Buildable:
Valued:
Cost: 1200
Tooltip:
Name: Orca
Icon: orcaicnh
Description: Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry
Buildable:
BuildPaletteOrder: 20
Prerequisites: hpad, hq
BuiltAt: hpad
Owner: gdi
Cost: 1200
Description: Orca
LongDesc: Helicopter Gunship with AG Missiles.\n Strong vs Buildings, Tanks\n Weak vs Infantry
Helicopter:
ROT: 4
Speed: 20
@@ -482,6 +516,8 @@ C17:
ParaDrop:
LZRange: 1
Inherits: ^Plane
Tooltip:
Name: Supply Aircraft
Plane:
ROT: 5
Speed: 25
@@ -500,6 +536,9 @@ C17:
A10:
Inherits: ^Plane
Tooltip:
Name: A10 Bomber
Icon: a10icnh
Plane:
ROT: 4
Speed: 25
@@ -519,7 +558,9 @@ BOAT:
Inherits: ^Ship
Valued:
Cost: 300
Description: Gunboat
Tooltip:
Name: Gunboat
Icon: boaticnh
Health:
HP: 700
Armor: heavy
@@ -544,7 +585,8 @@ LST:
Inherits: ^Ship
Valued:
Cost: 300
Description: Landing Craft
Tooltip:
Name: Landing Craft
Mobile:
Crushes: crate
TerrainTypes: Clear, Rough, Road, Tree, Water, Rock, Wall, Ore, Beach, River
@@ -567,8 +609,9 @@ LST:
LTNK.Husk:
Inherits: ^Husk
Valued:
Description: Husk (Light Tank)
Tooltip:
Name: Husk (Light Tank)
Icon: ltnkicnh
RenderUnit:
Image: ltnk
ThrowsParticle@turret:
@@ -579,8 +622,9 @@ LTNK.Husk:
MTNK.Husk:
Inherits: ^Husk
Valued:
Description: Husk (Medium Tank)
Tooltip:
Name: Husk (Medium Tank)
Icon: mtnkicnh
RenderUnit:
Image: mtnk
ThrowsParticle@turret:
@@ -591,8 +635,9 @@ MTNK.Husk:
HTNK.Husk:
Inherits: ^Husk
Valued:
Description: Husk (Mammoth Tank)
Tooltip:
Name: Husk (Mammoth Tank)
Icon: htnkicnh
RenderUnit:
Image: htnk
ThrowsParticle@turret:
@@ -603,8 +648,9 @@ HTNK.Husk:
MSAM.Husk:
Inherits: ^Husk
Valued:
Description: Husk (Rocket Launcher)
Tooltip:
Name: Husk (Rocket Launcher)
Icon: msamicnh
RenderUnit:
Image: msam
ThrowsParticle@turret:
@@ -615,8 +661,9 @@ MSAM.Husk:
MLRS.Husk:
Inherits: ^Husk
Valued:
Description: Husk (SSM Launcher)
Tooltip:
Name: Husk (SSM Launcher)
Icon: mlrsicnh
RenderUnit:
Image: mlrs
ThrowsParticle@turret: