CrateSpawner - combine DeliverByAircraft and DeliveryAircraft properties

This commit is contained in:
Curtis Shmyr
2013-12-23 20:38:13 -07:00
parent a65358f191
commit fe0c34c8ef

View File

@@ -32,10 +32,8 @@ namespace OpenRA.Mods.RA
public readonly string[] ValidWater = { "Water" };
[Desc("Chance of generating a water crate instead of a land crate")]
public readonly float WaterChance = .2f;
[Desc("Airdrop crates via DeliveryAircraft: or instantly spawn them on the ground")]
public readonly bool DeliverByAircraft = false;
[Desc("If DeliverByAircraft: yes, this actor will deliver crates"), ActorReference]
public readonly string DeliveryAircraft = "badr";
[Desc("If a DeliveryAircraft: is specified, then this actor will deliver crates"), ActorReference]
public readonly string DeliveryAircraft = null;
[Desc("Crate actors to drop"), ActorReference]
public readonly string[] CrateActors = { "crate" };
[Desc("Chance of each crate actor spawning")]
@@ -90,7 +88,7 @@ namespace OpenRA.Mods.RA
self.World.AddFrameEndTask(w =>
{
if (Info.DeliverByAircraft)
if (Info.DeliveryAircraft != null)
{
var crate = w.CreateActor(false, crateActor, new TypeDictionary { new OwnerInit(w.WorldActor.Owner) });
crates.Add(crate);