Allies 02 SP mode bug fixes
This commit is contained in:
@@ -83,7 +83,6 @@ namespace OpenRA.Mods.RA.Missions
|
||||
Actor yakEntryPoint;
|
||||
Actor yakAttackPoint;
|
||||
Actor yak;
|
||||
Actor procPoint;
|
||||
|
||||
Actor einsteinChinook;
|
||||
|
||||
@@ -282,7 +281,8 @@ namespace OpenRA.Mods.RA.Missions
|
||||
}
|
||||
world.AddFrameEndTask(w =>
|
||||
{
|
||||
if (!world.FindAliveCombatantActorsInCircle(allies2BasePoint.CenterLocation, 20).Any(a => a.HasTrait<Building>() && !a.HasTrait<Wall>() && a.Owner == allies2))
|
||||
if (!world.FindAliveCombatantActorsInCircle(allies2BasePoint.CenterLocation, 20)
|
||||
.Any(a => a.HasTrait<Building>() && !a.HasTrait<Wall>() && (a.Owner == allies || a.Owner == allies2)))
|
||||
{
|
||||
objectives[MaintainPresenceID].Status = ObjectiveStatus.Failed;
|
||||
OnObjectivesUpdated(true);
|
||||
@@ -569,16 +569,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
sovietTownAttackPoint2 = actors["SovietTownAttackPoint2"];
|
||||
yakEntryPoint = actors["YakEntryPoint"];
|
||||
yakAttackPoint = actors["YakAttackPoint"];
|
||||
procPoint = actors["ProcPoint"];
|
||||
foreach (var actor in world.Actors.Where(a => a.Owner == allies).OrderBy(a => a.HasTrait<PowerManager>()))
|
||||
{
|
||||
actor.ChangeOwner(allies2);
|
||||
}
|
||||
world.CreateActor(true, "proc", new TypeDictionary
|
||||
{
|
||||
new OwnerInit(allies2),
|
||||
new LocationInit(procPoint.Location)
|
||||
});
|
||||
SetupAlliedBase(actors);
|
||||
var shroud = w.WorldActor.Trait<Shroud>();
|
||||
shroud.Explore(w, sam1.Location, 2);
|
||||
shroud.Explore(w, sam2.Location, 2);
|
||||
@@ -596,6 +587,32 @@ namespace OpenRA.Mods.RA.Missions
|
||||
Game.ConnectionStateChanged += StopMusic;
|
||||
}
|
||||
|
||||
void SetupAlliedBase(Dictionary<string, Actor> actors)
|
||||
{
|
||||
world.AddFrameEndTask(w =>
|
||||
{
|
||||
foreach (var actor in actors.Where(a => a.Value.Owner == allies))
|
||||
{
|
||||
actor.Value.ChangeOwner(allies2);
|
||||
if (actor.Value.Info.Name == "proc.nofreeactor")
|
||||
{
|
||||
CreateAlliedHarvester(actor.Value.Location);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void CreateAlliedHarvester(CPos location)
|
||||
{
|
||||
var actor = world.CreateActor("harv", new TypeDictionary
|
||||
{
|
||||
new LocationInit(location + new CVec(1, 2)),
|
||||
new OwnerInit(allies2),
|
||||
new FacingInit(64)
|
||||
});
|
||||
actor.QueueActivity(new FindResources());
|
||||
}
|
||||
|
||||
void PlayMusic()
|
||||
{
|
||||
if (!Rules.InstalledMusic.Any())
|
||||
|
||||
@@ -1481,9 +1481,9 @@ Actors:
|
||||
Actor290: apwr
|
||||
Location: 52,42
|
||||
Owner: Soviets
|
||||
ProcPoint: waypoint
|
||||
Actor924: proc.nofreeactor
|
||||
Location: 25,95
|
||||
Owner: Neutral
|
||||
Owner: Allies
|
||||
Actor455: fenc
|
||||
Location: 31,93
|
||||
Owner: Allies
|
||||
@@ -1855,15 +1855,6 @@ Actors:
|
||||
Actor340: e1
|
||||
Location: 77,58
|
||||
Owner: Soviets
|
||||
Actor630: 3tnk
|
||||
Location: 35,65
|
||||
Owner: Soviets
|
||||
Actor633: 3tnk
|
||||
Location: 36,66
|
||||
Owner: Soviets
|
||||
Actor634: 3tnk
|
||||
Location: 37,65
|
||||
Owner: Soviets
|
||||
Actor55: wood
|
||||
Location: 79,94
|
||||
Owner: Neutral
|
||||
@@ -2878,6 +2869,14 @@ Rules:
|
||||
Allies02Script:
|
||||
MissionObjectivesPanel:
|
||||
ObjectivesPanel: MISSION_OBJECTIVES
|
||||
PROC.NoFreeActor:
|
||||
Inherits: PROC
|
||||
-FreeActor:
|
||||
-Buildable:
|
||||
RenderBuilding:
|
||||
Image: PROC
|
||||
ProvidesCustomPrerequisite:
|
||||
Prerequisite: proc
|
||||
TRAN.Husk1:
|
||||
Burns:
|
||||
Damage: 0
|
||||
|
||||
Reference in New Issue
Block a user