Bugfixes: Oremine, Airfield, Prerequisites
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 =>
|
||||
{
|
||||
|
||||
@@ -35,5 +35,7 @@ BR3:
|
||||
|
||||
MINE:
|
||||
Inherits: ^Building
|
||||
RenderBuilding:
|
||||
Palette: terrain
|
||||
SeedsOre:
|
||||
-Selectable:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,7 +3,7 @@ MCV:
|
||||
Buildable:
|
||||
Icon: mcvicnh
|
||||
TechLevel: 7
|
||||
Prerequisites: eye
|
||||
Prerequisites: weap, @Superweapon
|
||||
Owner: allies,soviet
|
||||
Cost: 5000
|
||||
Description: Mobile Construction Vehicle
|
||||
|
||||
Reference in New Issue
Block a user