diff --git a/OpenRA.Mods.Common/Traits/Player/ModularBot.cs b/OpenRA.Mods.Common/Traits/Player/ModularBot.cs index 9d07c81119..d073d63181 100644 --- a/OpenRA.Mods.Common/Traits/Player/ModularBot.cs +++ b/OpenRA.Mods.Common/Traits/Player/ModularBot.cs @@ -72,6 +72,8 @@ namespace OpenRA.Mods.Common.Traits player = p; tickModules = p.PlayerActor.TraitsImplementing().ToArray(); attackResponseModules = p.PlayerActor.TraitsImplementing().ToArray(); + foreach (var ibe in p.PlayerActor.TraitsImplementing()) + ibe.BotEnabled(this); } void IBot.QueueOrder(Order order) diff --git a/OpenRA.Mods.Common/TraitsInterfaces.cs b/OpenRA.Mods.Common/TraitsInterfaces.cs index 275db8fb68..409f166e37 100644 --- a/OpenRA.Mods.Common/TraitsInterfaces.cs +++ b/OpenRA.Mods.Common/TraitsInterfaces.cs @@ -470,6 +470,9 @@ namespace OpenRA.Mods.Common.Traits [RequireExplicitImplementation] public interface IPreventsShroudReset { bool PreventShroudReset(Actor self); } + [RequireExplicitImplementation] + public interface IBotEnabled { void BotEnabled(IBot bot); } + [RequireExplicitImplementation] public interface IBotTick { void BotTick(IBot bot); }