separate spy disguise and infiltrate

- add thief to classic-ra & monster tank madness
- remove crude workarounds for allies04
This commit is contained in:
Matthias Mailänder
2013-03-09 13:13:21 +01:00
parent ca6cc3fbe1
commit 49cfa21ddb
15 changed files with 190 additions and 80 deletions

View File

@@ -410,7 +410,7 @@ namespace OpenRA.Mods.RA.Missions
};
lab = actors["Lab"];
lab.AddTrait(new InfiltrateAction(OnLabInfiltrated));
lab.AddTrait(new InfiltrateForMissionObjective(OnLabInfiltrated));
lab.AddTrait(new TransformedAction(self => lab = self));
reinforcementsEntryPoint = actors["ReinforcementsEntryPoint"];
@@ -456,13 +456,17 @@ namespace OpenRA.Mods.RA.Missions
public object Create(ActorInitializer init) { return new Allies04Hijackable(init.self); }
}
class Allies04Hijackable : IAcceptSpy, INotifyPassengerExited
class Allies04Hijackable : IAcceptInfiltrator, INotifyPassengerExited
{
public Player OldOwner;
void OnTruckHijacked(Actor spy) { }
public Allies04Hijackable(Actor self)
{
OldOwner = self.Owner;
self.AddTrait(new InfiltrateForMissionObjective(OnTruckHijacked));
}
public void OnInfiltrate(Actor self, Actor spy)

View File

@@ -230,11 +230,11 @@ namespace OpenRA.Mods.RA.Missions
}
}
class InfiltrateAction : IAcceptSpy
class InfiltrateForMissionObjective : IAcceptInfiltrator
{
Action<Actor> a;
public InfiltrateAction(Action<Actor> a)
public InfiltrateForMissionObjective(Action<Actor> a)
{
this.a = a;
}

View File

@@ -329,7 +329,7 @@ namespace OpenRA.Mods.RA.Missions
world.CreateActor("camera", greece, provingGroundsCameraPoint.Location, null);
superTankDome = actors["SuperTankDome"];
superTankDome.AddTrait(new InfiltrateAction(OnSuperTankDomeInfiltrated));
superTankDome.AddTrait(new InfiltrateForMissionObjective(OnSuperTankDomeInfiltrated));
superTankDome.AddTrait(new TransformedAction(self => superTankDome = self));
Game.MoveViewport(startEntryPoint.Location.ToFloat2());