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
var transforms = self.TraitOrDefault<Transforms>();
var building = self.TraitOrDefault<Building>();
if ((transforms != null && !transforms.CanDeploy()) || (building != null && !building.Lock()))
if (transforms != null && !transforms.CanDeploy())
{
Cancel(self, true);
return NextActivity;

View File

@@ -79,10 +79,6 @@ namespace OpenRA.Mods.Common.Traits
if (IsTraitPaused || IsTraitDisabled)
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);
}

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

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