From 5d2f2bdd1d20d555680aa8d19ff6a55cfb905ab7 Mon Sep 17 00:00:00 2001 From: dnqbob Date: Mon, 21 Aug 2023 10:04:41 +0800 Subject: [PATCH] Add TraitLocation to all bot modules. --- OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs | 1 + .../Traits/BotModules/BotModuleLogic/MinelayerBotModule.cs | 1 + OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs | 1 + OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs | 1 + OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs | 1 + OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs | 1 + OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs | 1 + OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs | 1 + OpenRA.Mods.Common/Traits/BotModules/UnitBuilderBotModule.cs | 1 + 9 files changed, 9 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs index c72e3e343a..9edb861aca 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs @@ -16,6 +16,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Manages AI base construction.")] public class BaseBuilderBotModuleInfo : ConditionalTraitInfo { diff --git a/OpenRA.Mods.Common/Traits/BotModules/BotModuleLogic/MinelayerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/BotModuleLogic/MinelayerBotModule.cs index c04399f4b9..ddd9526656 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/BotModuleLogic/MinelayerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/BotModuleLogic/MinelayerBotModule.cs @@ -17,6 +17,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Manages AI minelayer unit related with " + nameof(Minelayer) + " traits.", "When enemy damage AI's actors, the location of conflict will be recorded,", "If a location is a valid spot, it will add/merge to favorite location for usage later")] diff --git a/OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs index 644bd7bf51..0072609f10 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs @@ -13,6 +13,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Manages AI repairing base buildings.")] public class BuildingRepairBotModuleInfo : ConditionalTraitInfo { diff --git a/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs index a7819659d7..eef210a63d 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs @@ -16,6 +16,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Manages AI capturing logic.")] public class CaptureManagerBotModuleInfo : ConditionalTraitInfo { diff --git a/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs index 21892c0850..4c62b3c581 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs @@ -17,6 +17,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Put this on the Player actor. Manages bot harvesters to ensure they always continue harvesting as long as there are resources on the map.")] public class HarvesterBotModuleInfo : ConditionalTraitInfo { diff --git a/OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs index f394abc746..3aa3c0514a 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs @@ -16,6 +16,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Manages AI MCVs.")] public class McvManagerBotModuleInfo : ConditionalTraitInfo { diff --git a/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs index e07a0e1f04..edbde4899e 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs @@ -19,6 +19,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Manages AI squads.")] public class SquadManagerBotModuleInfo : ConditionalTraitInfo { diff --git a/OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs index 01c1f40af2..fe94e6f73e 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs @@ -16,6 +16,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Manages bot support power handling.")] public class SupportPowerBotModuleInfo : ConditionalTraitInfo, Requires { diff --git a/OpenRA.Mods.Common/Traits/BotModules/UnitBuilderBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/UnitBuilderBotModule.cs index a6c94288bd..0d576c6e3f 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/UnitBuilderBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/UnitBuilderBotModule.cs @@ -16,6 +16,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { + [TraitLocation(SystemActors.Player)] [Desc("Controls AI unit production.")] public class UnitBuilderBotModuleInfo : ConditionalTraitInfo {