diff --git a/OpenRA.Mods.Common/Traits/Sellable.cs b/OpenRA.Mods.Common/Traits/Sellable.cs index 856837a979..e11d081bfb 100644 --- a/OpenRA.Mods.Common/Traits/Sellable.cs +++ b/OpenRA.Mods.Common/Traits/Sellable.cs @@ -58,10 +58,6 @@ namespace OpenRA.Mods.Common.Traits if (IsTraitDisabled) return; - var building = self.TraitOrDefault(); - if (building != null && !building.Lock()) - return; - self.CancelActivity(); foreach (var s in info.SellSounds) diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs b/OpenRA.Mods.Common/UpdateRules/Rules/20180923/RemovedNotifyBuildComplete.cs index 624614f137..5975d3a5d3 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, Transforms, Gate, and ConyardChronoReturn traits.\n" + + "This affects the With*Animation, With*Overlay, Transforms, Sellable, 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."; } @@ -53,6 +53,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules "WithCrumbleOverlay", "WithDeliveryOverlay", "Transforms", + "Sellable", "Gate", "ConyardChronoReturn", "VoiceAnnouncement" diff --git a/mods/cnc/maps/gdi01/rules.yaml b/mods/cnc/maps/gdi01/rules.yaml index 11da4d6d8a..b787a86806 100644 --- a/mods/cnc/maps/gdi01/rules.yaml +++ b/mods/cnc/maps/gdi01/rules.yaml @@ -15,6 +15,8 @@ NUKE: -Sellable: Demolishable: -Condition: + WithMakeAnimation: + -Condition: Buildable: BuildLimit: 1 @@ -22,13 +24,13 @@ PYLE: -Sellable: Demolishable: -Condition: + WithMakeAnimation: + -Condition: Buildable: BuildLimit: 1 FACT: -Sellable: - Demolishable: - -Condition: PROC: Buildable: diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index 4fd2e3db62..1bd4923397 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -747,12 +747,13 @@ Demolishable: Condition: being-demolished Sellable: - RequiresCondition: !being-demolished + RequiresCondition: !build-incomplete && !being-demolished SellSounds: cashturn.aud CaptureManager: Capturable: Types: building-sabotage WithMakeAnimation: + Condition: build-incomplete WithBuildingRepairDecoration: Image: allyrepair Sequence: repair diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index 61b26f0214..e41075400c 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -85,8 +85,6 @@ FACT: Cooldown: 75 Range: 14c0 WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithBuildingPlacedAnimation: RequiresCondition: !build-incomplete Power: @@ -230,8 +228,6 @@ PROC: SpawnOffset: 1,2 Facing: 64 WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithResources: RequiresCondition: !build-incomplete Power: @@ -261,8 +257,6 @@ SILO: Range: 4c0 WithBuildingBib: HasMinibib: Yes - WithMakeAnimation: - Condition: build-incomplete WithSiloAnimation: RequiresCondition: !build-incomplete StoresResources: @@ -422,8 +416,6 @@ AFLD: ProductionAirdrop: Produces: Vehicle.Nod WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@DISH: RequiresCondition: !build-incomplete Sequence: idle-dish @@ -475,8 +467,6 @@ WEAP: RevealsShroud: Range: 4c0 WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithProductionDoorOverlay: RequiresCondition: !build-incomplete Sequence: build-top @@ -536,8 +526,6 @@ HPAD: HpPerStep: 1000 PlayerExperience: 25 StartRepairingNotification: Repairing - WithMakeAnimation: - Condition: build-incomplete WithResupplyAnimation: RequiresCondition: !build-incomplete RallyPoint: @@ -665,8 +653,6 @@ FIX: Range: 5c0 WithBuildingBib: HasMinibib: Yes - WithMakeAnimation: - Condition: build-incomplete WithResupplyAnimation: RequiresCondition: !build-incomplete Reservable: @@ -799,8 +785,6 @@ TMPL: ClockSequence: clock CircleSequence: circles WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithNukeLaunchAnimation: RequiresCondition: !build-incomplete WithNukeLaunchOverlay: @@ -931,8 +915,6 @@ OBLI: Range: 8c0 WithBuildingBib: HasMinibib: Yes - WithMakeAnimation: - Condition: build-incomplete WithChargeAnimation: RequiresCondition: !build-incomplete Armament: diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index b071110ff3..450f151c2f 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -412,7 +412,7 @@ Demolishable: Condition: being-demolished Sellable: - RequiresCondition: !being-demolished + RequiresCondition: !build-incomplete && !being-demolished SellSounds: BUILD1.WAV Guardable: Range: 3c0 @@ -456,6 +456,8 @@ -WithCrumbleOverlay: -Capturable: -WithSpriteBody: + Sellable: + RequiresCondition: !being-demolished WithWallSpriteBody: LineBuildNode: Types: turret diff --git a/mods/ra/maps/allies-08a/rules.yaml b/mods/ra/maps/allies-08a/rules.yaml index 0b92a97a99..23bc22f63d 100644 --- a/mods/ra/maps/allies-08a/rules.yaml +++ b/mods/ra/maps/allies-08a/rules.yaml @@ -77,6 +77,8 @@ ATEK: -Sellable: Demolishable: -Condition: + WithMakeAnimation: + -Condition: PDOX: Inherits@IDISABLE: ^DisableOnLowPower @@ -89,6 +91,8 @@ PDOX: -Sellable: Demolishable: -Condition: + WithMakeAnimation: + -Condition: IRON: Buildable: diff --git a/mods/ra/maps/fort-lonestar/rules.yaml b/mods/ra/maps/fort-lonestar/rules.yaml index e9e96e9e12..7be7e6031e 100644 --- a/mods/ra/maps/fort-lonestar/rules.yaml +++ b/mods/ra/maps/fort-lonestar/rules.yaml @@ -172,6 +172,8 @@ TENT: -Sellable: Demolishable: -Condition: + WithMakeAnimation: + -Condition: BaseProvider: Range: 12c0 Power: diff --git a/mods/ra/maps/soviet-01/rules.yaml b/mods/ra/maps/soviet-01/rules.yaml index 73e305ae21..0ebd33923d 100644 --- a/mods/ra/maps/soviet-01/rules.yaml +++ b/mods/ra/maps/soviet-01/rules.yaml @@ -48,6 +48,8 @@ DOME: -Sellable: Demolishable: -Condition: + WithMakeAnimation: + -Condition: POWR: CaptureManager: @@ -55,3 +57,5 @@ POWR: -Sellable: Demolishable: -Condition: + WithMakeAnimation: + -Condition: diff --git a/mods/ra/maps/soviet-07/rules.yaml b/mods/ra/maps/soviet-07/rules.yaml index 823adfcf3a..4b928d5631 100644 --- a/mods/ra/maps/soviet-07/rules.yaml +++ b/mods/ra/maps/soviet-07/rules.yaml @@ -35,6 +35,8 @@ FTUR: -Sellable: Demolishable: -Condition: + WithMakeAnimation: + -Condition: PBOX: -AutoTarget: diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index 3ea9453238..3a8dc592e1 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -651,6 +651,7 @@ EngineerRepairable: AcceptsDeliveredCash: WithMakeAnimation: + Condition: build-incomplete CaptureManager: BeingCapturedCondition: being-captured Capturable: @@ -666,7 +667,7 @@ Demolishable: Condition: being-demolished Sellable: - RequiresCondition: !being-captured && !being-demolished + RequiresCondition: !build-incomplete && !being-captured && !being-demolished SellSounds: cashturn.aud WithBuildingRepairDecoration: Image: allyrepair diff --git a/mods/ra/rules/fakes.yaml b/mods/ra/rules/fakes.yaml index a19cea5f8a..71e1443e87 100644 --- a/mods/ra/rules/fakes.yaml +++ b/mods/ra/rules/fakes.yaml @@ -145,8 +145,6 @@ WEAF: RenderSprites: Image: WEAP WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithProductionDoorOverlay: RequiresCondition: !build-incomplete Sequence: build-top diff --git a/mods/ra/rules/structures.yaml b/mods/ra/rules/structures.yaml index d62d162a6c..bf800694d7 100644 --- a/mods/ra/rules/structures.yaml +++ b/mods/ra/rules/structures.yaml @@ -60,8 +60,6 @@ MSLO: Amount: -150 MustBeDestroyed: RequiredForShortGame: false - WithMakeAnimation: - Condition: build-incomplete WithNukeLaunchAnimation: RequiresCondition: !build-incomplete @@ -982,8 +980,6 @@ WEAP: RevealsShroud@GAPGEN: Range: 4c0 WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithProductionDoorOverlay: RequiresCondition: !build-incomplete Sequence: build-top @@ -1133,7 +1129,7 @@ FACT: Offset: 1,1 Facing: 96 Sellable: - RequiresCondition: !chrono-vortex && !being-captured && !being-demolished + RequiresCondition: !build-incomplete && !chrono-vortex && !being-captured && !being-demolished GrantConditionOnPrerequisite@GLOBALFACTUNDEPLOY: Condition: factundeploy Prerequisites: global-factundeploy @@ -1146,8 +1142,6 @@ FACT: PauseOnCondition: being-captured Range: 16c0 WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithBuildingPlacedAnimation: RequiresCondition: !build-incomplete && !chrono-vortex Power: @@ -1216,8 +1210,6 @@ PROC: Types: SpyInfiltrate Notification: CreditsStolen WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@TOP: RequiresCondition: !build-incomplete Sequence: idle-top @@ -1265,8 +1257,6 @@ SILO: Range: 4c0 WithBuildingBib: HasMinibib: Yes - WithMakeAnimation: - Condition: build-incomplete WithSiloAnimation: RequiresCondition: !build-incomplete StoresResources: @@ -1310,8 +1300,6 @@ HPAD: RevealsShroud@GAPGEN: Range: 4c0 WithBuildingBib: - WithMakeAnimation: - Condition: build-incomplete WithResupplyAnimation: RequiresCondition: !build-incomplete Exit@1: @@ -1513,8 +1501,6 @@ AFLD: ReferencePoint: Top ZOffset: 256 RequiresCondition: primary - WithMakeAnimation: - Condition: build-incomplete WithResupplyAnimation: RequiresCondition: !build-incomplete @@ -1918,8 +1904,6 @@ FIX: PlayerExperience: 15 WithBuildingBib: HasMinibib: Yes - WithMakeAnimation: - Condition: build-incomplete WithResupplyAnimation: RequiresCondition: !build-incomplete Power: diff --git a/mods/ts/rules/civilian-structures.yaml b/mods/ts/rules/civilian-structures.yaml index a79192f3ec..9414065e9a 100644 --- a/mods/ts/rules/civilian-structures.yaml +++ b/mods/ts/rules/civilian-structures.yaml @@ -1399,6 +1399,8 @@ GALITE: Palette: terraindecoration -WithMakeAnimation: -WithDeathAnimation: + Sellable: + RequiresCondition: !being-demolished Health: HP: 60000 Armor: diff --git a/mods/ts/rules/defaults.yaml b/mods/ts/rules/defaults.yaml index 0bc827dba7..172b76dfec 100644 --- a/mods/ts/rules/defaults.yaml +++ b/mods/ts/rules/defaults.yaml @@ -372,9 +372,10 @@ Demolishable: Condition: being-demolished Sellable: - RequiresCondition: !being-demolished + RequiresCondition: !build-incomplete && !being-demolished SellSounds: cashturn.aud WithMakeAnimation: + Condition: build-incomplete ThrowsShrapnel@SMALL: Pieces: 3, 5 ThrowsShrapnel@LARGE: diff --git a/mods/ts/rules/gdi-structures.yaml b/mods/ts/rules/gdi-structures.yaml index 1a3cba932d..78e156397b 100644 --- a/mods/ts/rules/gdi-structures.yaml +++ b/mods/ts/rules/gdi-structures.yaml @@ -22,8 +22,6 @@ GAPOWR: RevealsShroud: Range: 4c0 MaxHeightDelta: 3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete && !empdisable Sequence: idle-lights @@ -112,8 +110,6 @@ GAPILE: PrimaryCondition: primary SelectionNotification: PrimaryBuildingSelected ProductionBar: - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete Sequence: idle-lights @@ -178,8 +174,6 @@ GAWEAP: PrimaryCondition: primary SelectionNotification: PrimaryBuildingSelected ProductionBar: - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@ROOF: RequiresCondition: !build-incomplete Sequence: idle-roof @@ -248,8 +242,6 @@ GAHPAD: PlayerExperience: 15 StartRepairingNotification: Repairing ProductionBar: - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@PLATFORM: RequiresCondition: !build-incomplete Sequence: idle-platform @@ -306,8 +298,6 @@ GADEPT: RallyPoint: Palette: mouse IsPlayerPalette: false - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHT: RequiresCondition: !build-incomplete Sequence: idle-light @@ -373,8 +363,6 @@ GARADR: RevealsShroud: Range: 10c0 MaxHeightDelta: 3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@DISH: RequiresCondition: !build-incomplete PauseOnCondition: disabled || empdisable @@ -414,8 +402,6 @@ GATECH: RevealsShroud: Range: 4c0 MaxHeightDelta: 3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete && !disabled Sequence: idle-lights @@ -443,8 +429,6 @@ GAPLUG: Building: Footprint: xxx xxx Dimensions: 2,3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@DISH: RequiresCondition: !build-incomplete PauseOnCondition: disabled || empdisable diff --git a/mods/ts/rules/gdi-support.yaml b/mods/ts/rules/gdi-support.yaml index 40d9cfbb39..8e7619b966 100644 --- a/mods/ts/rules/gdi-support.yaml +++ b/mods/ts/rules/gdi-support.yaml @@ -76,8 +76,6 @@ GACTWR: AttackTurreted: RequiresCondition: tower.vulcan || tower.rocket || tower.sam PauseOnCondition: empdisable || disabled - WithMakeAnimation: - Condition: build-incomplete WithSpriteTurret@VULC: RequiresCondition: !build-incomplete && tower.vulcan Recoils: false diff --git a/mods/ts/rules/nod-structures.yaml b/mods/ts/rules/nod-structures.yaml index 4923b95b0a..ceba1b6e02 100644 --- a/mods/ts/rules/nod-structures.yaml +++ b/mods/ts/rules/nod-structures.yaml @@ -25,8 +25,6 @@ NAPOWR: RevealsShroud: Range: 4c0 MaxHeightDelta: 3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete && !empdisable Sequence: idle-lights @@ -66,8 +64,6 @@ NAAPWR: RevealsShroud: Range: 4c0 MaxHeightDelta: 3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete && !empdisable Sequence: idle-lights @@ -123,8 +119,6 @@ NAHAND: PrimaryCondition: primary SelectionNotification: PrimaryBuildingSelected ProductionBar: - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete Sequence: idle-lights @@ -186,8 +180,6 @@ NAWEAP: PrimaryCondition: primary SelectionNotification: PrimaryBuildingSelected ProductionBar: - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@ROOF: RequiresCondition: !build-incomplete Sequence: idle-roof @@ -250,8 +242,6 @@ NAHPAD: PlayerExperience: 15 StartRepairingNotification: Repairing ProductionBar: - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@PLATFORM: RequiresCondition: !build-incomplete Sequence: idle-platform @@ -310,8 +300,6 @@ NARADR: RevealsShroud: Range: 10c0 MaxHeightDelta: 3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@DISH: RequiresCondition: !build-incomplete PauseOnCondition: disabled || empdisable @@ -351,8 +339,6 @@ NATECH: RevealsShroud: Range: 4c0 MaxHeightDelta: 3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete && !disabled Sequence: idle-lights @@ -393,8 +379,6 @@ NATMPL: MaxHeightDelta: 3 Power: Amount: -200 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete && !disabled Sequence: idle-lights diff --git a/mods/ts/rules/nod-support.yaml b/mods/ts/rules/nod-support.yaml index ecbdc2f626..8b1493a85f 100644 --- a/mods/ts/rules/nod-support.yaml +++ b/mods/ts/rules/nod-support.yaml @@ -71,8 +71,6 @@ NAPOST: Amount: -25 RevealsShroud: Range: 4c0 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete && !disabled Sequence: lights @@ -175,8 +173,6 @@ NALASR: Armament: Weapon: TurretLaserFire LocalOffset: 498,0,317 - WithMakeAnimation: - Condition: build-incomplete RenderVoxels: WithVoxelTurret: RequiresCondition: !build-incomplete @@ -223,8 +219,6 @@ NAOBEL: RequiresCondition: charging && !disabled SoundFiles: obelpowr.aud Interval: 30, 40 - WithMakeAnimation: - Condition: build-incomplete WithChargeOverlay: RequiresCondition: !build-incomplete Palette: player @@ -265,8 +259,6 @@ NASAM: InitialFacing: 224 AttackTurreted: PauseOnCondition: empdisable || disabled - WithMakeAnimation: - Condition: build-incomplete WithSpriteTurret: RequiresCondition: !build-incomplete Recoils: false @@ -302,8 +294,6 @@ NASTLH: RevealsShroud: Range: 6c0 MaxHeightDelta: 3 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@pulse: RequiresCondition: !build-incomplete && !disabled Sequence: pulse @@ -352,8 +342,6 @@ NAMISL: Type: Wood RevealsShroud: Range: 4c0 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@LIGHTS: RequiresCondition: !build-incomplete && !disabled Sequence: idle-lights @@ -422,8 +410,6 @@ NAWAST: Actor: WEED SpawnOffset: 3,1 Facing: 160 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@GLOW: RequiresCondition: !build-incomplete Sequence: idle-glow diff --git a/mods/ts/rules/shared-structures.yaml b/mods/ts/rules/shared-structures.yaml index ac2e7c9334..20701a4324 100644 --- a/mods/ts/rules/shared-structures.yaml +++ b/mods/ts/rules/shared-structures.yaml @@ -41,8 +41,6 @@ GACNST: ProductionType: Building ProductionBar@Defense: ProductionType: Defense - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@TOP: RequiresCondition: !build-incomplete Sequence: idle-top @@ -104,8 +102,6 @@ PROC: Actor: HARV SpawnOffset: 2,1 Facing: 160 - WithMakeAnimation: - Condition: build-incomplete WithIdleOverlay@REDLIGHTS: RequiresCondition: !build-incomplete Sequence: idle-redlights @@ -161,8 +157,6 @@ GASILO: FactionImages: gdi: gasilo.gdi nod: gasilo.nod - WithMakeAnimation: - Condition: build-incomplete WithSiloAnimation: RequiresCondition: !build-incomplete WithIdleOverlay@UNDERLAY: diff --git a/mods/ts/rules/shared-support.yaml b/mods/ts/rules/shared-support.yaml index ca5951aca1..d6f2ddc0ea 100644 --- a/mods/ts/rules/shared-support.yaml +++ b/mods/ts/rules/shared-support.yaml @@ -32,8 +32,6 @@ NAPULS: Weapon: EMPulseCannon LocalOffset: 212,0,1768 LocalYaw: 0,100 - WithMakeAnimation: - Condition: build-incomplete WithSpriteTurret: RequiresCondition: !build-incomplete Sequence: turret