Remove building lock from Transforms.

This commit is contained in:
Paul Chote
2018-10-27 17:17:23 +01:00
committed by abcdefg30
parent 18b84750aa
commit 492bcdd9a7
6 changed files with 6 additions and 10 deletions

View File

@@ -56,8 +56,7 @@ namespace OpenRA.Mods.Common.Activities
// Prevent deployment in bogus locations // Prevent deployment in bogus locations
var transforms = self.TraitOrDefault<Transforms>(); var transforms = self.TraitOrDefault<Transforms>();
var building = self.TraitOrDefault<Building>(); if (transforms != null && !transforms.CanDeploy())
if ((transforms != null && !transforms.CanDeploy()) || (building != null && !building.Lock()))
{ {
Cancel(self, true); Cancel(self, true);
return NextActivity; return NextActivity;

View File

@@ -79,10 +79,6 @@ namespace OpenRA.Mods.Common.Traits
if (IsTraitPaused || IsTraitDisabled) if (IsTraitPaused || IsTraitDisabled)
return false; return false;
var building = self.TraitOrDefault<Building>();
if (building != null && building.Locked)
return false;
return buildingInfo == null || self.World.CanPlaceBuilding(self.Location + Info.Offset, actorInfo, buildingInfo, self); return buildingInfo == null || self.World.CanPlaceBuilding(self.Location + Info.Offset, actorInfo, buildingInfo, self);
} }

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules
get get
{ {
return "Traits are no longer force-disabled while the WithMakeAnimation trait is active.\n" + 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" + "The AnnounceOnBuild trait has been replaced with a new VoiceAnnouncement trait.\n" +
"Affected actors are listed so that conditions may be manually defined."; "Affected actors are listed so that conditions may be manually defined.";
} }
@@ -52,6 +52,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules
"WithDeliveryAnimation", "WithDeliveryAnimation",
"WithCrumbleOverlay", "WithCrumbleOverlay",
"WithDeliveryOverlay", "WithDeliveryOverlay",
"Transforms",
"Gate", "Gate",
"ConyardChronoReturn", "ConyardChronoReturn",
"VoiceAnnouncement" "VoiceAnnouncement"

View File

@@ -20,7 +20,7 @@ FACT:
Production: Production:
Produces: Building.GDI, Building.Nod, Defence.GDI, Defence.Nod Produces: Building.GDI, Building.Nod, Defence.GDI, Defence.Nod
Transforms: Transforms:
RequiresCondition: factundeploy RequiresCondition: factundeploy && !build-incomplete
PauseOnCondition: being-demolished PauseOnCondition: being-demolished
IntoActor: mcv IntoActor: mcv
Offset: 1,1 Offset: 1,1

View File

@@ -1127,7 +1127,7 @@ FACT:
ActorTypes: e1,e1,e1,tecn,tecn,e6 ActorTypes: e1,e1,e1,tecn,tecn,e6
BaseBuilding: BaseBuilding:
Transforms: Transforms:
RequiresCondition: factundeploy RequiresCondition: factundeploy && !build-incomplete
PauseOnCondition: chrono-vortex || being-captured || being-demolished PauseOnCondition: chrono-vortex || being-captured || being-demolished
IntoActor: mcv IntoActor: mcv
Offset: 1,1 Offset: 1,1

View File

@@ -28,7 +28,7 @@ GACNST:
Value: 2500 Value: 2500
BaseBuilding: BaseBuilding:
Transforms: Transforms:
RequiresCondition: factundeploy RequiresCondition: factundeploy && !build-incomplete
PauseOnCondition: being-demolished PauseOnCondition: being-demolished
IntoActor: mcv IntoActor: mcv
Offset: 1,1 Offset: 1,1