diff --git a/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs b/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs index c35214aa95..e591580612 100644 --- a/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs +++ b/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs @@ -36,6 +36,12 @@ namespace OpenRA.Mods.Cnc.Traits [Desc("The color the bar of the 'return-to-origin' logic has.")] public readonly Color TimeBarColor = Color.White; + public override void RulesetLoaded(Ruleset rules, ActorInfo ai) + { + if (!ai.HasTraitInfo() && !ai.HasTraitInfo()) + throw new YamlException("Chronoshiftable requires actors to have the Mobile or Husk traits."); + } + public override object Create(ActorInitializer init) { return new Chronoshiftable(init, this); } }