diff --git a/OpenRA.Game/ObjectCreator.cs b/OpenRA.Game/ObjectCreator.cs index 2d5aab0a83..2ac3e2d4ba 100755 --- a/OpenRA.Game/ObjectCreator.cs +++ b/OpenRA.Game/ObjectCreator.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using OpenRA.FileFormats; -using System.Reflection; using System.IO; +using System.Linq; +using System.Reflection; +using OpenRA.FileFormats; namespace OpenRA { diff --git a/OpenRA.Game/Traits/Armor.cs b/OpenRA.Game/Traits/Armor.cs index e91c1a7d4a..4ddd317879 100644 --- a/OpenRA.Game/Traits/Armor.cs +++ b/OpenRA.Game/Traits/Armor.cs @@ -18,7 +18,7 @@ namespace OpenRA.Traits { public class ArmorInfo : ITraitInfo { - [FieldLoader.Load] public readonly string Type = null; + public readonly string Type = null; public object Create (ActorInitializer init) { return new Armor(); } } public class Armor {} diff --git a/RALint/RALint.cs b/RALint/RALint.cs index 2c8b16dc39..e372c19287 100644 --- a/RALint/RALint.cs +++ b/RALint/RALint.cs @@ -33,7 +33,7 @@ namespace RALint static int Main(string[] args) { - //try + try { // bind some nonfatal error handling into FieldLoader, so we don't just *explode*. ObjectCreator.MissingTypeAction = s => EmitError("Missing Type: {0}".F(s)); @@ -61,11 +61,11 @@ namespace RALint return 0; } - //catch (Exception e) - //{ - // Console.WriteLine("Failed with exception: {0}".F(e)); - // return 1; - //} + catch (Exception e) + { + Console.WriteLine("Failed with exception: {0}".F(e)); + return 1; + } } static void CheckTrait(ActorInfo actorInfo, ITraitInfo traitInfo) diff --git a/mods/cnc/defaults.yaml b/mods/cnc/defaults.yaml index 859178b254..681ef1eaa6 100644 --- a/mods/cnc/defaults.yaml +++ b/mods/cnc/defaults.yaml @@ -78,7 +78,8 @@ ^Infantry: AppearsOnRadar: Health: - Armor: none + Armor: + Type: None RevealsShroud: Range: 4 Mobile: @@ -168,6 +169,8 @@ Priority: 3 Targetable: TargetTypes: Ground + Armor: + Type: Wood RepairableBuilding: Building: Dimensions: 1,1 @@ -200,7 +203,8 @@ Zombie: true Health: HP: 400 - Armor: wood + Armor: + Type: Wood Building: -RepairableBuilding: Tooltip: @@ -267,7 +271,8 @@ ^Husk: Health: HP: 140 - Armor: Heavy + Armor: + Type: Heavy Husk: Selectable: Priority: -1 diff --git a/mods/cnc/structures.yaml b/mods/cnc/structures.yaml index 34fc147426..75c7f5de2c 100644 --- a/mods/cnc/structures.yaml +++ b/mods/cnc/structures.yaml @@ -14,7 +14,6 @@ FACT: Capturable: true Health: HP: 1400 - Armor: wood RevealsShroud: Range: 5 Bib: @@ -52,7 +51,6 @@ NUKE: Capturable: true Health: HP: 400 - Armor: wood RevealsShroud: Range: 4 Bib: @@ -76,7 +74,6 @@ PROC: Capturable: true Health: HP: 900 - Armor: wood RevealsShroud: Range: 6 Bib: @@ -121,7 +118,6 @@ SILO: Capturable: true Health: HP: 300 - Armor: wood RevealsShroud: Range: 4 RenderBuildingOre: @@ -152,7 +148,6 @@ PYLE: Capturable: true Health: HP: 800 - Armor: wood RevealsShroud: Range: 5 Bib: @@ -189,7 +184,6 @@ HAND: Capturable: true Health: HP: 800 - Armor: wood RevealsShroud: Range: 5 Bib: @@ -223,7 +217,8 @@ AFLD: Capturable: true Health: HP: 1000 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 7 Bib: @@ -260,7 +255,8 @@ WEAP: Capturable: true Health: HP: 400 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 4 Bib: @@ -298,7 +294,6 @@ HQ: Capturable: true Health: HP: 1000 - Armor: wood RevealsShroud: Range: 10 Bib: @@ -325,7 +320,6 @@ NUK2: Capturable: true Health: HP: 600 - Armor: wood RevealsShroud: Range: 4 Bib: @@ -349,7 +343,6 @@ FIX: Capturable: true Health: HP: 800 - Armor: wood RevealsShroud: Range: 5 BelowUnits: @@ -377,7 +370,6 @@ HPAD: Capturable: true Health: HP: 800 - Armor: wood RevealsShroud: Range: 5 Bib: @@ -416,7 +408,6 @@ EYE: Capturable: true Health: HP: 1000 - Armor: wood RevealsShroud: Range: 10 Bib: @@ -445,7 +436,8 @@ TMPL: Capturable: true Health: HP: 2000 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 6 Bib: @@ -472,7 +464,8 @@ OBLI: Dimensions: 1,2 Health: HP: 400 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 8 RenderBuildingCharge: @@ -501,7 +494,8 @@ CYCL: Owner: nod Health: HP: 300 - Armor: none + Armor: + Type: None SBAG: Inherits: ^Wall @@ -518,7 +512,8 @@ SBAG: Owner: gdi Health: HP: 250 - Armor: none + Armor: + Type: None BRIK: Inherits: ^Wall @@ -535,7 +530,8 @@ BRIK: Owner: gdi,nod Health: HP: 1000 - Armor: heavy + Armor: + Type: Heavy Wall: CrushClasses: heavywall @@ -556,7 +552,8 @@ GUN: Power: -20 Health: HP: 400 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 7 Turreted: @@ -589,7 +586,8 @@ SAM: Dimensions: 2,1 Health: HP: 400 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 5 Turreted: @@ -620,7 +618,6 @@ GTWR: Power: -10 Health: HP: 600 - Armor: wood RevealsShroud: Range: 6 AttackOmni: @@ -647,7 +644,8 @@ ATWR: Power: -20 Health: HP: 800 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 8 AttackOmni: diff --git a/mods/cnc/vehicles.yaml b/mods/cnc/vehicles.yaml index b2b9378a10..db6b3b5267 100644 --- a/mods/cnc/vehicles.yaml +++ b/mods/cnc/vehicles.yaml @@ -16,7 +16,8 @@ MCV: Speed: 6 Health: HP: 600 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 4 Transforms: @@ -51,7 +52,8 @@ HARV: Speed: 6 Health: HP: 600 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 4 RenderUnit: @@ -73,7 +75,8 @@ APC: Speed: 15 Health: HP: 200 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 5 AttackBase: @@ -105,7 +108,8 @@ ARTY: Speed: 6 Health: HP: 75 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 6 AttackBase: @@ -131,7 +135,8 @@ FTNK: Speed: 9 Health: HP: 300 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 4 AttackBase: @@ -160,7 +165,8 @@ BGGY: Speed: 18 Health: HP: 140 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 5 Turreted: @@ -219,7 +225,8 @@ JEEP: Speed: 15 Health: HP: 150 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 7 Turreted: @@ -247,7 +254,8 @@ LTNK: Speed: 9 Health: HP: 300 - Armor: Heavy + Armor: + Type: Heavy RevealsShroud: Range: 4 Turreted: @@ -279,7 +287,8 @@ MTNK: Speed: 9 Health: HP: 400 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 5 Turreted: @@ -312,7 +321,8 @@ HTNK: Speed: 3 Health: HP: 600 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 6 Turreted: @@ -348,7 +358,8 @@ MSAM: Speed: 6 Health: HP: 120 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 6 Turreted: @@ -382,7 +393,8 @@ MLRS: Speed: 6 Health: HP: 120 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 10 Turreted: @@ -416,7 +428,8 @@ STNK: Speed: 15 Health: HP: 110 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 4 Cloak: @@ -449,7 +462,8 @@ TRAN: InitialFacing: 0 Health: HP: 90 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 8 RenderUnitRotor: @@ -478,7 +492,8 @@ HELI: Speed: 20 Health: HP: 125 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 8 AttackHeli: @@ -508,7 +523,8 @@ ORCA: Speed: 20 Health: HP: 125 - Armor: heavy + Armor: + Type: Heavy RevealsShroud: Range: 8 AttackHeli: @@ -530,7 +546,8 @@ C17: Speed: 25 Health: HP: 25 - Armor: light + Armor: + Type: Light RenderUnit: WithShadow: Cargo: @@ -551,7 +568,8 @@ A10: Speed: 25 Health: HP: 60 - Armor: light + Armor: + Type: Light RenderUnit: WithShadow: LimitedAmmo: @@ -570,7 +588,8 @@ BOAT: Icon: boaticnh Health: HP: 700 - Armor: heavy + Armor: + Type: Heavy Mobile: InitialFacing:64 ROT: 4 @@ -612,7 +631,8 @@ LST: Speed: 10 Health: HP: 400 - Armor: light + Armor: + Type: Light RevealsShroud: Range: 7 RenderUnit: diff --git a/mods/cnc/weapons.yaml b/mods/cnc/weapons.yaml index 11ff93b747..ccd77e6595 100644 --- a/mods/cnc/weapons.yaml +++ b/mods/cnc/weapons.yaml @@ -3,7 +3,11 @@ UnitExplode: Warhead: Damage: 500 Spread: 10 - Verses: 90%,75%,60%,25%,100% + Versus: + None: 90% + Wood: 75% + Light: 60% + Heavy: 25% Explosion: 8 InfDeath: 3 ImpactSound: xplobig4 @@ -12,7 +16,11 @@ UnitExplodeSmall: Warhead: Damage: 40 Spread: 10 - Verses: 90%,75%,60%,25%,100% + Versus: + None: 90% + Wood: 75% + Light: 60% + Heavy: 25% Explosion: 8 InfDeath: 3 ImpactSound: xplos @@ -22,7 +30,11 @@ Atomic: Damage: 1000 Spread: 6 Ore: true - Verses: 90%,100%,60%,25%,50% + Versus: + None: 90% + Light: 60% + Heavy: 25% + Concrete: 50% Explosion: 6 InfDeath: 4 Warhead@areanuke: @@ -31,7 +43,11 @@ Atomic: SmudgeType: Scorch Size: 5 Ore: true - Verses: 90%,100%,60%,25%,50% + Versus: + None: 90% + Light: 60% + Heavy: 25% + Concrete: 50% Delay: 3 InfDeath: 4 @@ -40,7 +56,11 @@ IonCannon: Damage: 500 Spread: 6 Ore: true - Verses: 90%,100%,60%,25%,50% + Versus: + None: 90% + Light: 60% + Heavy: 25% + Concrete: 50% InfDeath: 4 Warhead@area: DamageModel: PerCell @@ -48,7 +68,11 @@ IonCannon: SmudgeType: Scorch Size: 2,1 Ore: true - Verses: 90%,100%,60%,25%,50% + Versus: + None: 90% + Light: 60% + Heavy: 25% + Concrete: 50% Delay: 3 InfDeath: 4 @@ -61,7 +85,11 @@ Sniper: Warhead: Damage: 100 Spread: 1 - Verses: 100%,5%,5%,5%,5% + Versus: + Wood: 5% + Light: 5% + Heavy: 5% + Concrete: 5% InfDeath: 1 HighV: @@ -73,7 +101,11 @@ HighV: Warhead: Damage: 20 Spread: 3 - Verses: 100%,50%,50%,25%,25% + Versus: + Wood: 50% + Light: 50% + Heavy: 25% + Concrete: 25% InfDeath: 1 Explosion: 1 @@ -85,7 +117,11 @@ Pistol: Speed: 100 Warhead: Spread: 3 - Verses: 100%,50%,50%,25%,25% + Versus: + Wood: 50% + Light: 50% + Heavy: 25% + Concrete: 25% InfDeath: 1 Explosion: 1 Damage: 1 @@ -98,7 +134,11 @@ M16: Speed: 100 Warhead: Spread: 3 - Verses: 100%,25%,30%,10%,10% + Versus: + Wood: 25% + Light: 30% + Heavy: 10% + Concrete: 10% Explosion: 1 InfDeath: 1 Damage: 15 @@ -121,7 +161,11 @@ Rockets: RangeLimit: 20 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -147,7 +191,11 @@ Rockets.Orca: RangeLimit: 20 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -162,7 +210,11 @@ Flamethrower: Speed: 100 Warhead: Spread: 8 - Verses: 90%,100%,60%,25%,50% + Versus: + None: 90% + Light: 60% + Heavy: 25% + Concrete: 50% InfDeath: 4 ImpactSound: flamer2 SmudgeType: Scorch @@ -176,7 +228,11 @@ BigFlamer: Speed: 20 Warhead: Spread: 8 - Verses: 90%,100%,60%,25%,50% + Versus: + None: 90% + Light: 60% + Heavy: 25% + Concrete: 50% InfDeath: 4 Explosion: 3 ImpactSound: flamer2 @@ -192,7 +248,11 @@ Chemspray: Warhead: Damage: 80 Spread: 6 - Verses: 90%,75%,60%,25%,100% + Versus: + None: 90% + Wood: 75% + Light: 60% + Heavy: 25% InfDeath: 2 SmudgeType: Scorch ImpactSound: xplos @@ -208,7 +268,11 @@ Grenade: Image: BOMB Warhead: Spread: 6 - Verses: 90%,75%,60%,25%,100% + Versus: + None: 90% + Wood: 75% + Light: 60% + Heavy: 25% InfDeath: 2 Explosion: 5 ImpactSound: xplos @@ -224,7 +288,11 @@ Grenade: Speed: 40 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -240,7 +308,11 @@ Grenade: Speed: 40 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -256,7 +328,11 @@ Grenade: Speed: 40 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -273,7 +349,11 @@ Grenade: Speed: 40 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -289,7 +369,11 @@ TurretGun: Speed: 40 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -315,7 +399,11 @@ MissilePack: RangeLimit: 35 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -340,7 +428,11 @@ MissilePack: RangeLimit: 35 Warhead: Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -360,7 +452,11 @@ Ballistic: Warhead: Damage: 150 Spread: 6 - Verses: 90%,75%,60%,25%,100% + Versus: + None: 90% + Wood: 75% + Light: 60% + Heavy: 25% InfDeath: 2 Explosion: 5 SmudgeType: Crater @@ -374,7 +470,12 @@ MachineGun: Speed: 100 Warhead: Spread: 3 - Verses: 100%,50%,50%,25%,25% + Versus: + None: 100% + Wood: 50% + Light: 50% + Heavy: 25% + Concrete: 25% InfDeath: 1 Explosion: 1 Damage: 15 @@ -398,7 +499,11 @@ BoatMissile: RangeLimit: 60 Warhead: Spread: 6 - Verses: 90%,75%,60%,25%,100% + Versus: + None: 90% + Wood: 75% + Light: 60% + Heavy: 25% InfDeath: 2 Explosion: 5 ImpactSound: xplos @@ -423,7 +528,11 @@ Tomahawk: RangeLimit: 40 Warhead: Spread: 6 - Verses: 90%,75%,60%,25%,100% + Versus: + None: 90% + Wood: 75% + Light: 60% + Heavy: 25% InfDeath: 2 Explosion: 5 ImpactSound: xplos @@ -436,7 +545,11 @@ Napalm: Image: BOMBLET Warhead: Spread: 8 - Verses: 90%,100%,60%,25%,50% + Versus: + None: 90% + Light: 60% + Heavy: 25% + Concrete: 50% InfDeath: 4 Explosion: 3 ImpactSound: flamer2 @@ -453,7 +566,6 @@ Laser: UsePlayerColor: true Warhead: Spread: 1 - Verses: 100%,100%,100%,100%,100% InfDeath: 4 SmudgeType: Scorch Damage: 200 @@ -474,7 +586,11 @@ Nike: RangeLimit: 50 Warhead: AP Spread: 3 - Verses: 30%,75%,75%,100%,50% + Versus: + None: 30% + Wood: 75% + Light: 75% + Concrete: 50% InfDeath: 3 Explosion: 4 ImpactSound: xplos @@ -498,7 +614,11 @@ HonestJohn: Angle: .15 Warhead: Spread: 6 - Verses: 90%,75%,60%,25%,100% + Versus: + None: 90% + Wood: 75% + Light: 60% + Heavy: 25% InfDeath: 2 Explosion: 5 ImpactSound: xplos @@ -509,6 +629,5 @@ Tiberium: ROF: 10 Warhead: Spread: 1 - Verses: 100%,100%,100%,100%,100% InfDeath: 4 Damage: 5