fixed broken INIs rather than hiding the brokenness
This commit is contained in:
@@ -11,8 +11,9 @@ namespace OpenRa.FileFormats
|
|||||||
foreach (var x in ini)
|
foreach (var x in ini)
|
||||||
{
|
{
|
||||||
var field = self.GetType().GetField(x.Key.Trim());
|
var field = self.GetType().GetField(x.Key.Trim());
|
||||||
if( field != null )
|
if (field == null)
|
||||||
field.SetValue(self, GetValue(field.FieldType, x.Value.Trim()));
|
throw new NotImplementedException("Missing field `{0}` on `{1}`".F(x.Key.Trim(), self.GetType().Name));
|
||||||
|
field.SetValue(self, GetValue(field.FieldType, x.Value.Trim()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ namespace OpenRa.GameRules
|
|||||||
{
|
{
|
||||||
public class WeaponInfo
|
public class WeaponInfo
|
||||||
{
|
{
|
||||||
public readonly string Anim = null;
|
|
||||||
public readonly int Burst = 1;
|
public readonly int Burst = 1;
|
||||||
public readonly bool Camera = false;
|
|
||||||
public readonly bool Charges = false;
|
public readonly bool Charges = false;
|
||||||
public readonly int Damage = 0;
|
public readonly int Damage = 0;
|
||||||
public readonly string Projectile = "Invisible";
|
public readonly string Projectile = "Invisible";
|
||||||
@@ -13,7 +11,6 @@ namespace OpenRa.GameRules
|
|||||||
public readonly float Range = 0;
|
public readonly float Range = 0;
|
||||||
public readonly string Report = null;
|
public readonly string Report = null;
|
||||||
public readonly int Speed = -1;
|
public readonly int Speed = -1;
|
||||||
public readonly bool Supress = false;
|
|
||||||
public readonly bool TurboBoost = false;
|
public readonly bool TurboBoost = false;
|
||||||
public readonly string Warhead = null;
|
public readonly string Warhead = null;
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ BuildSpeed=.1 ; general build speed [time (in minutes) to produce a 10
|
|||||||
|
|
||||||
GemValue=50 ; gem credits per 'bail' carried by a harvester
|
GemValue=50 ; gem credits per 'bail' carried by a harvester
|
||||||
GoldValue=25 ; gold credits per 'bail' carried by a harvester
|
GoldValue=25 ; gold credits per 'bail' carried by a harvester
|
||||||
GrowthRate=.3 ; minutes between ore (Tiberium) growth
|
|
||||||
BailCount=28 ; number of 'bails' carried by a harvester
|
|
||||||
LowPowerSlowdown=3 ; slowdown factor for low power
|
LowPowerSlowdown=3 ; slowdown factor for low power
|
||||||
|
|
||||||
GapRegenInterval=.1 ; gap generators will regenerate their shroud at this time interval
|
GapRegenInterval=.1 ; gap generators will regenerate their shroud at this time interval
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ Projectile=Invisible
|
|||||||
Speed=100
|
Speed=100
|
||||||
Warhead=SA
|
Warhead=SA
|
||||||
Report=GUN13
|
Report=GUN13
|
||||||
Anim=MINIGUN
|
|
||||||
|
|
||||||
[Laser]
|
[Laser]
|
||||||
Damage=100
|
Damage=100
|
||||||
@@ -58,7 +57,6 @@ Projectile=Cannon
|
|||||||
Speed=40
|
Speed=40
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=CANNON2
|
Report=CANNON2
|
||||||
Anim=GUNFIRE
|
|
||||||
|
|
||||||
[120mm]
|
[120mm]
|
||||||
Damage=40
|
Damage=40
|
||||||
@@ -68,7 +66,6 @@ Projectile=Cannon
|
|||||||
Speed=40
|
Speed=40
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=CANNON1
|
Report=CANNON1
|
||||||
Anim=GUNFIRE
|
|
||||||
Burst=2
|
Burst=2
|
||||||
|
|
||||||
[ProjectileTypes]
|
[ProjectileTypes]
|
||||||
|
|||||||
@@ -7,20 +7,6 @@
|
|||||||
|
|
||||||
[General]
|
[General]
|
||||||
|
|
||||||
; crates
|
|
||||||
CrateMinimum=1 ; crates are normally one per human player but never below this number
|
|
||||||
CrateMaximum=255 ; crates can never exceed this quantity
|
|
||||||
CrateRadius=3.0 ; radius (cells) for area effect crate powerup bonuses
|
|
||||||
CrateRegen=3 ; average minutes between random powerup crate regeneration
|
|
||||||
UnitCrateType=none ; specifies specific unit type for unit type crate ['none' means pick randomly]
|
|
||||||
WaterCrateChance=20% ; chance that a water crate will be generated rather than land crate [multiplay only]
|
|
||||||
SoloCrateMoney=2000 ; money to give for money crate in solo play missions
|
|
||||||
SilverCrate=HealBase ; solo play silver crate bonus
|
|
||||||
WaterCrate=Money ; solo play water crate bonus
|
|
||||||
WoodCrate=Money ; solo play wood crate bonus
|
|
||||||
|
|
||||||
; This section probably dies --chrisf
|
|
||||||
|
|
||||||
; special weapons
|
; special weapons
|
||||||
GapRegenInterval=.1 ; gap generators will regenerate their shroud at this time interval
|
GapRegenInterval=.1 ; gap generators will regenerate their shroud at this time interval
|
||||||
BadgerBombCount=1 ; number of badgers used to drop parabombs
|
BadgerBombCount=1 ; number of badgers used to drop parabombs
|
||||||
@@ -44,9 +30,6 @@ URepairStep=10 ; [units only] hit points to heal per repair 'tick' for
|
|||||||
|
|
||||||
; combat and damage
|
; combat and damage
|
||||||
TurboBoost=1.5 ; speed multiplier for turbo-boosted weapons when firing upon aircraft
|
TurboBoost=1.5 ; speed multiplier for turbo-boosted weapons when firing upon aircraft
|
||||||
APMineDamage=1000 ; damage to inflict when anti-personnel mine explodes
|
|
||||||
AVMineDamage=1200 ; damage to inflict when anti-vehicle mine explodes
|
|
||||||
AtomDamage=1000 ; damage points when nuclear bomb explodes (regardless of source)
|
|
||||||
BallisticScatter=1.0 ; maximum scatter distance (cells) for inaccurate ballistic projectiles
|
BallisticScatter=1.0 ; maximum scatter distance (cells) for inaccurate ballistic projectiles
|
||||||
C4Delay=.03 ; minutes to delay after placing C4 before building will explode
|
C4Delay=.03 ; minutes to delay after placing C4 before building will explode
|
||||||
ExpSpread=.3 ; cell damage spread per 256 damage points for exploding object types [if Explodes=yes]
|
ExpSpread=.3 ; cell damage spread per 256 damage points for exploding object types [if Explodes=yes]
|
||||||
@@ -64,7 +47,6 @@ Incoming=10 ; If an incoming projectile is as slow or slower than th
|
|||||||
; parachute bombs have this characteristic.
|
; parachute bombs have this characteristic.
|
||||||
|
|
||||||
; income and production
|
; income and production
|
||||||
BailCount=28 ; number of 'bails' carried by a harvester
|
|
||||||
BuildSpeed=.8 ; general build speed [time (in minutes) to produce a 1000 credit cost item]
|
BuildSpeed=.8 ; general build speed [time (in minutes) to produce a 1000 credit cost item]
|
||||||
BuildupTime=.06 ; average minutes that building build-up animation runs
|
BuildupTime=.06 ; average minutes that building build-up animation runs
|
||||||
GemValue=50 ; gem credits per 'bail' carried by a harvester
|
GemValue=50 ; gem credits per 'bail' carried by a harvester
|
||||||
@@ -114,9 +96,7 @@ LowPowerSlowdown=3
|
|||||||
; The weapons specified here are attached to the various combat
|
; The weapons specified here are attached to the various combat
|
||||||
; units and buildings.
|
; units and buildings.
|
||||||
|
|
||||||
; Anim = animation to display as a firing effect
|
|
||||||
; Burst = number of rapid succession shots from this weapon (def=1)
|
; Burst = number of rapid succession shots from this weapon (def=1)
|
||||||
; Camera = Reveals area around firer (def=no)?
|
|
||||||
; Charges = Does it have charge-up-before-firing logic (def=no)?
|
; Charges = Does it have charge-up-before-firing logic (def=no)?
|
||||||
; Damage = the amount of damage (unattenuated) dealt with every bullet
|
; Damage = the amount of damage (unattenuated) dealt with every bullet
|
||||||
; Projectile = projectile characteristic to use
|
; Projectile = projectile characteristic to use
|
||||||
@@ -125,7 +105,6 @@ LowPowerSlowdown=3
|
|||||||
; Report = sound to play when firing
|
; Report = sound to play when firing
|
||||||
; Speed = speed of projectile to target (100 is maximum)
|
; Speed = speed of projectile to target (100 is maximum)
|
||||||
; Warhead = warhead to attach to projectile
|
; Warhead = warhead to attach to projectile
|
||||||
; Supress = Should nearby friendly buildings be scanned for and if found, discourage firing on target (def=no)?
|
|
||||||
; TurboBoost = Should the weapon get a boosted speed bonus when firing upon aircraft?
|
; TurboBoost = Should the weapon get a boosted speed bonus when firing upon aircraft?
|
||||||
|
|
||||||
; Tanya pistol
|
; Tanya pistol
|
||||||
@@ -146,7 +125,6 @@ Range=6
|
|||||||
Projectile=Ack
|
Projectile=Ack
|
||||||
Speed=100
|
Speed=100
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Anim=GUNFIRE
|
|
||||||
Report=AACANON3
|
Report=AACANON3
|
||||||
|
|
||||||
; rapid fire machine gun
|
; rapid fire machine gun
|
||||||
@@ -158,7 +136,6 @@ Projectile=Invisible
|
|||||||
Speed=100
|
Speed=100
|
||||||
Warhead=SA
|
Warhead=SA
|
||||||
Report=GUN13
|
Report=GUN13
|
||||||
Anim=MINIGUN
|
|
||||||
|
|
||||||
; air-to-surface homing missile (launched from jet)
|
; air-to-surface homing missile (launched from jet)
|
||||||
[Maverick]
|
[Maverick]
|
||||||
@@ -170,16 +147,6 @@ Speed=30
|
|||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=MISSILE7
|
Report=MISSILE7
|
||||||
|
|
||||||
; camera
|
|
||||||
[Camera]
|
|
||||||
Damage=0
|
|
||||||
ROF=10
|
|
||||||
Range=2.75
|
|
||||||
Projectile=Inivisble
|
|
||||||
Speed=100
|
|
||||||
Warhead=Super
|
|
||||||
Camera=yes
|
|
||||||
|
|
||||||
; fireball from flame turret
|
; fireball from flame turret
|
||||||
[FireballLauncher]
|
[FireballLauncher]
|
||||||
Damage=125
|
Damage=125
|
||||||
@@ -217,7 +184,6 @@ Projectile=Invisible
|
|||||||
Speed=100
|
Speed=100
|
||||||
Warhead=SA
|
Warhead=SA
|
||||||
Report=GUN13
|
Report=GUN13
|
||||||
Anim=MINIGUN
|
|
||||||
|
|
||||||
; civilian pistol
|
; civilian pistol
|
||||||
[Pistol]
|
[Pistol]
|
||||||
@@ -277,7 +243,6 @@ Projectile=Cannon
|
|||||||
Speed=40
|
Speed=40
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=CANNON2
|
Report=CANNON2
|
||||||
Anim=GUNFIRE
|
|
||||||
|
|
||||||
; light anti-armor cannon
|
; light anti-armor cannon
|
||||||
[90mm]
|
[90mm]
|
||||||
@@ -288,7 +253,6 @@ Projectile=Cannon
|
|||||||
Speed=40
|
Speed=40
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=CANNON1
|
Report=CANNON1
|
||||||
Anim=GUNFIRE
|
|
||||||
|
|
||||||
; medium anti-armor cannon
|
; medium anti-armor cannon
|
||||||
[105mm]
|
[105mm]
|
||||||
@@ -299,7 +263,6 @@ Projectile=Cannon
|
|||||||
Speed=40
|
Speed=40
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=CANNON1
|
Report=CANNON1
|
||||||
Anim=GUNFIRE
|
|
||||||
|
|
||||||
; large anti-armor cannon
|
; large anti-armor cannon
|
||||||
[120mm]
|
[120mm]
|
||||||
@@ -310,7 +273,6 @@ Projectile=Cannon
|
|||||||
Speed=40
|
Speed=40
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=CANNON1
|
Report=CANNON1
|
||||||
Anim=GUNFIRE
|
|
||||||
Burst=2
|
Burst=2
|
||||||
|
|
||||||
; turret cannon
|
; turret cannon
|
||||||
@@ -322,7 +284,6 @@ Projectile=Cannon
|
|||||||
Speed=40
|
Speed=40
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=TURRET1
|
Report=TURRET1
|
||||||
Anim=GUNFIRE
|
|
||||||
|
|
||||||
; Vehicle carried anti-tank missile
|
; Vehicle carried anti-tank missile
|
||||||
[MammothTusk]
|
[MammothTusk]
|
||||||
@@ -344,7 +305,6 @@ Projectile=Ballistic
|
|||||||
Speed=12
|
Speed=12
|
||||||
Warhead=HE
|
Warhead=HE
|
||||||
Report=TANK5
|
Report=TANK5
|
||||||
Anim=GUNFIRE
|
|
||||||
|
|
||||||
; vehicle mounted machine gun
|
; vehicle mounted machine gun
|
||||||
[M60mg]
|
[M60mg]
|
||||||
@@ -355,7 +315,6 @@ Projectile=Invisible
|
|||||||
Speed=100
|
Speed=100
|
||||||
Warhead=SA
|
Warhead=SA
|
||||||
Report=PILLBOX1
|
Report=PILLBOX1
|
||||||
Anim=MINIGUN
|
|
||||||
|
|
||||||
; napalm bomblets (dropped from plane)
|
; napalm bomblets (dropped from plane)
|
||||||
[Napalm]
|
[Napalm]
|
||||||
@@ -386,7 +345,6 @@ Projectile=AAMissile
|
|||||||
Speed=50
|
Speed=50
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=MISSILE1
|
Report=MISSILE1
|
||||||
Anim=SAMFIRE
|
|
||||||
|
|
||||||
; man-packed surface to air missile
|
; man-packed surface to air missile
|
||||||
[RedEye]
|
[RedEye]
|
||||||
@@ -397,7 +355,6 @@ Projectile=AAMissile
|
|||||||
Speed=50
|
Speed=50
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=MISSILE1
|
Report=MISSILE1
|
||||||
Anim=SAMFIRE
|
|
||||||
|
|
||||||
; 8 inch cruiser cannon
|
; 8 inch cruiser cannon
|
||||||
[8Inch]
|
[8Inch]
|
||||||
@@ -408,8 +365,6 @@ Projectile=Ballistic
|
|||||||
Speed=6
|
Speed=6
|
||||||
Warhead=HE
|
Warhead=HE
|
||||||
Report=TURRET1
|
Report=TURRET1
|
||||||
Anim=GUNFIRE
|
|
||||||
Supress=yes
|
|
||||||
|
|
||||||
; gunboat mounted anti-aircraft rocket
|
; gunboat mounted anti-aircraft rocket
|
||||||
[Stinger]
|
[Stinger]
|
||||||
@@ -442,7 +397,6 @@ Projectile=Cannon
|
|||||||
Speed=25
|
Speed=25
|
||||||
Warhead=AP
|
Warhead=AP
|
||||||
Report=CANNON2
|
Report=CANNON2
|
||||||
Anim=GUNFIRE
|
|
||||||
|
|
||||||
; anti-submarine weapon
|
; anti-submarine weapon
|
||||||
[DepthCharge]
|
[DepthCharge]
|
||||||
@@ -895,7 +849,6 @@ Colt45
|
|||||||
ZSU-23
|
ZSU-23
|
||||||
Vulcan
|
Vulcan
|
||||||
Maverick
|
Maverick
|
||||||
Camera
|
|
||||||
FireballLauncher
|
FireballLauncher
|
||||||
Flamer
|
Flamer
|
||||||
Sniper
|
Sniper
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
NetworkHost=localhost
|
NetworkHost=localhost
|
||||||
NetworkPort=1234
|
NetworkPort=1234
|
||||||
UseAftermath=yes
|
|
||||||
InitialMods=cnc
|
InitialMods=cnc
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[Settings]
|
|
||||||
NetworkHost=localhost
|
|
||||||
NetworkPort=1234
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
NetworkHost=localhost
|
NetworkHost=localhost
|
||||||
NetworkPort=1234
|
NetworkPort=1234
|
||||||
UseAftermath=yes
|
InitialMods=ra
|
||||||
Reference in New Issue
Block a user