From 72ec431766eaa37189fd4b1c8b2b41be60245932 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 4 Oct 2015 19:18:53 +0200 Subject: [PATCH 1/2] Add RenderUtils With ZOffsetFromCenter as first feature so render traits don't have to use it from WithTurret(Overlay) --- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 1 + .../Traits/Attack/AttackGarrisoned.cs | 2 +- .../Traits/Render/RenderUtils.cs | 23 +++++++++++++++++++ .../Traits/Render/WithBarrel.cs | 2 +- .../Traits/Render/WithIdleOverlay.cs | 2 +- .../Traits/Render/WithMuzzleOverlay.cs | 2 +- .../Traits/Render/WithParachute.cs | 2 +- .../Traits/Render/WithRepairOverlay.cs | 2 +- .../Traits/Render/WithTurret.cs | 8 +------ 9 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 OpenRA.Mods.Common/Traits/Render/RenderUtils.cs diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 25653a76b8..3397a472f7 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -402,6 +402,7 @@ + diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs b/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs index 008d8d6ce3..b36c0da401 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackGarrisoned.cs @@ -166,7 +166,7 @@ namespace OpenRA.Mods.Common.Traits () => PortOffset(self, port), () => false, () => false, - p => WithTurret.ZOffsetFromCenter(self, p, 1024)); + p => RenderUtils.ZOffsetFromCenter(self, p, 1024)); muzzles.Add(muzzleFlash); muzzleAnim.PlayThen(sequence, () => muzzles.Remove(muzzleFlash)); diff --git a/OpenRA.Mods.Common/Traits/Render/RenderUtils.cs b/OpenRA.Mods.Common/Traits/Render/RenderUtils.cs new file mode 100644 index 0000000000..6632719ecb --- /dev/null +++ b/OpenRA.Mods.Common/Traits/Render/RenderUtils.cs @@ -0,0 +1,23 @@ +#region Copyright & License Information +/* + * Copyright 2007-2015 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +using OpenRA.Traits; + +namespace OpenRA.Mods.Common.Traits +{ + public class RenderUtils + { + public static int ZOffsetFromCenter(Actor self, WPos pos, int offset) + { + var delta = self.CenterPosition - pos; + return delta.Y + delta.Z + offset; + } + } +} diff --git a/OpenRA.Mods.Common/Traits/Render/WithBarrel.cs b/OpenRA.Mods.Common/Traits/Render/WithBarrel.cs index b5461f15e7..5bc15e1852 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithBarrel.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithBarrel.cs @@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Traits DefaultAnimation = new Animation(self.World, rs.GetImage(self), () => turreted.TurretFacing); DefaultAnimation.PlayRepeating(NormalizeSequence(self, Info.Sequence)); rs.Add(new AnimationWithOffset( - DefaultAnimation, () => BarrelOffset(), () => IsTraitDisabled, () => false, p => WithTurret.ZOffsetFromCenter(self, p, 0))); + DefaultAnimation, () => BarrelOffset(), () => IsTraitDisabled, () => false, p => RenderUtils.ZOffsetFromCenter(self, p, 0))); // Restrict turret facings to match the sprite turreted.QuantizedFacings = DefaultAnimation.CurrentSequence.Facings; diff --git a/OpenRA.Mods.Common/Traits/Render/WithIdleOverlay.cs b/OpenRA.Mods.Common/Traits/Render/WithIdleOverlay.cs index ff17176474..a3cad29148 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithIdleOverlay.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithIdleOverlay.cs @@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Traits () => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))), () => IsTraitDisabled || !buildComplete, () => (info.PauseOnLowPower && self.IsDisabled()) || !buildComplete, - p => WithTurret.ZOffsetFromCenter(self, p, 1)); + p => RenderUtils.ZOffsetFromCenter(self, p, 1)); rs.Add(anim, info.Palette, info.IsPlayerPalette); } diff --git a/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs b/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs index 8de5835859..0acff4e932 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithMuzzleOverlay.cs @@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits () => info.IgnoreOffset ? WVec.Zero : armClosure.MuzzleOffset(self, barrel), () => IsTraitDisabled || !visible[barrel], () => false, - p => WithTurret.ZOffsetFromCenter(self, p, 2))); + p => RenderUtils.ZOffsetFromCenter(self, p, 2))); } } } diff --git a/OpenRA.Mods.Common/Traits/Render/WithParachute.cs b/OpenRA.Mods.Common/Traits/Render/WithParachute.cs index bd43a7f7a0..bddf9ec297 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithParachute.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithParachute.cs @@ -106,7 +106,7 @@ namespace OpenRA.Mods.Common.Traits () => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))), () => IsTraitDisabled && !renderProlonged, () => false, - p => WithTurret.ZOffsetFromCenter(self, p, 1)); + p => RenderUtils.ZOffsetFromCenter(self, p, 1)); var rs = self.Trait(); rs.Add(anim, info.Palette); diff --git a/OpenRA.Mods.Common/Traits/Render/WithRepairOverlay.cs b/OpenRA.Mods.Common/Traits/Render/WithRepairOverlay.cs index b270703063..3bbb52a100 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithRepairOverlay.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithRepairOverlay.cs @@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Traits () => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))), () => !visible || !buildComplete, () => info.PauseOnLowPower && self.IsDisabled(), - p => WithTurret.ZOffsetFromCenter(self, p, 1)); + p => RenderUtils.ZOffsetFromCenter(self, p, 1)); rs.Add(anim, info.Palette, info.IsPlayerPalette); } diff --git a/OpenRA.Mods.Common/Traits/Render/WithTurret.cs b/OpenRA.Mods.Common/Traits/Render/WithTurret.cs index e5089c1f13..47140634fa 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithTurret.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithTurret.cs @@ -79,7 +79,7 @@ namespace OpenRA.Mods.Common.Traits DefaultAnimation = new Animation(self.World, rs.GetImage(self), () => t.TurretFacing); DefaultAnimation.PlayRepeating(NormalizeSequence(self, info.Sequence)); rs.Add(new AnimationWithOffset( - DefaultAnimation, () => TurretOffset(self), () => IsTraitDisabled, () => false, p => ZOffsetFromCenter(self, p, 1))); + DefaultAnimation, () => TurretOffset(self), () => IsTraitDisabled, () => false, p => RenderUtils.ZOffsetFromCenter(self, p, 1))); // Restrict turret facings to match the sprite t.QuantizedFacings = DefaultAnimation.CurrentSequence.Facings; @@ -116,11 +116,5 @@ namespace OpenRA.Mods.Common.Traits var sequence = Attack.IsAttacking ? Info.AimSequence : Info.Sequence; DefaultAnimation.ReplaceAnim(sequence); } - - public static int ZOffsetFromCenter(Actor self, WPos pos, int offset) - { - var delta = self.CenterPosition - pos; - return delta.Y + delta.Z + offset; - } } } From 35c4aca9834348f79862b15633d5732d42bbcc6d Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 4 Oct 2015 19:56:35 +0200 Subject: [PATCH 2/2] Rename WithTurret, WithBarrel and WithReloadingTurret Make them use RenderUtils.ZOffsetFromCenter. --- OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj | 2 +- ...Turret.cs => WithReloadingSpriteTurret.cs} | 8 +-- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 4 +- .../{WithBarrel.cs => WithSpriteBarrel.cs} | 8 +-- .../{WithTurret.cs => WithSpriteTurret.cs} | 8 +-- .../UtilityCommands/UpgradeRules.cs | 54 +++++++++++++++++++ mods/cnc/rules/vehicles.yaml | 16 +++--- mods/d2k/rules/defaults.yaml | 2 +- mods/d2k/rules/vehicles.yaml | 4 +- mods/ra/maps/allies-03b/map.yaml | 2 +- mods/ra/maps/monster-tank-madness/map.yaml | 2 +- mods/ra/rules/ships.yaml | 8 +-- mods/ra/rules/vehicles.yaml | 14 ++--- mods/ts/rules/gdi-support.yaml | 6 +-- mods/ts/rules/gdi-vehicles.yaml | 2 +- mods/ts/rules/nod-support.yaml | 2 +- mods/ts/rules/shared-support.yaml | 2 +- 17 files changed, 99 insertions(+), 45 deletions(-) rename OpenRA.Mods.Cnc/Traits/Render/{WithReloadingTurret.cs => WithReloadingSpriteTurret.cs} (88%) rename OpenRA.Mods.Common/Traits/Render/{WithBarrel.cs => WithSpriteBarrel.cs} (92%) rename OpenRA.Mods.Common/Traits/Render/{WithTurret.cs => WithSpriteTurret.cs} (93%) diff --git a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj index c2b9a91125..74238315ae 100644 --- a/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj +++ b/OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj @@ -84,7 +84,7 @@ - + diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithReloadingTurret.cs b/OpenRA.Mods.Cnc/Traits/Render/WithReloadingSpriteTurret.cs similarity index 88% rename from OpenRA.Mods.Cnc/Traits/Render/WithReloadingTurret.cs rename to OpenRA.Mods.Cnc/Traits/Render/WithReloadingSpriteTurret.cs index 825cf602b1..a33d5b88df 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/WithReloadingTurret.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/WithReloadingSpriteTurret.cs @@ -18,7 +18,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Cnc.Traits { [Desc("Renders ammo-dependent turret graphics for units with the Turreted trait.")] - public class WithReloadingTurretInfo : WithTurretInfo, Requires, Requires + public class WithReloadingSpriteTurretInfo : WithSpriteTurretInfo, Requires, Requires { [Desc("AmmoPool to use for ammo-dependent sequences.")] public readonly string AmmoPoolName = null; @@ -27,17 +27,17 @@ namespace OpenRA.Mods.Cnc.Traits "Adds current reload stage to Sequence as suffix when a matching AmmoPool is present.")] public readonly int ReloadStages = -1; - public override object Create(ActorInitializer init) { return new WithReloadingTurret(init.Self, this); } + public override object Create(ActorInitializer init) { return new WithReloadingSpriteTurret(init.Self, this); } } - public class WithReloadingTurret : WithTurret + public class WithReloadingSpriteTurret : WithSpriteTurret { readonly int reloadStages; readonly AmmoPool ammoPool; string sequence; string ammoSuffix; - public WithReloadingTurret(Actor self, WithReloadingTurretInfo info) + public WithReloadingSpriteTurret(Actor self, WithReloadingSpriteTurretInfo info) : base(self, info) { ammoPool = self.TraitsImplementing().FirstOrDefault(a => a.Info.Name == info.AmmoPoolName); diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 3397a472f7..a753d8c425 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -412,7 +412,7 @@ - + @@ -441,7 +441,7 @@ - + diff --git a/OpenRA.Mods.Common/Traits/Render/WithBarrel.cs b/OpenRA.Mods.Common/Traits/Render/WithSpriteBarrel.cs similarity index 92% rename from OpenRA.Mods.Common/Traits/Render/WithBarrel.cs rename to OpenRA.Mods.Common/Traits/Render/WithSpriteBarrel.cs index 5bc15e1852..301075580a 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithBarrel.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithSpriteBarrel.cs @@ -17,7 +17,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { [Desc("Renders barrels for units with the Turreted trait.")] - public class WithBarrelInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, Requires, + public class WithSpriteBarrelInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, Requires, Requires, Requires, Requires { [Desc("Sequence name to use.")] @@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits [Desc("Visual offset.")] public readonly WVec LocalOffset = WVec.Zero; - public override object Create(ActorInitializer init) { return new WithBarrel(init.Self, this); } + public override object Create(ActorInitializer init) { return new WithSpriteBarrel(init.Self, this); } public IEnumerable RenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p) { @@ -52,7 +52,7 @@ namespace OpenRA.Mods.Common.Traits } } - public class WithBarrel : UpgradableTrait + public class WithSpriteBarrel : UpgradableTrait { public readonly Animation DefaultAnimation; readonly RenderSprites rs; @@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits readonly Turreted turreted; readonly BodyOrientation body; - public WithBarrel(Actor self, WithBarrelInfo info) + public WithSpriteBarrel(Actor self, WithSpriteBarrelInfo info) : base(info) { this.self = self; diff --git a/OpenRA.Mods.Common/Traits/Render/WithTurret.cs b/OpenRA.Mods.Common/Traits/Render/WithSpriteTurret.cs similarity index 93% rename from OpenRA.Mods.Common/Traits/Render/WithTurret.cs rename to OpenRA.Mods.Common/Traits/Render/WithSpriteTurret.cs index 47140634fa..a3b1513740 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithTurret.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithSpriteTurret.cs @@ -17,7 +17,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { [Desc("Renders turrets for units with the Turreted trait.")] - public class WithTurretInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, + public class WithSpriteTurretInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, Requires, Requires, Requires, Requires { [Desc("Sequence name to use")] @@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Traits [Desc("Render recoil")] public readonly bool Recoils = true; - public override object Create(ActorInitializer init) { return new WithTurret(init.Self, this); } + public override object Create(ActorInitializer init) { return new WithSpriteTurret(init.Self, this); } public IEnumerable RenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p) { @@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Traits } } - public class WithTurret : UpgradableTrait, ITick, INotifyDamageStateChanged + public class WithSpriteTurret : UpgradableTrait, ITick, INotifyDamageStateChanged { public readonly Animation DefaultAnimation; protected readonly AttackBase Attack; @@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Traits readonly Turreted t; readonly Armament[] arms; - public WithTurret(Actor self, WithTurretInfo info) + public WithSpriteTurret(Actor self, WithSpriteTurretInfo info) : base(info) { rs = self.Trait(); diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index f82448bb7d..6b8296f81c 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -2399,6 +2399,60 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + if (engineVersion < 20151127) + { + // Rename WithTurret to WithSpriteTurret + if (depth == 1 && node.Key.StartsWith("WithTurret")) + { + var parts = node.Key.Split('@'); + node.Key = "WithSpriteTurret"; + if (parts.Length > 1) + node.Key += "@" + parts[1]; + } + + if (depth == 1 && node.Key.StartsWith("-WithTurret")) + { + var parts = node.Key.Split('@'); + node.Key = "-WithSpriteTurret"; + if (parts.Length > 1) + node.Key += "@" + parts[1]; + } + + // Rename WithBarrel to WithSpriteBarrel + if (depth == 1 && node.Key.StartsWith("WithBarrel")) + { + var parts = node.Key.Split('@'); + node.Key = "WithSpriteBarrel"; + if (parts.Length > 1) + node.Key += "@" + parts[1]; + } + + if (depth == 1 && node.Key.StartsWith("-WithBarrel")) + { + var parts = node.Key.Split('@'); + node.Key = "-WithSpriteBarrel"; + if (parts.Length > 1) + node.Key += "@" + parts[1]; + } + + // Rename WithReloadingTurret to WithReloadingSpriteTurret + if (depth == 1 && node.Key.StartsWith("WithReloadingTurret")) + { + var parts = node.Key.Split('@'); + node.Key = "WithReloadingSpriteTurret"; + if (parts.Length > 1) + node.Key += "@" + parts[1]; + } + + if (depth == 1 && node.Key.StartsWith("-WithReloadingTurret")) + { + var parts = node.Key.Split('@'); + node.Key = "-WithReloadingSpriteTurret"; + if (parts.Length > 1) + node.Key += "@" + parts[1]; + } + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } } diff --git a/mods/cnc/rules/vehicles.yaml b/mods/cnc/rules/vehicles.yaml index 36375bbd0e..17fab2ef02 100644 --- a/mods/cnc/rules/vehicles.yaml +++ b/mods/cnc/rules/vehicles.yaml @@ -114,7 +114,7 @@ APC: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: Cargo: Types: Infantry @@ -220,7 +220,7 @@ BGGY: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SpawnActorOnDeath: Actor: BGGY.Husk @@ -290,7 +290,7 @@ JEEP: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SpawnActorOnDeath: Actor: JEEP.Husk @@ -325,7 +325,7 @@ LTNK: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SpawnActorOnDeath: Actor: LTNK.Husk @@ -359,7 +359,7 @@ MTNK: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SpawnActorOnDeath: Actor: MTNK.Husk @@ -387,7 +387,7 @@ HTNK: Type: Heavy RevealsShroud: Range: 6c0 - WithTurret: + WithSpriteTurret: Turreted: ROT: 3 Armament@PRIMARY: @@ -445,7 +445,7 @@ MSAM: Weapon: 227mm LocalOffset: 213,-128,0, 213,128,0 AttackFrontal: - WithTurret: + WithSpriteTurret: AimSequence: aim AutoTarget: SpawnActorOnDeath: @@ -485,7 +485,7 @@ MLRS: ReloadCount: 1 SelfReloadTicks: 100 AttackTurreted: - WithReloadingTurret: + WithReloadingSpriteTurret: AmmoPoolName: primary AutoTarget: InitialStanceAI: Defend diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index 05840a4246..8f57285af0 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -283,7 +283,7 @@ ^Defense: Inherits: ^Building - WithTurret: + WithSpriteTurret: AttackTurreted: AutoTarget: RenderRangeCircle: diff --git a/mods/d2k/rules/vehicles.yaml b/mods/d2k/rules/vehicles.yaml index cd532a4bcc..53d1b2c322 100644 --- a/mods/d2k/rules/vehicles.yaml +++ b/mods/d2k/rules/vehicles.yaml @@ -205,7 +205,7 @@ siege_tank: MuzzleSequence: muzzle AttackFrontal: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: Explodes: Weapon: UnitExplodeMed EmptyWeapon: UnitExplodeMed @@ -465,7 +465,7 @@ deviator: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: Explodes: Weapon: UnitExplodeMed diff --git a/mods/ra/maps/allies-03b/map.yaml b/mods/ra/maps/allies-03b/map.yaml index 7182e4b87a..c8fc121956 100644 --- a/mods/ra/maps/allies-03b/map.yaml +++ b/mods/ra/maps/allies-03b/map.yaml @@ -1388,7 +1388,7 @@ Rules: -Huntable: -Targetable: -Armament: - -WithTurret: + -WithSpriteTurret: -WithMuzzleOverlay: Cargo: Types: ~disabled diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index 7eabac970f..3595c9c1c5 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -2209,7 +2209,7 @@ Rules: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: Explodes: Weapon: MiniNuke diff --git a/mods/ra/rules/ships.yaml b/mods/ra/rules/ships.yaml index 38dcb2af36..a496b33edd 100644 --- a/mods/ra/rules/ships.yaml +++ b/mods/ra/rules/ships.yaml @@ -149,7 +149,7 @@ DD: AttackTurreted: SelectionDecorations: VisualBounds: 38,38 - WithTurret: + WithSpriteTurret: AutoTarget: DetectCloaked: CloakTypes: Underwater @@ -204,9 +204,9 @@ CA: WithMuzzleOverlay: SelectionDecorations: VisualBounds: 44,44 - WithTurret@PRIMARY: + WithSpriteTurret@PRIMARY: Turret: primary - WithTurret@SECONDARY: + WithSpriteTurret@SECONDARY: Turret: secondary AutoTarget: @@ -277,7 +277,7 @@ PT: WithMuzzleOverlay: SelectionDecorations: VisualBounds: 36,36 - WithTurret: + WithSpriteTurret: AutoTarget: DetectCloaked: CloakTypes: Underwater diff --git a/mods/ra/rules/vehicles.yaml b/mods/ra/rules/vehicles.yaml index 09cbd0c480..7f15891566 100644 --- a/mods/ra/rules/vehicles.yaml +++ b/mods/ra/rules/vehicles.yaml @@ -61,7 +61,7 @@ V2RL: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SpawnActorOnDeath: Actor: 1TNK.Husk @@ -98,7 +98,7 @@ V2RL: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SpawnActorOnDeath: Actor: 2TNK.Husk @@ -137,7 +137,7 @@ V2RL: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SpawnActorOnDeath: Actor: 3TNK.Husk @@ -185,7 +185,7 @@ V2RL: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SpawnActorOnDeath: Actor: 4TNK.Husk @@ -344,7 +344,7 @@ JEEP: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: Cargo: Types: Infantry @@ -608,7 +608,7 @@ FTRK: MuzzleSequence: muzzle AttackTurreted: WithMuzzleOverlay: - WithTurret: + WithSpriteTurret: AutoTarget: SelectionDecorations: VisualBounds: 28,28 @@ -738,7 +738,7 @@ STNK: Turreted: ROT: 5 AttackTurreted: - WithTurret: + WithSpriteTurret: Cargo: Types: Infantry MaxWeight: 4 diff --git a/mods/ts/rules/gdi-support.yaml b/mods/ts/rules/gdi-support.yaml index 2b062faa6e..da1d68de25 100644 --- a/mods/ts/rules/gdi-support.yaml +++ b/mods/ts/rules/gdi-support.yaml @@ -62,17 +62,17 @@ GACTWR: UpgradeMinEnabledLevel: 1 CanPowerDown: IndicatorPalette: mouse - WithTurret@VULC: + WithSpriteTurret@VULC: UpgradeTypes: tower.vulcan UpgradeMinEnabledLevel: 1 Recoils: no Sequence: turret-vulcan - WithTurret@ROCKET: + WithSpriteTurret@ROCKET: UpgradeTypes: tower.rocket UpgradeMinEnabledLevel: 1 Recoils: no Sequence: turret-rocket - WithTurret@SAM: + WithSpriteTurret@SAM: UpgradeTypes: tower.sam UpgradeMinEnabledLevel: 1 Recoils: no diff --git a/mods/ts/rules/gdi-vehicles.yaml b/mods/ts/rules/gdi-vehicles.yaml index 6e020f4052..04c0f0a2c2 100644 --- a/mods/ts/rules/gdi-vehicles.yaml +++ b/mods/ts/rules/gdi-vehicles.yaml @@ -145,7 +145,7 @@ MMCH: ROT: 5 AttackTurreted: Voice: Attack - WithTurret: + WithSpriteTurret: Recoils: no Armament: Weapon: 120mm diff --git a/mods/ts/rules/nod-support.yaml b/mods/ts/rules/nod-support.yaml index ad9f4e32d2..5d2b9f0d5f 100644 --- a/mods/ts/rules/nod-support.yaml +++ b/mods/ts/rules/nod-support.yaml @@ -134,7 +134,7 @@ NASAM: ROT: 10 InitialFacing: 50 AttackTurreted: - WithTurret: + WithSpriteTurret: Recoils: no Armament: Weapon: RedEye2 diff --git a/mods/ts/rules/shared-support.yaml b/mods/ts/rules/shared-support.yaml index e8b5ccc468..26058edc24 100644 --- a/mods/ts/rules/shared-support.yaml +++ b/mods/ts/rules/shared-support.yaml @@ -28,7 +28,7 @@ NAPULS: AttackTurreted: Armament: Weapon: EMPulseCannon - WithTurret: + WithSpriteTurret: Sequence: turret Power: Amount: -150