From 492bcdd9a7a7b5347b429c21b1666c7bba95e596 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 27 Oct 2018 17:17:23 +0100 Subject: [PATCH] Remove building lock from Transforms. --- OpenRA.Mods.Common/Activities/Transform.cs | 3 +-- OpenRA.Mods.Common/Traits/Transforms.cs | 4 ---- .../UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs | 3 ++- mods/cnc/rules/structures.yaml | 2 +- mods/ra/rules/structures.yaml | 2 +- mods/ts/rules/shared-structures.yaml | 2 +- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/OpenRA.Mods.Common/Activities/Transform.cs b/OpenRA.Mods.Common/Activities/Transform.cs index 2b2f6c6b75..abd3953cf2 100644 --- a/OpenRA.Mods.Common/Activities/Transform.cs +++ b/OpenRA.Mods.Common/Activities/Transform.cs @@ -56,8 +56,7 @@ namespace OpenRA.Mods.Common.Activities // Prevent deployment in bogus locations var transforms = self.TraitOrDefault(); - var building = self.TraitOrDefault(); - if ((transforms != null && !transforms.CanDeploy()) || (building != null && !building.Lock())) + if (transforms != null && !transforms.CanDeploy()) { Cancel(self, true); return NextActivity; diff --git a/OpenRA.Mods.Common/Traits/Transforms.cs b/OpenRA.Mods.Common/Traits/Transforms.cs index 932722b7ed..b9327a2525 100644 --- a/OpenRA.Mods.Common/Traits/Transforms.cs +++ b/OpenRA.Mods.Common/Traits/Transforms.cs @@ -79,10 +79,6 @@ namespace OpenRA.Mods.Common.Traits if (IsTraitPaused || IsTraitDisabled) return false; - var building = self.TraitOrDefault(); - if (building != null && building.Locked) - return false; - return buildingInfo == null || self.World.CanPlaceBuilding(self.Location + Info.Offset, actorInfo, buildingInfo, self); } diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs b/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs index 69c279e5f8..624614f137 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs @@ -22,7 +22,7 @@ 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, Gate, and ConyardChronoReturn traits.\n" + + "This affects the With*Animation, With*Overlay, Transforms, Gate, 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 +52,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules "WithDeliveryAnimation", "WithCrumbleOverlay", "WithDeliveryOverlay", + "Transforms", "Gate", "ConyardChronoReturn", "VoiceAnnouncement" diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index d574639c71..61b26f0214 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -20,7 +20,7 @@ FACT: Production: Produces: Building.GDI, Building.Nod, Defence.GDI, Defence.Nod Transforms: - RequiresCondition: factundeploy + RequiresCondition: factundeploy && !build-incomplete PauseOnCondition: being-demolished IntoActor: mcv Offset: 1,1 diff --git a/mods/ra/rules/structures.yaml b/mods/ra/rules/structures.yaml index 9e4a6c6688..d62d162a6c 100644 --- a/mods/ra/rules/structures.yaml +++ b/mods/ra/rules/structures.yaml @@ -1127,7 +1127,7 @@ FACT: ActorTypes: e1,e1,e1,tecn,tecn,e6 BaseBuilding: Transforms: - RequiresCondition: factundeploy + RequiresCondition: factundeploy && !build-incomplete PauseOnCondition: chrono-vortex || being-captured || being-demolished IntoActor: mcv Offset: 1,1 diff --git a/mods/ts/rules/shared-structures.yaml b/mods/ts/rules/shared-structures.yaml index ad4b37e076..ac2e7c9334 100644 --- a/mods/ts/rules/shared-structures.yaml +++ b/mods/ts/rules/shared-structures.yaml @@ -28,7 +28,7 @@ GACNST: Value: 2500 BaseBuilding: Transforms: - RequiresCondition: factundeploy + RequiresCondition: factundeploy && !build-incomplete PauseOnCondition: being-demolished IntoActor: mcv Offset: 1,1