From fe0c34c8efb3e3e6699a9a8d9718b5fb901245d0 Mon Sep 17 00:00:00 2001 From: Curtis Shmyr Date: Mon, 23 Dec 2013 20:38:13 -0700 Subject: [PATCH] CrateSpawner - combine DeliverByAircraft and DeliveryAircraft properties --- OpenRA.Mods.RA/CrateSpawner.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.RA/CrateSpawner.cs b/OpenRA.Mods.RA/CrateSpawner.cs index 7652b6cf1b..be852ebc98 100644 --- a/OpenRA.Mods.RA/CrateSpawner.cs +++ b/OpenRA.Mods.RA/CrateSpawner.cs @@ -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);