proc.nofreeactor was causing harv to not unload properly. Just spawn a normal proc after we've changed the owner of the Allied base.
This commit is contained in:
@@ -594,25 +594,15 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
foreach (var actor in actors.Where(a => a.Value.Owner == allies))
|
foreach (var actor in actors.Where(a => a.Value.Owner == allies))
|
||||||
{
|
{
|
||||||
actor.Value.ChangeOwner(allies2);
|
actor.Value.ChangeOwner(allies2);
|
||||||
if (actor.Value.Info.Name == "proc.nofreeactor")
|
|
||||||
{
|
|
||||||
CreateAlliedHarvester(actor.Value.Location);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
world.CreateActor("proc", new TypeDictionary
|
||||||
|
{
|
||||||
|
new LocationInit(actors["Allies2ProcPoint"].Location),
|
||||||
|
new OwnerInit(allies2)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
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()
|
void PlayMusic()
|
||||||
{
|
{
|
||||||
if (!Rules.InstalledMusic.Any())
|
if (!Rules.InstalledMusic.Any())
|
||||||
|
|||||||
@@ -1481,7 +1481,7 @@ Actors:
|
|||||||
Actor290: apwr
|
Actor290: apwr
|
||||||
Location: 52,42
|
Location: 52,42
|
||||||
Owner: Soviets
|
Owner: Soviets
|
||||||
Actor924: proc.nofreeactor
|
Allies2ProcPoint: waypoint
|
||||||
Location: 25,95
|
Location: 25,95
|
||||||
Owner: Allies
|
Owner: Allies
|
||||||
Actor455: fenc
|
Actor455: fenc
|
||||||
@@ -2869,14 +2869,6 @@ Rules:
|
|||||||
Allies02Script:
|
Allies02Script:
|
||||||
MissionObjectivesPanel:
|
MissionObjectivesPanel:
|
||||||
ObjectivesPanel: MISSION_OBJECTIVES
|
ObjectivesPanel: MISSION_OBJECTIVES
|
||||||
PROC.NoFreeActor:
|
|
||||||
Inherits: PROC
|
|
||||||
-FreeActor:
|
|
||||||
-Buildable:
|
|
||||||
RenderBuilding:
|
|
||||||
Image: PROC
|
|
||||||
ProvidesCustomPrerequisite:
|
|
||||||
Prerequisite: proc
|
|
||||||
TRAN.Husk1:
|
TRAN.Husk1:
|
||||||
Burns:
|
Burns:
|
||||||
Damage: 0
|
Damage: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user