ralint: verify voices, support (and still verify) @-form prerequisites.

This commit is contained in:
Chris Forbes
2010-07-04 14:50:26 +12:00
parent 8e68449af1
commit 68b63dc89e
9 changed files with 25 additions and 15 deletions

View File

@@ -21,7 +21,6 @@
using System;
using System.Collections.Generic;
using OpenRA.FileFormats;
using OpenRA.Support;
using OpenRA.Traits;
using Tao.OpenAl;

View File

@@ -30,9 +30,9 @@ namespace OpenRA.Traits
public virtual object Create(ActorInitializer init) { return new Valued(); }
}
class BuildableInfo : ValuedInfo
public class BuildableInfo : ValuedInfo
{
public readonly string[] Prerequisites = { };
[ActorReference]public readonly string[] Prerequisites = { };
[ActorReference] public readonly string[] BuiltAt = { };
public readonly string Icon = null;

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRA.Traits
{
@@ -12,4 +9,7 @@ namespace OpenRA.Traits
[AttributeUsage(AttributeTargets.Field)]
public class WeaponReferenceAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Field)]
public class VoiceReferenceAttribute : Attribute { }
}

View File

@@ -24,6 +24,7 @@ namespace OpenRA.Traits
{
public readonly int Priority = 10;
public readonly int[] Bounds = null;
[VoiceReference]
public readonly string Voice = null;
public readonly float Radius = 10;
}

View File

@@ -30,6 +30,7 @@ namespace OpenRA.Traits
public readonly string Image = null;
public readonly string Description = "";
public readonly string LongDesc = "";
[ActorReference]
public readonly string[] Prerequisites = { };
public readonly int TechLevel = -1;
public readonly bool GivenAuto = true;

View File

@@ -24,6 +24,7 @@ namespace OpenRA.Traits
{
class TransformsOnDeployInfo : TraitInfo<TransformsOnDeploy>
{
[ActorReference]
public readonly string TransformsInto = null;
public readonly int[] Offset = null;
public readonly int[] DeployDirections = new int[] {96};

View File

@@ -16,11 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with OpenRA. If not, see <http://www.gnu.org/licenses/>.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
@@ -34,7 +32,6 @@ namespace OpenRA.Traits
public class HazardLayer : ITerrainCost
{
List<Pair<Actor, Hazard>>[,] hazards;
Map map;
public HazardLayer( World world )
{