Remove SpawnActor from SpiceBloom.
This commit is contained in:
@@ -801,6 +801,23 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
if (engineVersion < 20170205)
|
||||
{
|
||||
if (node.Key.StartsWith("SpiceBloom", StringComparison.Ordinal))
|
||||
{
|
||||
var spawnActor = node.Value.Nodes.FirstOrDefault(n => n.Key == "SpawnActor");
|
||||
if (spawnActor != null)
|
||||
{
|
||||
node.Value.Nodes.Remove(spawnActor);
|
||||
spawnActor.Key = "Actor";
|
||||
}
|
||||
else
|
||||
spawnActor = new MiniYamlNode("Actor", new MiniYaml("spicebloom.spawnpoint"));
|
||||
|
||||
addNodes.Add(new MiniYamlNode("SpawnActorOnDeath", new MiniYaml("", new List<MiniYamlNode>() { spawnActor })));
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,6 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
[Desc("Seeds resources by explosive eruptions after accumulation times.")]
|
||||
public class SpiceBloomInfo : ITraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>
|
||||
{
|
||||
[ActorReference]
|
||||
public readonly string SpawnActor = "spicebloom.spawnpoint";
|
||||
|
||||
[SequenceReference]
|
||||
public readonly string[] GrowthSequences = { "grow1", "grow2", "grow3" };
|
||||
|
||||
@@ -157,18 +154,6 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
{
|
||||
if (!string.IsNullOrEmpty(info.Weapon))
|
||||
SeedResources(self);
|
||||
|
||||
var td = new TypeDictionary
|
||||
{
|
||||
new ParentActorInit(self),
|
||||
new LocationInit(self.Location),
|
||||
new CenterPositionInit(self.CenterPosition),
|
||||
new OwnerInit(self.Owner),
|
||||
new FactionInit(self.Owner.Faction.InternalName),
|
||||
new SkipMakeAnimsInit()
|
||||
};
|
||||
|
||||
self.World.AddFrameEndTask(w => w.CreateActor(info.SpawnActor, td));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,8 @@ spicebloom:
|
||||
RequiresForceFire: true
|
||||
Armor:
|
||||
Type: none
|
||||
SpawnActorOnDeath:
|
||||
Actor: spicebloom.spawnpoint
|
||||
|
||||
sandworm:
|
||||
Inherits@1: ^SpriteActor
|
||||
|
||||
Reference in New Issue
Block a user