diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 7f6549ee7d..8cd4b9ab44 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -433,7 +433,7 @@ - + diff --git a/OpenRA.Mods.Common/Traits/Render/WithMuzzleFlash.cs b/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs similarity index 90% rename from OpenRA.Mods.Common/Traits/Render/WithMuzzleFlash.cs rename to OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs index bfd1d151b5..8de5835859 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithMuzzleFlash.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs @@ -17,22 +17,22 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { [Desc("Renders the MuzzleSequence from the Armament trait.")] - class WithMuzzleFlashInfo : UpgradableTraitInfo, Requires, Requires, Requires + class WithMuzzleOverlayInfo : UpgradableTraitInfo, Requires, Requires, Requires { [Desc("Ignore the weapon position, and always draw relative to the center of the actor")] public readonly bool IgnoreOffset = false; - public override object Create(ActorInitializer init) { return new WithMuzzleFlash(init.Self, this); } + public override object Create(ActorInitializer init) { return new WithMuzzleOverlay(init.Self, this); } } - class WithMuzzleFlash : UpgradableTrait, INotifyAttack, IRender, ITick + class WithMuzzleOverlay : UpgradableTrait, INotifyAttack, IRender, ITick { readonly Dictionary visible = new Dictionary(); readonly Dictionary anims = new Dictionary(); readonly Func getFacing; readonly Armament[] armaments; - public WithMuzzleFlash(Actor self, WithMuzzleFlashInfo info) + public WithMuzzleOverlay(Actor self, WithMuzzleOverlayInfo info) : base(info) { var render = self.Trait(); diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index e27b45ff96..868efad602 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -2138,6 +2138,16 @@ namespace OpenRA.Mods.Common.UtilityCommands node.Value.Value = node.Value.Value + "c0"; } + if (engineVersion < 20150920) + { + // Rename WithMuzzleFlash to WithMuzzleOverlay + if (depth == 1 && node.Key.StartsWith("WithMuzzleFlash")) + node.Key = node.Key.Replace("WithMuzzleFlash", "WithMuzzleOverlay"); + + if (depth == 1 && node.Key.StartsWith("-WithMuzzleFlash")) + node.Key = node.Key.Replace("-WithMuzzleFlash", "-WithMuzzleOverlay"); + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } } diff --git a/mods/cnc/rules/aircraft.yaml b/mods/cnc/rules/aircraft.yaml index ee46c40815..f9f1be6a11 100644 --- a/mods/cnc/rules/aircraft.yaml +++ b/mods/cnc/rules/aircraft.yaml @@ -84,7 +84,7 @@ HELI: SelfReloadTicks: 200 WithRotor: Offset: 0,0,85 - WithMuzzleFlash: + WithMuzzleOverlay: SpawnActorOnDeath: Actor: HELI.Husk AutoTarget: @@ -205,7 +205,7 @@ A10: Name: gun Weapon: Vulcan LocalOffset: 1024,0,-85 - WithMuzzleFlash: + WithMuzzleOverlay: Armament@BOMBS: Name: bombs Weapon: Napalm diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index 656a7dbb0a..314542ad34 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -377,7 +377,7 @@ BodyOrientation: QuantizedFacings: 8 WithSpriteBody: - WithMuzzleFlash: + WithMuzzleOverlay: SplitFacings: true Guard: Voice: Move diff --git a/mods/cnc/rules/infantry.yaml b/mods/cnc/rules/infantry.yaml index 8d2932bdd2..8c349b5bab 100644 --- a/mods/cnc/rules/infantry.yaml +++ b/mods/cnc/rules/infantry.yaml @@ -92,7 +92,7 @@ E4: MuzzleSequence: muzzle MuzzleSplitFacings: 8 AttackFrontal: - WithMuzzleFlash: + WithMuzzleOverlay: SplitFacings: true WithInfantryBody: AttackSequence: shoot @@ -124,7 +124,7 @@ E5: MuzzleSequence: muzzle MuzzleSplitFacings: 8 AttackFrontal: - WithMuzzleFlash: + WithMuzzleOverlay: SplitFacings: true -PoisonedByTiberium: WithInfantryBody: diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index 23d38bfcc8..d2f5f7f098 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -659,7 +659,7 @@ GUN: LocalOffset: 512,0,112 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: -WithDeathAnimation: DetectCloaked: Range: 3c0 @@ -700,7 +700,7 @@ SAM: Weapon: SAMMissile MuzzleSequence: muzzle AttackPopupTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: -RenderDetectionCircle: Power: Amount: -20 @@ -779,7 +779,7 @@ GTWR: QuantizedFacings: 8 DetectCloaked: Range: 3c0 - WithMuzzleFlash: + WithMuzzleOverlay: Turreted: ROT: 255 Power: diff --git a/mods/cnc/rules/vehicles.yaml b/mods/cnc/rules/vehicles.yaml index 86a9849a1d..4834cdb112 100644 --- a/mods/cnc/rules/vehicles.yaml +++ b/mods/cnc/rules/vehicles.yaml @@ -113,7 +113,7 @@ APC: LocalOffset: 85,85,299, 85,-85,299 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: Cargo: @@ -148,7 +148,7 @@ ARTY: LocalOffset: 624,0,208 MuzzleSequence: muzzle AttackFrontal: - WithMuzzleFlash: + WithMuzzleOverlay: AutoTarget: InitialStance: Defend SpawnActorOnDeath: @@ -185,7 +185,7 @@ FTNK: MuzzleSplitFacings: 8 AttackFrontal: AutoTarget: - WithMuzzleFlash: + WithMuzzleOverlay: SplitFacings: true Explodes: Weapon: FlametankExplode @@ -221,7 +221,7 @@ BGGY: LocalOffset: 171,0,43 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SpawnActorOnDeath: @@ -291,7 +291,7 @@ JEEP: LocalOffset: 171,0,85 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SpawnActorOnDeath: @@ -326,7 +326,7 @@ LTNK: LocalOffset: 720,0,90 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SpawnActorOnDeath: @@ -360,7 +360,7 @@ MTNK: LocalOffset: 768,0,90 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SpawnActorOnDeath: @@ -406,7 +406,7 @@ HTNK: Recoil: 10 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: AutoTarget: SelfHealing: Ticks: 10 diff --git a/mods/d2k/rules/structures.yaml b/mods/d2k/rules/structures.yaml index 67abbf65a1..60451f505b 100644 --- a/mods/d2k/rules/structures.yaml +++ b/mods/d2k/rules/structures.yaml @@ -549,7 +549,7 @@ medium_gun_turret: Range: 8c0 BodyOrientation: QuantizedFacings: 32 - WithMuzzleFlash: + WithMuzzleOverlay: Turreted: ROT: 6 InitialFacing: 128 diff --git a/mods/d2k/rules/vehicles.yaml b/mods/d2k/rules/vehicles.yaml index 38f92308f8..35357a682d 100644 --- a/mods/d2k/rules/vehicles.yaml +++ b/mods/d2k/rules/vehicles.yaml @@ -107,7 +107,7 @@ trike: Speed: 128 RevealsShroud: Range: 7c0 - WithMuzzleFlash: + WithMuzzleOverlay: Armament@damage: Weapon: HMG LocalOffset: -416,0,0 @@ -187,7 +187,7 @@ siege_tank: LocalOffset: 512,0,320 MuzzleSequence: muzzle AttackFrontal: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: Explodes: Weapon: UnitExplodeMed @@ -297,7 +297,7 @@ devastator: LocalOffset: 640,0,32 MuzzleSequence: muzzle AttackFrontal: - WithMuzzleFlash: + WithMuzzleOverlay: IgnoreOffset: true AutoTarget: Explodes: @@ -330,7 +330,7 @@ raider: Speed: 149 RevealsShroud: Range: 7c0 - WithMuzzleFlash: + WithMuzzleOverlay: Armament@damage: Weapon: HMGo LocalOffset: 170,0,0 @@ -430,7 +430,7 @@ deviator: LocalOffset: 256,0,0 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: Explodes: diff --git a/mods/ra/maps/allies-03b/map.yaml b/mods/ra/maps/allies-03b/map.yaml index 8dc8520278..accd979fd5 100644 --- a/mods/ra/maps/allies-03b/map.yaml +++ b/mods/ra/maps/allies-03b/map.yaml @@ -1382,7 +1382,7 @@ Rules: -Huntable: -Targetable: -Armament: - -WithMuzzleFlash: + -WithMuzzleOverlay: Cargo: Types: ~disabled RevealsShroud: diff --git a/mods/ra/maps/drop-zone-w/map.yaml b/mods/ra/maps/drop-zone-w/map.yaml index 70aaaa4ac8..4914b8b404 100644 --- a/mods/ra/maps/drop-zone-w/map.yaml +++ b/mods/ra/maps/drop-zone-w/map.yaml @@ -236,8 +236,8 @@ Rules: Name: secondary Weapon: M60mg AttackFrontal: - WithMuzzleFlash@PRIMARY: - WithMuzzleFlash@SECONDARY: + WithMuzzleOverlay@PRIMARY: + WithMuzzleOverlay@SECONDARY: Armament: secondary MustBeDestroyed: RequiredForShortGame: true diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index 949cf039f8..3da5a24c30 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -2206,7 +2206,7 @@ Rules: Recoil: 43 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: Explodes: diff --git a/mods/ra/rules/aircraft.yaml b/mods/ra/rules/aircraft.yaml index 5fb48bd807..a75cd3b636 100644 --- a/mods/ra/rules/aircraft.yaml +++ b/mods/ra/rules/aircraft.yaml @@ -182,7 +182,7 @@ YAK: ReturnOnIdle: SelectionDecorations: VisualBounds: 30,28,0,2 - WithMuzzleFlash: + WithMuzzleOverlay: Contrail: Offset: -853,0,0 SpawnActorOnDeath: @@ -328,7 +328,7 @@ HIND: ReloadTicks: 8 SelectionDecorations: VisualBounds: 38,32,0,0 - WithMuzzleFlash: + WithMuzzleOverlay: SpawnActorOnDeath: Actor: HIND.Husk SmokeTrailWhenDamaged: diff --git a/mods/ra/rules/ships.yaml b/mods/ra/rules/ships.yaml index 101eed2f4c..a157bc9a18 100644 --- a/mods/ra/rules/ships.yaml +++ b/mods/ra/rules/ships.yaml @@ -199,7 +199,7 @@ CA: RecoilRecovery: 34 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: SelectionDecorations: VisualBounds: 44,44 WithTurret@PRIMARY: @@ -272,7 +272,7 @@ PT: Weapon: DepthCharge MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: SelectionDecorations: VisualBounds: 36,36 WithTurret: diff --git a/mods/ra/rules/structures.yaml b/mods/ra/rules/structures.yaml index 4b91b085b8..c1d50a6128 100644 --- a/mods/ra/rules/structures.yaml +++ b/mods/ra/rules/structures.yaml @@ -454,7 +454,7 @@ AGUN: LocalOffset: 432,150,-30, 432,-150,-30 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: RenderRangeCircle: RangeCircleType: aa Power: @@ -616,7 +616,7 @@ GUN: LocalOffset: 512,0,112 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: Power: Amount: -40 DetectCloaked: @@ -692,7 +692,7 @@ SAM: Weapon: Nike MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: RenderRangeCircle: RangeCircleType: aa Power: diff --git a/mods/ra/rules/vehicles.yaml b/mods/ra/rules/vehicles.yaml index b5b7bf3d5d..d1a24af220 100644 --- a/mods/ra/rules/vehicles.yaml +++ b/mods/ra/rules/vehicles.yaml @@ -60,7 +60,7 @@ V2RL: LocalOffset: 768,0,90 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SpawnActorOnDeath: @@ -97,7 +97,7 @@ V2RL: LocalOffset: 720,0,80 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SpawnActorOnDeath: @@ -136,7 +136,7 @@ V2RL: LocalOffset: 768,85,90, 768,-85,90 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SpawnActorOnDeath: @@ -184,7 +184,7 @@ V2RL: Recoil: 43 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SpawnActorOnDeath: @@ -224,7 +224,7 @@ ARTY: LocalOffset: 624,0,208 MuzzleSequence: muzzle AttackFrontal: - WithMuzzleFlash: + WithMuzzleOverlay: Explodes: Weapon: ArtilleryExplode EmptyWeapon: UnitExplodeSmall @@ -343,7 +343,7 @@ JEEP: Weapon: M60mg MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: Cargo: @@ -378,7 +378,7 @@ APC: LocalOffset: 0,0,171 MuzzleSequence: muzzle AttackFrontal: - WithMuzzleFlash: + WithMuzzleOverlay: AutoTarget: Cargo: Types: Infantry @@ -601,7 +601,7 @@ FTRK: LocalOffset: 512,0,192 MuzzleSequence: muzzle AttackTurreted: - WithMuzzleFlash: + WithMuzzleOverlay: WithTurret: AutoTarget: SelectionDecorations: diff --git a/mods/ts/rules/civilian-vehicles.yaml b/mods/ts/rules/civilian-vehicles.yaml index 0e1d2a1a5b..19b4e3ec7c 100644 --- a/mods/ts/rules/civilian-vehicles.yaml +++ b/mods/ts/rules/civilian-vehicles.yaml @@ -32,7 +32,7 @@ DamageCooldown: 200 WithVoxelTurret: WithVoxelBarrel: - WithMuzzleFlash: + WithMuzzleOverlay: ^TRUCK: Inherits: ^CivilianVoxelVehicle diff --git a/mods/ts/rules/gdi-support.yaml b/mods/ts/rules/gdi-support.yaml index 3c53701739..5d1f9b1fe0 100644 --- a/mods/ts/rules/gdi-support.yaml +++ b/mods/ts/rules/gdi-support.yaml @@ -99,7 +99,7 @@ GACTWR: UpgradeMinEnabledLevel: 1 Weapon: RedEye2 LocalOffset: 512,0,512 - WithMuzzleFlash: + WithMuzzleOverlay: UpgradeTypes: tower.vulcan UpgradeMinEnabledLevel: 1 WithIdleOverlay@LIGHTS: diff --git a/mods/ts/rules/nod-support.yaml b/mods/ts/rules/nod-support.yaml index 1511e1df89..5e7b9e9505 100644 --- a/mods/ts/rules/nod-support.yaml +++ b/mods/ts/rules/nod-support.yaml @@ -183,7 +183,7 @@ GATICK: TransformSounds: place2.aud NoTransformSounds: Voice: Move - WithMuzzleFlash: + WithMuzzleOverlay: GAARTY: Inherits@1: ^DeployedVehicle @@ -218,7 +218,7 @@ GAARTY: TransformSounds: place2.aud NoTransformSounds: Voice: Move - WithMuzzleFlash: + WithMuzzleOverlay: NAMISL: Inherits: ^Building diff --git a/mods/ts/rules/nod-vehicles.yaml b/mods/ts/rules/nod-vehicles.yaml index b643851665..f0c1e0715f 100644 --- a/mods/ts/rules/nod-vehicles.yaml +++ b/mods/ts/rules/nod-vehicles.yaml @@ -26,7 +26,7 @@ BGGY: AttackFrontal: Voice: Attack AutoTarget: - WithMuzzleFlash: + WithMuzzleOverlay: BIKE: Inherits: ^VoxelVehicle @@ -97,7 +97,7 @@ TTNK: UpgradeTypes: eliteweapon UpgradeMinEnabledLevel: 1 MuzzleSequence: muzzle - WithMuzzleFlash: + WithMuzzleOverlay: RevealsShroud: Range: 5c0 Transforms: