use new AttackDefault trait instead of AttackBase; make AttackBase abstract
This commit is contained in:
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class AttackBaseInfo : ITraitInfo
|
||||
public abstract class AttackBaseInfo : ITraitInfo
|
||||
{
|
||||
[WeaponReference]
|
||||
public readonly string PrimaryWeapon = null;
|
||||
@@ -39,10 +39,10 @@ namespace OpenRA.Mods.RA
|
||||
public readonly float ScanTimeAverage = 2f;
|
||||
public readonly float ScanTimeSpread = .5f;
|
||||
|
||||
public virtual object Create(ActorInitializer init) { return new AttackBase(init.self); }
|
||||
public abstract object Create(ActorInitializer init);
|
||||
}
|
||||
|
||||
public class AttackBase : IIssueOrder, IResolveOrder, ITick, IExplodeModifier, IOrderVoice
|
||||
public abstract class AttackBase : IIssueOrder, IResolveOrder, ITick, IExplodeModifier, IOrderVoice
|
||||
{
|
||||
[Sync]
|
||||
int nextScanTime = 0;
|
||||
@@ -344,4 +344,14 @@ namespace OpenRA.Mods.RA
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class AttackDefaultInfo : AttackBaseInfo
|
||||
{
|
||||
public override object Create( ActorInitializer init ) { return new AttackDefault( init.self ); }
|
||||
}
|
||||
|
||||
public class AttackDefault : AttackBase
|
||||
{
|
||||
public AttackDefault( Actor self ) : base( self ) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ E1:
|
||||
HP: 50
|
||||
Mobile:
|
||||
Speed: 4
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: M1Carbine
|
||||
TakeCover:
|
||||
IdleAnimation:
|
||||
@@ -70,7 +70,7 @@ E2:
|
||||
HP: 50
|
||||
Mobile:
|
||||
Speed: 5
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: Grenade
|
||||
PrimaryOffset: 0,0,0,-13
|
||||
FireDelay: 15
|
||||
@@ -97,7 +97,7 @@ E3:
|
||||
HP: 45
|
||||
Mobile:
|
||||
Speed: 3
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: RedEye
|
||||
SecondaryWeapon: Dragon
|
||||
PrimaryOffset: 0,0,0,-13
|
||||
@@ -124,7 +124,7 @@ E4:
|
||||
HP: 40
|
||||
Mobile:
|
||||
Speed: 3
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: Flamer
|
||||
PrimaryOffset: 0,0,0,-7
|
||||
FireDelay: 8
|
||||
@@ -221,7 +221,7 @@ E7:
|
||||
Range: 6
|
||||
C4Demolition:
|
||||
C4Delay: .03
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: Colt45
|
||||
SecondaryWeapon: Colt45
|
||||
TakeCover:
|
||||
@@ -253,7 +253,7 @@ MEDI:
|
||||
Passenger:
|
||||
PipType: Yellow
|
||||
AutoHeal:
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: Heal
|
||||
TakeCover:
|
||||
-AutoTarget:
|
||||
@@ -261,7 +261,7 @@ MEDI:
|
||||
JustMove: true
|
||||
IdleAnimation:
|
||||
Animations: idle1,idle2
|
||||
|
||||
|
||||
C1:
|
||||
Inherits: ^Infantry
|
||||
Selectable:
|
||||
@@ -277,7 +277,7 @@ C1:
|
||||
Speed: 4
|
||||
RevealsShroud:
|
||||
Range: 2
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: Pistol
|
||||
|
||||
C2:
|
||||
@@ -295,7 +295,7 @@ C2:
|
||||
Speed: 4
|
||||
RevealsShroud:
|
||||
Range: 2
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: Pistol
|
||||
|
||||
SHOK:
|
||||
@@ -318,7 +318,7 @@ SHOK:
|
||||
Speed: 3
|
||||
RevealsShroud:
|
||||
Range: 4
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: PortaTesla
|
||||
TakeCover:
|
||||
IdleAnimation:
|
||||
|
||||
@@ -63,7 +63,7 @@ V2RL:
|
||||
Speed: 7
|
||||
RevealsShroud:
|
||||
Range: 5
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: SCUD
|
||||
RenderUnitReload:
|
||||
# AutoTarget:
|
||||
@@ -237,7 +237,7 @@ ARTY:
|
||||
Speed: 6
|
||||
RevealsShroud:
|
||||
Range: 5
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: 155mm
|
||||
RenderUnit:
|
||||
Explodes:
|
||||
@@ -356,7 +356,7 @@ APC:
|
||||
Speed: 10
|
||||
RevealsShroud:
|
||||
Range: 5
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: M60mg
|
||||
PrimaryOffset: 0,0,0,-4
|
||||
MuzzleFlash: yes
|
||||
@@ -474,7 +474,7 @@ SS:
|
||||
CloakDelay: 2.0
|
||||
CloakSound: subshow1.aud
|
||||
UncloakSound: subshow1.aud
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: TorpTube
|
||||
PrimaryLocalOffset: -4,0,0,4,0,0
|
||||
FireDelay: 2
|
||||
@@ -516,7 +516,7 @@ MSUB:
|
||||
CloakDelay: 2.0
|
||||
CloakSound: subshow1.aud
|
||||
UncloakSound: subshow1.aud
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: SubMissile
|
||||
FireDelay: 2
|
||||
Selectable:
|
||||
@@ -746,37 +746,37 @@ YAK:
|
||||
ReturnOnIdle:
|
||||
WithMuzzleFlash:
|
||||
|
||||
TRAN:
|
||||
Inherits: ^Plane
|
||||
Buildable:
|
||||
Queue: Plane
|
||||
BuildPaletteOrder: 110
|
||||
Prerequisites: hpad
|
||||
BuiltAt: hpad
|
||||
Owner: allies
|
||||
Valued:
|
||||
Cost: 1200
|
||||
Tooltip:
|
||||
Name: Transport Helicopter
|
||||
Description: Fast Infantry Transport Helicopter.\n Unarmed
|
||||
Health:
|
||||
HP: 90
|
||||
Armor:
|
||||
Type: Light
|
||||
RevealsShroud:
|
||||
Range: 12
|
||||
Helicopter:
|
||||
RearmBuildings: hpad
|
||||
InitialFacing: 0
|
||||
ROT: 5
|
||||
Speed: 12
|
||||
RenderUnitRotor:
|
||||
PrimaryOffset: 0,14,0,-8
|
||||
SecondaryOffset: 0,-14,0,-5
|
||||
WithShadow:
|
||||
Cargo:
|
||||
Types: Infantry
|
||||
Passengers: 5
|
||||
TRAN:
|
||||
Inherits: ^Plane
|
||||
Buildable:
|
||||
Queue: Plane
|
||||
BuildPaletteOrder: 110
|
||||
Prerequisites: hpad
|
||||
BuiltAt: hpad
|
||||
Owner: allies
|
||||
Valued:
|
||||
Cost: 1200
|
||||
Tooltip:
|
||||
Name: Transport Helicopter
|
||||
Description: Fast Infantry Transport Helicopter.\n Unarmed
|
||||
Health:
|
||||
HP: 90
|
||||
Armor:
|
||||
Type: Light
|
||||
RevealsShroud:
|
||||
Range: 12
|
||||
Helicopter:
|
||||
RearmBuildings: hpad
|
||||
InitialFacing: 0
|
||||
ROT: 5
|
||||
Speed: 12
|
||||
RenderUnitRotor:
|
||||
PrimaryOffset: 0,14,0,-8
|
||||
SecondaryOffset: 0,-14,0,-5
|
||||
WithShadow:
|
||||
Cargo:
|
||||
Types: Infantry
|
||||
Passengers: 5
|
||||
IronCurtainable:
|
||||
FallsToEarth:
|
||||
|
||||
@@ -941,43 +941,43 @@ TTNK:
|
||||
Speed: 8
|
||||
RevealsShroud:
|
||||
Range: 7
|
||||
AttackBase:
|
||||
AttackDefault:
|
||||
PrimaryWeapon: TTankZap
|
||||
RenderUnitSpinner:
|
||||
Selectable:
|
||||
Bounds: 28,28,0,0
|
||||
|
||||
FTRK:
|
||||
Inherits: ^Vehicle
|
||||
Buildable:
|
||||
Queue: Vehicle
|
||||
BuildPaletteOrder: 30
|
||||
Prerequisites: weap
|
||||
Owner: soviet
|
||||
Valued:
|
||||
Cost: 600
|
||||
Tooltip:
|
||||
Name: Flak Truck
|
||||
Description: Flak Truck, good for scouting.\n Strong vs Light Vehicles\nand Aircraft, Weak vs Tanks
|
||||
Health:
|
||||
HP: 120
|
||||
Armor:
|
||||
Type: Light
|
||||
Mobile:
|
||||
ROT: 10
|
||||
Speed: 9
|
||||
RevealsShroud:
|
||||
Range: 4
|
||||
Turreted:
|
||||
ROT: 5
|
||||
AttackTurreted:
|
||||
PrimaryWeapon: FLAK-23
|
||||
PrimaryOffset: 0,5,0,-4
|
||||
Recoil: 2
|
||||
RenderUnitTurreted:
|
||||
AutoTarget:
|
||||
Explodes:
|
||||
Weapon: UnitExplodeSmall
|
||||
FTRK:
|
||||
Inherits: ^Vehicle
|
||||
Buildable:
|
||||
Queue: Vehicle
|
||||
BuildPaletteOrder: 30
|
||||
Prerequisites: weap
|
||||
Owner: soviet
|
||||
Valued:
|
||||
Cost: 600
|
||||
Tooltip:
|
||||
Name: Flak Truck
|
||||
Description: Flak Truck, good for scouting.\n Strong vs Light Vehicles\nand Aircraft, Weak vs Tanks
|
||||
Health:
|
||||
HP: 120
|
||||
Armor:
|
||||
Type: Light
|
||||
Mobile:
|
||||
ROT: 10
|
||||
Speed: 9
|
||||
RevealsShroud:
|
||||
Range: 4
|
||||
Turreted:
|
||||
ROT: 5
|
||||
AttackTurreted:
|
||||
PrimaryWeapon: FLAK-23
|
||||
PrimaryOffset: 0,5,0,-4
|
||||
Recoil: 2
|
||||
RenderUnitTurreted:
|
||||
AutoTarget:
|
||||
Explodes:
|
||||
Weapon: UnitExplodeSmall
|
||||
EmptyWeapon: UnitExplodeSmall
|
||||
Selectable:
|
||||
Bounds: 28,28,0,0
|
||||
|
||||
Reference in New Issue
Block a user