From 362c86764f7a0cb69bdb732b468e40273c83d8ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 27 Jun 2014 17:31:47 +0200 Subject: [PATCH] document the buildable and country trait --- OpenRA.Game/Traits/World/Country.cs | 6 +++++- OpenRA.Mods.RA/Buildable.cs | 12 +++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Traits/World/Country.cs b/OpenRA.Game/Traits/World/Country.cs index f7b94d516e..2921e04fc1 100644 --- a/OpenRA.Game/Traits/World/Country.cs +++ b/OpenRA.Game/Traits/World/Country.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation. For more information, @@ -12,8 +12,12 @@ namespace OpenRA.Traits { public class CountryInfo : TraitInfo { + [Desc("This is the name exposed to the players.")] public readonly string Name = null; + + [Desc("This is the internal name for owner checks.")] public readonly string Race = null; + public readonly bool Selectable = true; } diff --git a/OpenRA.Mods.RA/Buildable.cs b/OpenRA.Mods.RA/Buildable.cs index 3d29c40313..c8002105fc 100755 --- a/OpenRA.Mods.RA/Buildable.cs +++ b/OpenRA.Mods.RA/Buildable.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation. For more information, @@ -14,10 +14,20 @@ namespace OpenRA.Mods.RA { public class BuildableInfo : TraitInfo { + [Desc("The prerequisite names that must be available before this can be built.", + "This can be prefixed with ! to invert the prerequisite (disabling production if the prerequisite is available)", + "and/or ~ to hide the actor from the production palette if the prerequisite is not available.", + "Prerequisites are granted by actors with the Building trait (with a prerequisite string given by the lower case actor name)", + "and by the ProvidesCustomPrerequisite trait.")] public readonly string[] Prerequisites = { }; + + [Desc("Restrict production to a specific race(s). **Deprecated**: Use race-specific prerequisites instead.")] public readonly string[] Owner = { }; + [Desc("Production queue(s) that can produce this.")] public readonly string[] Queue = { }; + + [Desc("Disable production when there are more than this many of this actor on the battlefield. Set to 0 to disable.")] public readonly int BuildLimit = 0; // TODO: UI fluff; doesn't belong here