Moved speed from Mobile/Heli/Plane to Unit.

This commit is contained in:
Bob
2010-01-12 21:22:28 +13:00
parent 901d48edfa
commit a0bf4f1e0f
7 changed files with 26 additions and 59 deletions

View File

@@ -7,8 +7,6 @@ namespace OpenRa.Game.Traits
{ {
class HelicopterInfo : ITraitInfo class HelicopterInfo : ITraitInfo
{ {
public readonly int Speed = 0;
public object Create(Actor self) { return new Helicopter(self); } public object Create(Actor self) { return new Helicopter(self); }
} }

View File

@@ -7,9 +7,6 @@ namespace OpenRa.Game.Traits
{ {
class MobileInfo : ITraitInfo class MobileInfo : ITraitInfo
{ {
public readonly int ROT = 0;
public readonly int Speed = 0;
public object Create(Actor self) { return new Mobile(self); } public object Create(Actor self) { return new Mobile(self); }
} }

View File

@@ -5,8 +5,6 @@ namespace OpenRa.Game.Traits
{ {
class PlaneInfo : ITraitInfo class PlaneInfo : ITraitInfo
{ {
public readonly int Speed = 0;
public object Create(Actor self) { return new Plane(self); } public object Create(Actor self) { return new Plane(self); }
} }

View File

@@ -5,6 +5,7 @@ namespace OpenRa.Game.Traits
class UnitInfo : OwnedActorInfo, ITraitInfo class UnitInfo : OwnedActorInfo, ITraitInfo
{ {
public readonly int ROT = 0; public readonly int ROT = 0;
public readonly int Speed = 0;
public object Create( Actor self ) { return new Unit( self ); } public object Create( Actor self ) { return new Unit( self ); }
} }

View File

@@ -43,6 +43,7 @@ namespace RulesConverter
{ "InitialFacing", "InitialFacing" }, { "InitialFacing", "InitialFacing" },
{ "ROT", "ROT" }, { "ROT", "ROT" },
{ "Sight", "Sight" }, { "Sight", "Sight" },
{ "Speed", "Speed" },
{ "WaterBound", "WaterBound" } } { "WaterBound", "WaterBound" } }
}, },
@@ -53,16 +54,8 @@ namespace RulesConverter
}, },
{ "Mobile", new PL { { "Mobile", new PL {
{ "Speed", "Speed" } }
//{ "MovementType", ... }, //{ "MovementType", ... },
}, }
{ "Plane", new PL {
{ "Speed", "Speed" } }
},
{ "Helicopter", new PL {
{ "Speed", "Speed" } }
}, },
{ "RenderBuilding", new PL { { "RenderBuilding", new PL {

View File

@@ -4,7 +4,6 @@ STNK:
HP: 200 HP: 200
Armor: heavy Armor: heavy
Sight: 5 Sight: 5
Mobile:
Speed: 10 Speed: 10
Turreted: Turreted:
AttackTurreted: AttackTurreted:
@@ -27,7 +26,6 @@ TTNK:
Armor: light Armor: light
Crewed: yes Crewed: yes
Sight: 7 Sight: 7
Mobile:
Speed: 8 Speed: 8
AttackBase: AttackBase:
PrimaryWeapon: TTankZap PrimaryWeapon: TTankZap
@@ -46,7 +44,6 @@ CTNK:
HP: 350 HP: 350
Armor: light Armor: light
Sight: 5 Sight: 5
Mobile:
Speed: 5 Speed: 5
AttackBase: AttackBase:
PrimaryWeapon: APTusk PrimaryWeapon: APTusk
@@ -66,7 +63,6 @@ DTRK:
HP: 110 HP: 110
Armor: light Armor: light
Sight: 3 Sight: 3
Mobile:
Speed: 8 Speed: 8
AttackBase: AttackBase:
PrimaryWeapon: Democharge PrimaryWeapon: Democharge
@@ -87,7 +83,6 @@ QTNK:
Armor: heavy Armor: heavy
Crewed: no Crewed: no
Sight: 6 Sight: 6
Mobile:
Speed: 3 Speed: 3
RenderUnit: RenderUnit:
@@ -107,9 +102,9 @@ MSUB:
Armor: light Armor: light
ROT: 7 ROT: 7
Sight: 6 Sight: 6
Speed: 5
WaterBound: yes WaterBound: yes
Mobile: Mobile:
Speed: 5
AttackBase: AttackBase:
PrimaryWeapon: SubSCUD PrimaryWeapon: SubSCUD
FireDelay: 2 FireDelay: 2
@@ -132,8 +127,8 @@ SHOK:
HP: 80 HP: 80
Armor: none Armor: none
Sight: 4 Sight: 4
Mobile:
Speed: 3 Speed: 3
Mobile:
AttackBase: AttackBase:
PrimaryWeapon: PortaTesla PrimaryWeapon: PortaTesla
RenderInfantry: RenderInfantry:
@@ -157,8 +152,8 @@ MECH:
HP: 60 HP: 60
Armor: none Armor: none
Sight: 3 Sight: 3
Mobile:
Speed: 4 Speed: 4
Mobile:
RenderInfantry: RenderInfantry:
AutoHeal: AutoHeal:
AttackBase: AttackBase:

55
ra.yaml
View File

@@ -13,7 +13,6 @@ V2RL:
Armor: light Armor: light
Crewed: yes Crewed: yes
Sight: 5 Sight: 5
Mobile:
Speed: 7 Speed: 7
AttackBase: AttackBase:
PrimaryWeapon: SCUD PrimaryWeapon: SCUD
@@ -35,7 +34,6 @@ V2RL:
Armor: heavy Armor: heavy
Crewed: yes Crewed: yes
Sight: 4 Sight: 4
Mobile:
Speed: 9 Speed: 9
Turreted: Turreted:
AttackTurreted: AttackTurreted:
@@ -59,7 +57,6 @@ V2RL:
Armor: heavy Armor: heavy
Crewed: yes Crewed: yes
Sight: 5 Sight: 5
Mobile:
Speed: 8 Speed: 8
Turreted: Turreted:
AttackTurreted: AttackTurreted:
@@ -83,7 +80,6 @@ V2RL:
Armor: heavy Armor: heavy
Crewed: yes Crewed: yes
Sight: 5 Sight: 5
Mobile:
Speed: 7 Speed: 7
Turreted: Turreted:
AttackTurreted: AttackTurreted:
@@ -107,7 +103,6 @@ V2RL:
Armor: heavy Armor: heavy
Crewed: yes Crewed: yes
Sight: 6 Sight: 6
Mobile:
Speed: 4 Speed: 4
Turreted: Turreted:
AttackTurreted: AttackTurreted:
@@ -135,7 +130,6 @@ MRJ:
Armor: light Armor: light
Crewed: yes Crewed: yes
Sight: 7 Sight: 7
Mobile:
Speed: 9 Speed: 9
RenderUnitSpinner: RenderUnitSpinner:
Offset: 0,4,0,-6 Offset: 0,4,0,-6
@@ -157,7 +151,6 @@ MGG:
Armor: light Armor: light
Crewed: yes Crewed: yes
Sight: 4 Sight: 4
Mobile:
Speed: 9 Speed: 9
RenderUnitSpinner: RenderUnitSpinner:
Offset: 0,6,0,-3 Offset: 0,6,0,-3
@@ -177,7 +170,6 @@ ARTY:
Armor: light Armor: light
Crewed: yes Crewed: yes
Sight: 5 Sight: 5
Mobile:
Speed: 6 Speed: 6
AttackBase: AttackBase:
PrimaryWeapon: 155mm PrimaryWeapon: 155mm
@@ -203,7 +195,6 @@ HARV:
Armor: heavy Armor: heavy
Crewed: yes Crewed: yes
Sight: 4 Sight: 4
Mobile:
Speed: 6 Speed: 6
RenderUnit: RenderUnit:
@@ -224,7 +215,6 @@ MCV:
Armor: light Armor: light
Crewed: yes Crewed: yes
Sight: 4 Sight: 4
Mobile:
Speed: 6 Speed: 6
McvDeploy: McvDeploy:
RenderUnit: RenderUnit:
@@ -244,7 +234,6 @@ JEEP:
Armor: light Armor: light
Crewed: yes Crewed: yes
Sight: 6 Sight: 6
Mobile:
Speed: 10 Speed: 10
Turreted: Turreted:
AttackTurreted: AttackTurreted:
@@ -268,7 +257,6 @@ APC:
HP: 200 HP: 200
Armor: heavy Armor: heavy
Sight: 5 Sight: 5
Mobile:
Speed: 10 Speed: 10
AttackBase: AttackBase:
PrimaryWeapon: M60mg PrimaryWeapon: M60mg
@@ -297,7 +285,6 @@ MNLY.AP:
Armor: heavy Armor: heavy
Crewed: yes Crewed: yes
Sight: 5 Sight: 5
Mobile:
Speed: 9 Speed: 9
RenderUnit: RenderUnit:
Image: MNLY Image: MNLY
@@ -323,7 +310,6 @@ MNLY.AT:
Armor: heavy Armor: heavy
Crewed: yes Crewed: yes
Sight: 5 Sight: 5
Mobile:
Speed: 9 Speed: 9
RenderUnit: RenderUnit:
Image: MNLY Image: MNLY
@@ -339,7 +325,6 @@ TRUK:
HP: 110 HP: 110
Armor: light Armor: light
Sight: 3 Sight: 3
Mobile:
Speed: 10 Speed: 10
RenderUnit: RenderUnit:
@@ -360,9 +345,9 @@ SS:
Armor: light Armor: light
ROT: 7 ROT: 7
Sight: 6 Sight: 6
Speed: 6
WaterBound: yes WaterBound: yes
Mobile: Mobile:
Speed: 6
RenderUnit: RenderUnit:
Submarine: Submarine:
AttackBase: AttackBase:
@@ -388,9 +373,9 @@ DD:
Armor: heavy Armor: heavy
ROT: 7 ROT: 7
Sight: 6 Sight: 6
Speed: 6
WaterBound: yes WaterBound: yes
Mobile: Mobile:
Speed: 6
Turreted: Turreted:
AttackTurreted: AttackTurreted:
PrimaryWeapon: Stinger PrimaryWeapon: Stinger
@@ -417,9 +402,9 @@ CA:
Armor: heavy Armor: heavy
ROT: 5 ROT: 5
Sight: 7 Sight: 7
Speed: 4
WaterBound: yes WaterBound: yes
Mobile: Mobile:
Speed: 4
Turreted: Turreted:
AttackTurreted: AttackTurreted:
PrimaryWeapon: 8Inch PrimaryWeapon: 8Inch
@@ -446,9 +431,9 @@ LST:
Armor: heavy Armor: heavy
ROT: 10 ROT: 10
Sight: 6 Sight: 6
Speed: 14
WaterBound: yes WaterBound: yes
Mobile: Mobile:
Speed: 14
RenderUnit: RenderUnit:
Cargo: Cargo:
PassengerTypes: Foot,Wheel,Track PassengerTypes: Foot,Wheel,Track
@@ -472,9 +457,9 @@ PT:
Armor: heavy Armor: heavy
ROT: 7 ROT: 7
Sight: 7 Sight: 7
Speed: 9
WaterBound: yes WaterBound: yes
Mobile: Mobile:
Speed: 9
Turreted: Turreted:
AttackTurreted: AttackTurreted:
PrimaryWeapon: 2Inch PrimaryWeapon: 2Inch
@@ -502,10 +487,10 @@ MIG:
InitialFacing: 192 InitialFacing: 192
ROT: 5 ROT: 5
Sight: 0 Sight: 0
Speed: 20
AttackPlane: AttackPlane:
PrimaryWeapon: Maverick PrimaryWeapon: Maverick
Plane: Plane:
Speed: 20
RenderUnit: RenderUnit:
WithShadow: WithShadow:
LimitedAmmo: LimitedAmmo:
@@ -531,10 +516,10 @@ YAK:
InitialFacing: 192 InitialFacing: 192
ROT: 5 ROT: 5
Sight: 0 Sight: 0
Speed: 16
AttackPlane: AttackPlane:
PrimaryWeapon: ChainGun PrimaryWeapon: ChainGun
Plane: Plane:
Speed: 16
RenderUnit: RenderUnit:
WithShadow: WithShadow:
LimitedAmmo: LimitedAmmo:
@@ -559,8 +544,8 @@ TRAN:
InitialFacing: 20 InitialFacing: 20
ROT: 5 ROT: 5
Sight: 0 Sight: 0
Helicopter:
Speed: 12 Speed: 12
Helicopter:
RenderUnitRotor: RenderUnitRotor:
PrimaryOffset: 0,14,0,-4 PrimaryOffset: 0,14,0,-4
SecondaryOffset: 0,-14,0,-2 SecondaryOffset: 0,-14,0,-2
@@ -589,12 +574,12 @@ HELI:
InitialFacing: 20 InitialFacing: 20
ROT: 4 ROT: 4
Sight: 0 Sight: 0
Speed: 16
AttackHeli: AttackHeli:
PrimaryWeapon: Hellfire PrimaryWeapon: Hellfire
PrimaryOffset: -5,0,0,2 PrimaryOffset: -5,0,0,2
SecondaryOffset: 5,0,0,2 SecondaryOffset: 5,0,0,2
Helicopter: Helicopter:
Speed: 16
RenderUnitRotor: RenderUnitRotor:
PrimaryOffset: 0,0,0,-2 PrimaryOffset: 0,0,0,-2
WithShadow: WithShadow:
@@ -621,12 +606,12 @@ HIND:
InitialFacing: 20 InitialFacing: 20
ROT: 4 ROT: 4
Sight: 0 Sight: 0
Speed: 12
AttackHeli: AttackHeli:
PrimaryWeapon: ChainGun PrimaryWeapon: ChainGun
PrimaryOffset: -5,0,0,2 PrimaryOffset: -5,0,0,2
SecondaryOffset: 5,0,0,2 SecondaryOffset: 5,0,0,2
Helicopter: Helicopter:
Speed: 12
RenderUnitRotor: RenderUnitRotor:
WithShadow: WithShadow:
LimitedAmmo: LimitedAmmo:
@@ -2166,8 +2151,8 @@ DOG:
HP: 12 HP: 12
Armor: none Armor: none
Sight: 5 Sight: 5
Mobile:
Speed: 4 Speed: 4
Mobile:
RenderInfantry: RenderInfantry:
Passenger: Passenger:
@@ -2186,8 +2171,8 @@ E1:
HP: 50 HP: 50
Armor: none Armor: none
Sight: 4 Sight: 4
Mobile:
Speed: 4 Speed: 4
Mobile:
RenderInfantry: RenderInfantry:
AttackBase: AttackBase:
PrimaryWeapon: M1Carbine PrimaryWeapon: M1Carbine
@@ -2211,8 +2196,8 @@ E2:
HP: 50 HP: 50
Armor: none Armor: none
Sight: 4 Sight: 4
Mobile:
Speed: 5 Speed: 5
Mobile:
RenderInfantry: RenderInfantry:
AttackBase: AttackBase:
PrimaryWeapon: Grenade PrimaryWeapon: Grenade
@@ -2238,8 +2223,8 @@ E3:
HP: 45 HP: 45
Armor: none Armor: none
Sight: 4 Sight: 4
Mobile:
Speed: 3 Speed: 3
Mobile:
RenderInfantry: RenderInfantry:
AttackBase: AttackBase:
PrimaryWeapon: RedEye PrimaryWeapon: RedEye
@@ -2265,8 +2250,8 @@ E4:
HP: 40 HP: 40
Armor: none Armor: none
Sight: 4 Sight: 4
Mobile:
Speed: 3 Speed: 3
Mobile:
RenderInfantry: RenderInfantry:
AttackBase: AttackBase:
PrimaryWeapon: Flamer PrimaryWeapon: Flamer
@@ -2293,8 +2278,8 @@ E6:
HP: 25 HP: 25
Armor: none Armor: none
Sight: 4 Sight: 4
Mobile:
Speed: 4 Speed: 4
Mobile:
EngineerCapture: EngineerCapture:
RenderInfantry: RenderInfantry:
TakeCover: TakeCover:
@@ -2318,8 +2303,8 @@ SPY:
HP: 25 HP: 25
Armor: none Armor: none
Sight: 5 Sight: 5
Mobile:
Speed: 4 Speed: 4
Mobile:
RenderInfantry: RenderInfantry:
TakeCover: TakeCover:
SquishByTank: SquishByTank:
@@ -2342,8 +2327,8 @@ THF:
HP: 25 HP: 25
Armor: none Armor: none
Sight: 5 Sight: 5
Mobile:
Speed: 4 Speed: 4
Mobile:
RenderInfantry: RenderInfantry:
TakeCover: TakeCover:
SquishByTank: SquishByTank:
@@ -2367,8 +2352,8 @@ E7:
HP: 100 HP: 100
Armor: none Armor: none
Sight: 6 Sight: 6
Mobile:
Speed: 5 Speed: 5
Mobile:
RenderInfantry: RenderInfantry:
C4Demolition: C4Demolition:
AttackBase: AttackBase:
@@ -2394,8 +2379,8 @@ MEDI:
HP: 80 HP: 80
Armor: none Armor: none
Sight: 3 Sight: 3
Mobile:
Speed: 4 Speed: 4
Mobile:
RenderInfantry: RenderInfantry:
AutoHeal: AutoHeal:
AttackBase: AttackBase: