Bugfixes: Oremine, Airfield, Prerequisites

This commit is contained in:
Paul Chote
2010-02-06 15:17:38 +13:00
parent b3a0ff0e81
commit 6af9bf4d32
5 changed files with 25 additions and 7 deletions

View File

@@ -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;

View File

@@ -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 =>
{

View File

@@ -35,5 +35,7 @@ BR3:
MINE:
Inherits: ^Building
RenderBuilding:
Palette: terrain
SeedsOre:
-Selectable:

View File

@@ -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

View File

@@ -3,7 +3,7 @@ MCV:
Buildable:
Icon: mcvicnh
TechLevel: 7
Prerequisites: eye
Prerequisites: weap, @Superweapon
Owner: allies,soviet
Cost: 5000
Description: Mobile Construction Vehicle