Allies 04: Hack in a fix to stop player hero spies infiltrating buildings they shouldn't
This commit is contained in:
@@ -139,9 +139,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
if (bridge.IsDead() && attackingBridge)
|
||||
{
|
||||
if (!bridgeTank.IsDead())
|
||||
{
|
||||
bridgeTank.CancelActivity();
|
||||
}
|
||||
attackingBridge = false;
|
||||
}
|
||||
}
|
||||
@@ -232,6 +230,9 @@ namespace OpenRA.Mods.RA.Missions
|
||||
objectives[DestroyID].Status = ObjectiveStatus.InProgress;
|
||||
OnObjectivesUpdated(true);
|
||||
frameInfiltrated = world.FrameNumber;
|
||||
|
||||
foreach (var actor in world.Actors.Where(a => !a.IsDead() && a.HasTrait<Allies04TransformOnLabInfiltrate>()))
|
||||
actor.QueueActivity(false, new Transform(actor, actor.Info.Traits.Get<Allies04TransformOnLabInfiltrateInfo>().ToActor));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,20 +245,18 @@ namespace OpenRA.Mods.RA.Missions
|
||||
});
|
||||
lst.Trait<Cargo>().Load(lst, world.CreateActor(false, "mcv", new TypeDictionary { new OwnerInit(allies1) }));
|
||||
if (allies1 != allies2)
|
||||
{
|
||||
lst.Trait<Cargo>().Load(lst, world.CreateActor(false, "mcv", new TypeDictionary { new OwnerInit(allies2) }));
|
||||
}
|
||||
|
||||
lst.QueueActivity(new Move.Move(reinforcementsUnloadPoint.Location));
|
||||
lst.QueueActivity(new Wait(10));
|
||||
|
||||
lst.QueueActivity(new CallFunc(() =>
|
||||
{
|
||||
allies1.PlayerActor.Trait<PlayerResources>().GiveCash(allies1 == allies2 ? 5000 : 2500);
|
||||
if (allies1 != allies2)
|
||||
{
|
||||
allies2.PlayerActor.Trait<PlayerResources>().GiveCash(2500);
|
||||
}
|
||||
}));
|
||||
|
||||
lst.QueueActivity(new UnloadCargo(true));
|
||||
lst.QueueActivity(new Wait(10));
|
||||
lst.QueueActivity(new Move.Move(reinforcementsEntryPoint.Location));
|
||||
@@ -516,7 +515,6 @@ namespace OpenRA.Mods.RA.Missions
|
||||
}
|
||||
|
||||
class Allies04TrivialBuildingInfo : TraitInfo<Allies04TrivialBuilding> { }
|
||||
|
||||
class Allies04TrivialBuilding { }
|
||||
|
||||
class Allies04MaintainBuildingInfo : TraitInfo<Allies04MaintainBuilding>
|
||||
@@ -537,4 +535,12 @@ namespace OpenRA.Mods.RA.Missions
|
||||
self.Trait<RepairableBuilding>().RepairBuilding(self, self.Owner);
|
||||
}
|
||||
}
|
||||
|
||||
class Allies04TransformOnLabInfiltrateInfo : TraitInfo<Allies04TransformOnLabInfiltrate>
|
||||
{
|
||||
[ActorReference]
|
||||
public readonly string ToActor = null;
|
||||
}
|
||||
|
||||
class Allies04TransformOnLabInfiltrate { }
|
||||
}
|
||||
|
||||
@@ -300,27 +300,27 @@ Actors:
|
||||
Actor83: ftur
|
||||
Location: 67,34
|
||||
Owner: Soviets
|
||||
Actor73: spen
|
||||
Actor73: spen.noinfiltrate
|
||||
Location: 31,82
|
||||
Owner: Soviets
|
||||
Actor37: dome
|
||||
Actor37: dome.noinfiltrate
|
||||
Location: 44,57
|
||||
Owner: Soviets
|
||||
Actor65: sam
|
||||
Location: 50,37
|
||||
Owner: Soviets
|
||||
TurretFacing: 192
|
||||
Actor70: spen
|
||||
Actor70: spen.noinfiltrate
|
||||
Location: 39,71
|
||||
Owner: Soviets
|
||||
Actor71: spen
|
||||
Actor71: spen.noinfiltrate
|
||||
Location: 25,68
|
||||
Owner: Soviets
|
||||
Actor64: sam
|
||||
Location: 28,43
|
||||
Owner: Soviets
|
||||
TurretFacing: 48
|
||||
Actor72: spen
|
||||
Actor72: spen.noinfiltrate
|
||||
Location: 23,76
|
||||
Owner: Soviets
|
||||
Actor88: tsla
|
||||
@@ -464,13 +464,13 @@ Actors:
|
||||
Actor130: apwr
|
||||
Location: 101,16
|
||||
Owner: Soviets
|
||||
Actor134: proc
|
||||
Actor134: proc.noinfiltrate
|
||||
Location: 106,30
|
||||
Owner: Soviets
|
||||
Actor135: fix
|
||||
Location: 102,25
|
||||
Owner: Soviets
|
||||
Actor136: dome
|
||||
Actor136: dome.noinfiltrate
|
||||
Location: 107,25
|
||||
Owner: Soviets
|
||||
HijackFactory: weap
|
||||
@@ -1320,7 +1320,7 @@ Actors:
|
||||
Actor414: sbag
|
||||
Location: 74,60
|
||||
Owner: Soviets
|
||||
Actor412: proc
|
||||
Actor412: proc.noinfiltrate
|
||||
Location: 84,68
|
||||
Owner: Soviets
|
||||
Actor472: brl3
|
||||
@@ -1748,6 +1748,44 @@ Rules:
|
||||
Player: Soviets
|
||||
MISS:
|
||||
AutoTargetIgnore:
|
||||
PROC.NoInfiltrate:
|
||||
Inherits: PROC
|
||||
-Buildable:
|
||||
RenderBuilding:
|
||||
Image: PROC
|
||||
Tooltip:
|
||||
Icon: procicon
|
||||
-InfiltrateForCash:
|
||||
Allies04TransformOnLabInfiltrate:
|
||||
ToActor: PROC.NoFreeActor
|
||||
PROC.NoFreeActor:
|
||||
Inherits: PROC
|
||||
-Buildable:
|
||||
RenderBuilding:
|
||||
Image: PROC
|
||||
Tooltip:
|
||||
Icon: procicon
|
||||
-FreeActor:
|
||||
DOME.NoInfiltrate:
|
||||
Inherits: DOME
|
||||
-Buildable:
|
||||
RenderBuilding:
|
||||
Image: DOME
|
||||
Tooltip:
|
||||
Icon: domeicon
|
||||
-InfiltrateForExploration:
|
||||
Allies04TransformOnLabInfiltrate:
|
||||
ToActor: DOME
|
||||
SPEN.NoInfiltrate:
|
||||
Inherits: SPEN
|
||||
-Buildable:
|
||||
RenderBuilding:
|
||||
Image: SPEN
|
||||
Tooltip:
|
||||
Icon: spenicon
|
||||
-InfiltrateForSupportPower:
|
||||
Allies04TransformOnLabInfiltrate:
|
||||
ToActor: SPEN
|
||||
LST.Unselectable:
|
||||
Inherits: ^Ship
|
||||
Valued:
|
||||
|
||||
Reference in New Issue
Block a user