Make AI randomly scan map for targets for its air squads.

This commit is contained in:
darkademic
2020-05-18 17:53:42 +01:00
committed by Oliver Brakmann
parent 5e92915095
commit ae882b85a9
2 changed files with 17 additions and 11 deletions

View File

@@ -78,6 +78,14 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Enemy target types to never target.")]
public readonly BitSet<TargetableType> IgnoredEnemyTargetTypes = default(BitSet<TargetableType>);
public override void RulesetLoaded(Ruleset rules, ActorInfo ai)
{
base.RulesetLoaded(rules, ai);
if (DangerScanRadius <= 0)
throw new YamlException("DangerScanRadius must be greater than zero.");
}
public override object Create(ActorInitializer init) { return new SquadManagerBotModule(init.Self, this); }
}