diff --git a/OpenRa.Game/GameRules/FieldLoader.cs b/OpenRa.Game/GameRules/FieldLoader.cs index 55731a6445..f1034dc5f0 100755 --- a/OpenRa.Game/GameRules/FieldLoader.cs +++ b/OpenRa.Game/GameRules/FieldLoader.cs @@ -21,6 +21,8 @@ namespace OpenRa.Game.GameRules foreach (var x in my.Nodes) { var field = self.GetType().GetField(x.Key.Trim()); + if (field == null) + throw new NotImplementedException("Missing field `{0}` on `{1}`".F(x.Key.Trim(), self.GetType().Name)); field.SetValue(self, GetValue(field.FieldType, x.Value.Value.Trim())); } } diff --git a/OpenRa.Game/Traits/Buildable.cs b/OpenRa.Game/Traits/Buildable.cs index fb1f95dc52..ebff7ae4d1 100755 --- a/OpenRa.Game/Traits/Buildable.cs +++ b/OpenRa.Game/Traits/Buildable.cs @@ -5,6 +5,18 @@ using System.Text; namespace OpenRa.Game.Traits { + class BuildableInfo : ITraitInfo + { + public readonly int TechLevel = -1; + public readonly string Tab = null; + public readonly string[] Prerequisites = { }; + public readonly Race[] Owner = { }; + public readonly int Cost = 0; + public readonly string Description = ""; + public readonly string LongDesc = ""; + public object Create(Actor self) { return new Buildable(self); } + } + class Buildable { public Buildable( Actor self ) { } diff --git a/OpenRa.Game/Traits/Mobile.cs b/OpenRa.Game/Traits/Mobile.cs index 7645d36cab..3f753ac289 100644 --- a/OpenRa.Game/Traits/Mobile.cs +++ b/OpenRa.Game/Traits/Mobile.cs @@ -7,9 +7,9 @@ namespace OpenRa.Game.Traits { class MobileInfo : ITraitInfo { - public readonly int Sight; - public readonly int ROT; - public readonly int Speed; + public readonly int Sight = 0; + public readonly int ROT = 0; + public readonly int Speed = 0; public object Create(Actor self) { return new Mobile(self); } }