diff --git a/OpenRa.Game/Traits/Activities/Land.cs b/OpenRa.Game/Traits/Activities/Land.cs index fc71f10e9f..1118988003 100644 --- a/OpenRa.Game/Traits/Activities/Land.cs +++ b/OpenRa.Game/Traits/Activities/Land.cs @@ -9,13 +9,21 @@ namespace OpenRa.Traits.Activities { readonly float2 Pos; bool isCanceled; - + Actor Structure; + public Land(float2 pos) { Pos = pos; } - + public Land(Actor structure) { Structure = structure; Pos = Structure.CenterLocation; } + public IActivity NextActivity { get; set; } public IActivity Tick(Actor self) { + if (Structure != null && Structure.IsDead) + { + Structure = null; + isCanceled = true; + } + if (isCanceled) return NextActivity; var d = Pos - self.CenterLocation; diff --git a/OpenRa.Mods.Cnc/ProductionAirdrop.cs b/OpenRa.Mods.Cnc/ProductionAirdrop.cs index aa1014ab25..e3fed5c7b3 100644 --- a/OpenRa.Mods.Cnc/ProductionAirdrop.cs +++ b/OpenRa.Mods.Cnc/ProductionAirdrop.cs @@ -21,8 +21,8 @@ namespace OpenRa.Mods.Cnc var location = CreationLocation(self, producee); var owner = self.Owner; - // Start at the edge of the map, to the right of the airfield - var startPos = new int2(owner.World.Map.XOffset + owner.World.Map.Width, self.Location.Y); + // Start beyond the edge of the map, to give a finite delay, and ability to land when AFLD is on map edge + var startPos = new int2(owner.World.Map.XOffset + owner.World.Map.Width+15, self.Location.Y); var endPos = new int2(owner.World.Map.XOffset, self.Location.Y); var unloadOffset = new int2(1,1); var exitOffset = new int2(3,1); @@ -37,9 +37,13 @@ namespace OpenRa.Mods.Cnc cargo.Load(a, newUnit); a.CancelActivity(); - a.QueueActivity(new Land(self.CenterLocation)); + + a.QueueActivity(new Land(self)); a.QueueActivity(new CallFunc(() => { + if (self.IsDead) + return; + var actor = cargo.Unload(self); self.World.AddFrameEndTask(ww => { diff --git a/mods/cnc/compat.yaml b/mods/cnc/compat.yaml index 06e5fa77b7..010c119e6d 100644 --- a/mods/cnc/compat.yaml +++ b/mods/cnc/compat.yaml @@ -35,5 +35,7 @@ BR3: MINE: Inherits: ^Building + RenderBuilding: + Palette: terrain SeedsOre: -Selectable: diff --git a/mods/cnc/structures.yaml b/mods/cnc/structures.yaml index ae54c823de..dee96cbcc5 100644 --- a/mods/cnc/structures.yaml +++ b/mods/cnc/structures.yaml @@ -92,6 +92,7 @@ PYLE: Cost: 300 Description: Barracks LongDesc: Trains infantry + AlternateName: @Barracks Building: Power: -20 Footprint: xx xx @@ -116,6 +117,7 @@ HAND: Cost: 300 Description: Hand of Nod LongDesc: Trains infantry + AlternateName: @Barracks Building: Power: -20 Footprint: __ xx xx @@ -252,7 +254,7 @@ HPAD: Buildable: Icon:hpadicnh TechLevel: 6 - Prerequisites: pyle + Prerequisites: @Barracks Owner: allies,soviet Cost: 1500 Description: Helipad @@ -285,6 +287,7 @@ EYE: Cost: 2800 Description: Advanced Communications Center LongDesc: Provides access to the Ion Cannon.\n Requires power to operate. + AlternateName: @Superweapon Building: Power: -200 Footprint: __ xx @@ -309,6 +312,7 @@ TMPL: Cost: 3000 Description: Temple of Nod LongDesc: Place of worship and secret missile silo.\n Requires power to operate. + AlternateName: @Superweapon Building: Power: -150 Footprint: __ xx diff --git a/mods/cnc/vehicles.yaml b/mods/cnc/vehicles.yaml index 1ee0e45db0..9a650b22a9 100644 --- a/mods/cnc/vehicles.yaml +++ b/mods/cnc/vehicles.yaml @@ -3,7 +3,7 @@ MCV: Buildable: Icon: mcvicnh TechLevel: 7 - Prerequisites: eye + Prerequisites: weap, @Superweapon Owner: allies,soviet Cost: 5000 Description: Mobile Construction Vehicle