sniper can go into pillbox and garrision church

This commit is contained in:
Matthias Mailänder
2012-07-27 23:28:00 +02:00
committed by Chris Forbes
parent 02f28f54c7
commit 45fbecbcd0
5 changed files with 83 additions and 10 deletions

View File

@@ -29,10 +29,12 @@ namespace OpenRA.Mods.RA
public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner)
{
self.QueueActivity(new Transform(self, Info.IntoActor) {
ForceHealthPercentage = Info.ForceHealthPercentage,
Facing = self.Trait<IFacing>().Facing
});
var facing = self.TraitOrDefault<IFacing>();
var transform = new Transform(self, Info.IntoActor) { ForceHealthPercentage = Info.ForceHealthPercentage };
if (facing != null) transform.Facing = facing.Facing;
transform.SkipMakeAnims = true;
self.CancelActivity();
self.QueueActivity(transform);
}
}
}

View File

@@ -21,6 +21,7 @@ namespace OpenRA.Mods.RA
[ActorReference] public readonly string OnEnter = null;
[ActorReference] public readonly string OnExit = null;
public readonly bool SkipMakeAnims = false;
public readonly bool BecomeNeutral = false;
public object Create(ActorInitializer init) { return new TransformOnPassenger(this); }
}
@@ -43,6 +44,7 @@ namespace OpenRA.Mods.RA
self.CancelActivity();
self.QueueActivity(transform);
if (info.BecomeNeutral) self.ChangeOwner(self.World.WorldActor.Owner);
});
}
}

View File

@@ -28,6 +28,37 @@ V01:
Dimensions: 2,2
Tooltip:
Name: Church
RevealsShroud:
Range: 10
TransformOnCapture:
IntoActor: v01.sniper
Capturable:
Type: civilianbuilding
CaptureCompleteTime: 0
V01.SNIPER:
Inherits: V01
RenderBuilding:
Image: V01
RenderRangeCircle:
AutoTarget:
Turreted:
ROT: 255
AttackTurreted:
PrimaryWeapon: Sniper
PrimaryLocalOffset: 0,-11,0,0,0
Cargo:
InitialUnits: sniper
Types: Infantry
MaxWeight: 1
PipCount: 1
TransformOnPassenger@Sniper:
PassengerTypes: sniper
OnExit: v01
SkipMakeAnims: true
BecomeNeutral: true
-Capturable:
V02:
Inherits: ^CivBuilding
Building:

View File

@@ -411,6 +411,7 @@ SNIPER:
RevealsShroud:
Range: 6
-AutoTarget:
-AttackMove:
AttackFrontal:
PrimaryWeapon: Sniper
TakeCover:
@@ -421,4 +422,7 @@ SNIPER:
InitialDelay: 250
CloakDelay: 120
CloakSound: appear1.aud
UncloakSound: appear1.aud
UncloakSound: appear1.aud
Captures:
CaptureTypes: civilianbuilding
AllowAllies: true

View File

@@ -409,12 +409,17 @@ PBOX:
TransformOnPassenger@e7:
PassengerTypes: e7
OnEnter: pbox.e7
OnExit: pbox
OnExit: pbox
SkipMakeAnims: true
TransformOnPassenger@SHOK:
PassengerTypes: shok
OnEnter: pbox.shok
OnExit: pbox
OnExit: pbox
SkipMakeAnims: true
TransformOnPassenger@Sniper:
PassengerTypes: sniper
OnEnter: pbox.sniper
OnExit: pbox
SkipMakeAnims: true
PBOX.E1:
@@ -495,6 +500,18 @@ PBOX.SHOK:
PrimaryWeapon: PortaTesla
PrimaryLocalOffset: 0,-11,0,0,0
PBOX.SNIPER:
Inherits: PBOX
Tooltip:
Name: Pillbox (Sniper)
RenderBuilding:
Image: PBOX
RenderRangeCircle:
AutoTarget:
AttackTurreted:
PrimaryWeapon: Sniper
PrimaryLocalOffset: 0,-11,0,0,0
HBOX:
Inherits: ^Building
Tooltip:
@@ -548,12 +565,17 @@ HBOX:
TransformOnPassenger@e7:
PassengerTypes: e7
OnEnter: HBOX.e7
OnExit: HBOX
OnExit: HBOX
SkipMakeAnims: true
TransformOnPassenger@SHOK:
PassengerTypes: shok
OnEnter: HBOX.shok
OnExit: HBOX
OnExit: HBOX
SkipMakeAnims: true
TransformOnPassenger@Sniper:
PassengerTypes: sniper
OnEnter: HBOX.sniper
OnExit: HBOX
SkipMakeAnims: true
HBOX.E1:
@@ -632,7 +654,19 @@ HBOX.SHOK:
AutoTarget:
AttackTurreted:
PrimaryWeapon: PortaTesla
PrimaryLocalOffset: 0,-11,0,0,0
PrimaryLocalOffset: 0,-11,0,0,0
HBOX.SNIPER:
Inherits: HBOX
Tooltip:
Name: Camo Pillbox (Sniper)
RenderBuilding:
Image: HBOX
RenderRangeCircle:
AutoTarget:
AttackTurreted:
PrimaryWeapon: Sniper
PrimaryLocalOffset: 0,-11,0,0,0
GUN:
Inherits: ^Building