Add invisible spice bloom spawn

When real spiceblooms explode, they spawn an invisible
spicebloom.spawnpoint actor, which only 'grows' when the cell is of
GrowthTerrainType. When 'exploding', it then displays the animation of
blowing spice up into the air, and spawns a real spicebloom.

This replicates the original behavior where spice blooms would only grow
on sand cells that had been harvested and free of spice.
This commit is contained in:
reaperrr
2015-11-04 23:34:13 +01:00
parent a175f53ba7
commit c4ca5d6497
4 changed files with 45 additions and 1 deletions

View File

@@ -23,6 +23,9 @@ namespace OpenRA.Mods.D2k.Traits
[Desc("Seeds resources by explosive eruptions after accumulation times.")]
public class SpiceBloomInfo : ITraitInfo, Requires<RenderSpritesInfo>
{
[ActorReference]
public readonly string SpawnActor = "spicebloom.spawnpoint";
[SequenceReference]
public readonly string[] GrowthSequences = { "grow1", "grow2", "grow3" };
@@ -159,7 +162,7 @@ namespace OpenRA.Mods.D2k.Traits
new FactionInit(self.Owner.Faction.InternalName),
new SkipMakeAnimsInit()
};
self.World.CreateActor(self.Info.Name, td);
self.World.CreateActor(info.SpawnActor, td);
})));
}
}