From e57087cb5b8371eb1198fd2aebd86f63fd3a612c Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 28 Oct 2018 12:55:57 +0000 Subject: [PATCH] Remove building lock from Production. --- OpenRA.Mods.Common/Traits/Production.cs | 9 +-------- .../Rules/20180923/RemovedNotifyBuildComplete.cs | 9 +++++++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Production.cs b/OpenRA.Mods.Common/Traits/Production.cs index 960ab00fac..aaac112a20 100644 --- a/OpenRA.Mods.Common/Traits/Production.cs +++ b/OpenRA.Mods.Common/Traits/Production.cs @@ -34,8 +34,6 @@ namespace OpenRA.Mods.Common.Traits public string Faction { get; private set; } - Building building; - public Production(ActorInitializer init, ProductionInfo info) : base(info) { @@ -43,11 +41,6 @@ namespace OpenRA.Mods.Common.Traits Faction = init.Contains() ? init.Get() : init.Self.Owner.Faction.InternalName; } - void INotifyCreated.Created(Actor self) - { - building = self.TraitOrDefault(); - } - public virtual void DoProduction(Actor self, ActorInfo producee, ExitInfo exitinfo, string productionType, TypeDictionary inits) { var exit = CPos.Zero; @@ -131,7 +124,7 @@ namespace OpenRA.Mods.Common.Traits public virtual bool Produce(Actor self, ActorInfo producee, string productionType, TypeDictionary inits) { - if (IsTraitDisabled || IsTraitPaused || Reservable.IsReserved(self) || (building != null && building.Locked)) + if (IsTraitDisabled || IsTraitPaused || Reservable.IsReserved(self)) return false; // Pick a spawn/exit point pair diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs b/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs index 8407678c86..73732f6f21 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs @@ -22,8 +22,9 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules get { return "Traits are no longer force-disabled while the WithMakeAnimation trait is active.\n" + - "This affects the With*Animation, With*Overlay, Transforms, Sellable, Gate, ToggleConditionOnOrder, and ConyardChronoReturn traits.\n" + - "The AnnounceOnBuild trait has been replaced with a new VoiceAnnouncement trait.\n" + + "This affects the With*Animation, With*Overlay, *Production, Transforms, Sellable,\n" + + "Gate, ToggleConditionOnOrder, and ConyardChronoReturn traits.\n" + + "The AnnounceOnBuild trait has been replaced with a new VoiceAnnouncement trait.\n" + "Affected actors are listed so that conditions may be manually defined."; } } @@ -52,6 +53,10 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules "WithDeliveryAnimation", "WithCrumbleOverlay", "WithDeliveryOverlay", + "Production", + "ProductionAirdrop", + "ProductionFromMapEdge", + "ProductionParadrop", "Transforms", "Sellable", "Gate",