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 (bridge.IsDead() && attackingBridge)
|
||||||
{
|
{
|
||||||
if (!bridgeTank.IsDead())
|
if (!bridgeTank.IsDead())
|
||||||
{
|
|
||||||
bridgeTank.CancelActivity();
|
bridgeTank.CancelActivity();
|
||||||
}
|
|
||||||
attackingBridge = false;
|
attackingBridge = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -232,6 +230,9 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
objectives[DestroyID].Status = ObjectiveStatus.InProgress;
|
objectives[DestroyID].Status = ObjectiveStatus.InProgress;
|
||||||
OnObjectivesUpdated(true);
|
OnObjectivesUpdated(true);
|
||||||
frameInfiltrated = world.FrameNumber;
|
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) }));
|
lst.Trait<Cargo>().Load(lst, world.CreateActor(false, "mcv", new TypeDictionary { new OwnerInit(allies1) }));
|
||||||
if (allies1 != allies2)
|
if (allies1 != allies2)
|
||||||
{
|
|
||||||
lst.Trait<Cargo>().Load(lst, world.CreateActor(false, "mcv", new TypeDictionary { new OwnerInit(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 Move.Move(reinforcementsUnloadPoint.Location));
|
||||||
lst.QueueActivity(new Wait(10));
|
lst.QueueActivity(new Wait(10));
|
||||||
|
|
||||||
lst.QueueActivity(new CallFunc(() =>
|
lst.QueueActivity(new CallFunc(() =>
|
||||||
{
|
{
|
||||||
allies1.PlayerActor.Trait<PlayerResources>().GiveCash(allies1 == allies2 ? 5000 : 2500);
|
allies1.PlayerActor.Trait<PlayerResources>().GiveCash(allies1 == allies2 ? 5000 : 2500);
|
||||||
if (allies1 != allies2)
|
if (allies1 != allies2)
|
||||||
{
|
|
||||||
allies2.PlayerActor.Trait<PlayerResources>().GiveCash(2500);
|
allies2.PlayerActor.Trait<PlayerResources>().GiveCash(2500);
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
lst.QueueActivity(new UnloadCargo(true));
|
lst.QueueActivity(new UnloadCargo(true));
|
||||||
lst.QueueActivity(new Wait(10));
|
lst.QueueActivity(new Wait(10));
|
||||||
lst.QueueActivity(new Move.Move(reinforcementsEntryPoint.Location));
|
lst.QueueActivity(new Move.Move(reinforcementsEntryPoint.Location));
|
||||||
@@ -516,7 +515,6 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Allies04TrivialBuildingInfo : TraitInfo<Allies04TrivialBuilding> { }
|
class Allies04TrivialBuildingInfo : TraitInfo<Allies04TrivialBuilding> { }
|
||||||
|
|
||||||
class Allies04TrivialBuilding { }
|
class Allies04TrivialBuilding { }
|
||||||
|
|
||||||
class Allies04MaintainBuildingInfo : TraitInfo<Allies04MaintainBuilding>
|
class Allies04MaintainBuildingInfo : TraitInfo<Allies04MaintainBuilding>
|
||||||
@@ -537,4 +535,12 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
self.Trait<RepairableBuilding>().RepairBuilding(self, self.Owner);
|
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
|
Actor83: ftur
|
||||||
Location: 67,34
|
Location: 67,34
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor73: spen
|
Actor73: spen.noinfiltrate
|
||||||
Location: 31,82
|
Location: 31,82
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor37: dome
|
Actor37: dome.noinfiltrate
|
||||||
Location: 44,57
|
Location: 44,57
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor65: sam
|
Actor65: sam
|
||||||
Location: 50,37
|
Location: 50,37
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
TurretFacing: 192
|
TurretFacing: 192
|
||||||
Actor70: spen
|
Actor70: spen.noinfiltrate
|
||||||
Location: 39,71
|
Location: 39,71
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor71: spen
|
Actor71: spen.noinfiltrate
|
||||||
Location: 25,68
|
Location: 25,68
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor64: sam
|
Actor64: sam
|
||||||
Location: 28,43
|
Location: 28,43
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
TurretFacing: 48
|
TurretFacing: 48
|
||||||
Actor72: spen
|
Actor72: spen.noinfiltrate
|
||||||
Location: 23,76
|
Location: 23,76
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor88: tsla
|
Actor88: tsla
|
||||||
@@ -464,13 +464,13 @@ Actors:
|
|||||||
Actor130: apwr
|
Actor130: apwr
|
||||||
Location: 101,16
|
Location: 101,16
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor134: proc
|
Actor134: proc.noinfiltrate
|
||||||
Location: 106,30
|
Location: 106,30
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor135: fix
|
Actor135: fix
|
||||||
Location: 102,25
|
Location: 102,25
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor136: dome
|
Actor136: dome.noinfiltrate
|
||||||
Location: 107,25
|
Location: 107,25
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
HijackFactory: weap
|
HijackFactory: weap
|
||||||
@@ -1320,7 +1320,7 @@ Actors:
|
|||||||
Actor414: sbag
|
Actor414: sbag
|
||||||
Location: 74,60
|
Location: 74,60
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor412: proc
|
Actor412: proc.noinfiltrate
|
||||||
Location: 84,68
|
Location: 84,68
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor472: brl3
|
Actor472: brl3
|
||||||
@@ -1748,6 +1748,44 @@ Rules:
|
|||||||
Player: Soviets
|
Player: Soviets
|
||||||
MISS:
|
MISS:
|
||||||
AutoTargetIgnore:
|
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:
|
LST.Unselectable:
|
||||||
Inherits: ^Ship
|
Inherits: ^Ship
|
||||||
Valued:
|
Valued:
|
||||||
|
|||||||
Reference in New Issue
Block a user