Nod Airfield behavior (fly units from offscreen)
This commit is contained in:
@@ -8,7 +8,8 @@ namespace OpenRa.Traits.Activities
|
||||
bool isCanceled;
|
||||
|
||||
public Fly(float2 pos) { Pos = pos; }
|
||||
|
||||
public Fly(int2 pos) { Pos = Util.CenterOfCell(pos); }
|
||||
|
||||
public IActivity NextActivity { get; set; }
|
||||
|
||||
const int CruiseAltitude = 20;
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
|
||||
namespace OpenRa.Traits.Activities
|
||||
{
|
||||
class Land : IActivity
|
||||
public class Land : IActivity
|
||||
{
|
||||
readonly float2 Pos;
|
||||
bool isCanceled;
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
|
||||
namespace OpenRa.Traits.Activities
|
||||
{
|
||||
class UnloadCargo : IActivity
|
||||
public class UnloadCargo : IActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
|
||||
@@ -4,7 +4,7 @@ using OpenRa.GameRules;
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
class ProductionInfo : ITraitInfo
|
||||
public class ProductionInfo : ITraitInfo
|
||||
{
|
||||
public readonly int[] SpawnOffset = null;
|
||||
public readonly string[] Produces = { };
|
||||
@@ -12,7 +12,7 @@ namespace OpenRa.Traits
|
||||
public virtual object Create(Actor self) { return new Production(self); }
|
||||
}
|
||||
|
||||
class Production : IIssueOrder, IResolveOrder, IProducer, ITags
|
||||
public class Production : IIssueOrder, IResolveOrder, IProducer, ITags
|
||||
{
|
||||
bool isPrimary = false;
|
||||
public bool IsPrimary { get { return isPrimary; } }
|
||||
@@ -29,7 +29,7 @@ namespace OpenRa.Traits
|
||||
return newUnit.Info.Traits.GetOrDefault<UnitInfo>().InitialFacing;
|
||||
}
|
||||
|
||||
public bool Produce( Actor self, ActorInfo producee )
|
||||
public virtual bool Produce( Actor self, ActorInfo producee )
|
||||
{
|
||||
var location = CreationLocation( self, producee );
|
||||
if( location == null || self.World.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt( location.Value ).Any() )
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace OpenRa.Traits
|
||||
public object Create(Actor self) { return new RallyPoint(self); }
|
||||
}
|
||||
|
||||
class RallyPoint : IRender, IIssueOrder, IResolveOrder, ITick
|
||||
public class RallyPoint : IRender, IIssueOrder, IResolveOrder, ITick
|
||||
{
|
||||
[Sync]
|
||||
public int2 rallyPoint;
|
||||
|
||||
Reference in New Issue
Block a user