From 56ab3f43da4bc8a2cde4a4d963b4634f76e00815 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 24 Jan 2016 12:58:39 +0100 Subject: [PATCH] Remove bitrotted WeaponInfo.Charges There is no logic attached anymore (or never was). --- OpenRA.Game/GameRules/WeaponInfo.cs | 2 -- OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs | 5 +++++ mods/cnc/weapons/other.yaml | 1 - mods/ra/weapons/other.yaml | 3 --- mods/ts/weapons/energyweapons.yaml | 2 -- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/OpenRA.Game/GameRules/WeaponInfo.cs b/OpenRA.Game/GameRules/WeaponInfo.cs index 16b6ff2548..0407215501 100644 --- a/OpenRA.Game/GameRules/WeaponInfo.cs +++ b/OpenRA.Game/GameRules/WeaponInfo.cs @@ -46,8 +46,6 @@ namespace OpenRA.GameRules [Desc("Number of shots in a single ammo magazine.")] public readonly int Burst = 1; - public readonly bool Charges = false; - [Desc("What types of targets are affected.")] public readonly HashSet ValidTargets = new HashSet { "Ground", "Water" }; diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index 805b884b0f..0a7f3929a6 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -3427,6 +3427,11 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + if (engineVersion < 20160124) + { + node.Value.Nodes.RemoveAll(x => x.Key == "Charges"); + } + UpgradeWeaponRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } } diff --git a/mods/cnc/weapons/other.yaml b/mods/cnc/weapons/other.yaml index 413ff655c8..b23274c1b7 100644 --- a/mods/cnc/weapons/other.yaml +++ b/mods/cnc/weapons/other.yaml @@ -120,7 +120,6 @@ Napalm: Laser: ReloadDelay: 1 Range: 7c512 - Charges: true Report: obelray1.aud Projectile: LaserZap Width: 85 diff --git a/mods/ra/weapons/other.yaml b/mods/ra/weapons/other.yaml index 7e49c0b9d4..8ed09086da 100644 --- a/mods/ra/weapons/other.yaml +++ b/mods/ra/weapons/other.yaml @@ -139,7 +139,6 @@ DepthCharge: TeslaZap: ReloadDelay: 3 - Charges: true Range: 8c512 Report: tesla1.aud Projectile: TeslaZap @@ -155,7 +154,6 @@ PortaTesla: ReloadDelay: 70 Range: 6c0 Report: tesla1.aud - Charges: yes Projectile: TeslaZap Warhead@1Dam: SpreadDamage Spread: 42 @@ -168,7 +166,6 @@ TTankZap: ReloadDelay: 120 Range: 7c0 Report: tesla1.aud - Charges: yes Projectile: TeslaZap Warhead@1Dam: SpreadDamage Spread: 42 diff --git a/mods/ts/weapons/energyweapons.yaml b/mods/ts/weapons/energyweapons.yaml index a8d81910d3..28885a4aef 100644 --- a/mods/ts/weapons/energyweapons.yaml +++ b/mods/ts/weapons/energyweapons.yaml @@ -67,7 +67,6 @@ MechRailgun: SonicZap: ReloadDelay: 180 Range: 6c0 - Charges: yes Report: sonic4.aud Projectile: AreaBeam Speed: 0c128 @@ -173,7 +172,6 @@ Proton: ObeliskLaserFire: ReloadDelay: 1 Range: 10c512 - Charges: true Report: obelray1.aud Projectile: LaserZap Width: 170