remove FieldLoader.LoadAttribute; replace with FieldLoader.IgnoreAttribute

This commit is contained in:
Chris Forbes
2011-06-30 20:01:22 +12:00
committed by Paul Chote
parent a4648cfbcc
commit cd63da85d8
8 changed files with 64 additions and 82 deletions

View File

@@ -35,11 +35,9 @@ namespace OpenRA.Mods.RA
{
class HackyAIInfo : IBotInfo, ITraitInfo
{
[FieldLoader.Load]
public readonly string Name = "Unnamed Bot";
[FieldLoader.Load]
public readonly int SquadSize = 8;
public readonly int AssignRolesInterval = 20;
string IBotInfo.Name { get { return this.Name; } }
@@ -64,9 +62,6 @@ namespace OpenRA.Mods.RA
ret.Add(t.Key, (float)FieldLoader.GetValue("units", typeof(float), t.Value.Value));
return ret;
}
[FieldLoader.Load]
public readonly int AssignRolesInterval = 20;
public object Create(ActorInitializer init) { return new HackyAI(this); }
}

View File

@@ -23,21 +23,13 @@ namespace OpenRA.Mods.RA.Move
{
[FieldLoader.LoadUsing("LoadSpeeds")]
public readonly Dictionary<string, TerrainInfo> TerrainSpeeds;
[FieldLoader.Load]
public readonly string[] Crushes;
[FieldLoader.Load]
public readonly int WaitAverage = 60;
[FieldLoader.Load]
public readonly int WaitSpread = 20;
[FieldLoader.Load]
public readonly int InitialFacing = 128;
[FieldLoader.Load]
public readonly int ROT = 255;
[FieldLoader.Load]
public readonly int Speed = 1;
[FieldLoader.Load]
public readonly bool OnRails = false;
[FieldLoader.Load]
public readonly bool SharesCell = false;
public virtual object Create(ActorInitializer init) { return new Mobile(init, this); }