more traitinfos
This commit is contained in:
@@ -3,6 +3,8 @@ using OpenRa.Game.GameRules;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class AttackTurretedInfo : AttackBaseInfo { }
|
||||
|
||||
class AttackTurreted : AttackBase, INotifyBuildComplete
|
||||
{
|
||||
public AttackTurreted( Actor self ) : base(self) { self.traits.Get<Turreted>(); }
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace OpenRa.Game.Traits
|
||||
public readonly int Cost = 0;
|
||||
public readonly string Description = "";
|
||||
public readonly string LongDesc = "";
|
||||
public readonly string Icon = null;
|
||||
|
||||
public object Create(Actor self) { return new Buildable(self); }
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,13 @@ using OpenRa.Game.Traits.Activities;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class CargoInfo : ITraitInfo
|
||||
{
|
||||
public readonly UnitMovementType[] PassengerTypes = { };
|
||||
|
||||
public object Create(Actor self) { return new Cargo(self); }
|
||||
}
|
||||
|
||||
class Cargo : IPips, IIssueOrder, IResolveOrder
|
||||
{
|
||||
List<Actor> cargo = new List<Actor>();
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class ExplodesInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new Explodes(self); }
|
||||
}
|
||||
|
||||
class Explodes : INotifyDamage
|
||||
{
|
||||
public Explodes(Actor self) {}
|
||||
|
||||
@@ -3,6 +3,11 @@ using OpenRa.Game.Traits.Activities;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class HarvesterInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new Harvester(self); }
|
||||
}
|
||||
|
||||
class Harvester : IIssueOrder, IResolveOrder, IPips
|
||||
{
|
||||
[Sync]
|
||||
|
||||
@@ -3,6 +3,11 @@ using OpenRa.Game.Effects;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class IronCurtainableInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new IronCurtain(self); }
|
||||
}
|
||||
|
||||
class IronCurtainable : IResolveOrder, IDamageModifier, ITick
|
||||
{
|
||||
[Sync]
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class LimitedAmmoInfo : ITraitInfo
|
||||
{
|
||||
public readonly int Ammo = 0;
|
||||
|
||||
public object Create(Actor self) { return new LimitedAmmo(self); }
|
||||
}
|
||||
|
||||
class LimitedAmmo : INotifyAttack, IPips
|
||||
{
|
||||
[Sync]
|
||||
|
||||
@@ -3,6 +3,11 @@ using OpenRa.Game.Traits.Activities;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class McvDeployInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new McvDeploy(self); }
|
||||
}
|
||||
|
||||
class McvDeploy : IIssueOrder, IResolveOrder
|
||||
{
|
||||
public McvDeploy(Actor self) { }
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class MineImmuneInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new MineImmune(self); }
|
||||
}
|
||||
|
||||
class MineImmune
|
||||
{
|
||||
public MineImmune(Actor self) { }
|
||||
|
||||
@@ -5,6 +5,11 @@ using System.Text;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class MinelayerInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new Minelayer(self); }
|
||||
}
|
||||
|
||||
class Minelayer : IIssueOrder, IResolveOrder
|
||||
{
|
||||
public Minelayer(Actor self) { }
|
||||
|
||||
@@ -6,6 +6,11 @@ using OpenRa.Game.Traits.Activities;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class PassengerInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new Passenger(self); }
|
||||
}
|
||||
|
||||
class Passenger : IIssueOrder, IResolveOrder
|
||||
{
|
||||
public Passenger(Actor self) { }
|
||||
|
||||
@@ -5,6 +5,11 @@ using OpenRa.Game.Effects;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderBuildingInfo : RenderSimpleInfo
|
||||
{
|
||||
public override object Create(Actor self) { return new RenderBuilding(self); }
|
||||
}
|
||||
|
||||
class RenderBuilding : RenderSimple, INotifyDamage, INotifySold
|
||||
{
|
||||
const int SmallBibStart = 1;
|
||||
|
||||
@@ -5,6 +5,11 @@ using System.Text;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderBuildingChargeInfo : RenderBuildingInfo
|
||||
{
|
||||
public override object Create(Actor self) { return new RenderBuildingCharge(self); }
|
||||
}
|
||||
|
||||
/* used for tesla */
|
||||
class RenderBuildingCharge : RenderBuilding, INotifyAttack
|
||||
{
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderBuildingOreInfo : RenderBuildingInfo
|
||||
{
|
||||
public override object Create(Actor self) { return new RenderBuildingOre(self); }
|
||||
}
|
||||
|
||||
class RenderBuildingOre : RenderBuilding, INotifyBuildComplete
|
||||
{
|
||||
public RenderBuildingOre(Actor self)
|
||||
|
||||
@@ -5,6 +5,13 @@ using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
abstract class RenderSimpleInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Image = null;
|
||||
|
||||
public abstract object Create(Actor self);
|
||||
}
|
||||
|
||||
abstract class RenderSimple : IRender, ITick
|
||||
{
|
||||
public Dictionary<string, AnimationWithOffset> anims = new Dictionary<string, AnimationWithOffset>();
|
||||
|
||||
@@ -5,6 +5,11 @@ using OpenRa.Game.GameRules;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderUnitInfo : RenderSimpleInfo
|
||||
{
|
||||
public override object Create(Actor self) { return new RenderUnit(self); }
|
||||
}
|
||||
|
||||
class RenderUnit : RenderSimple, INotifyDamage
|
||||
{
|
||||
public RenderUnit(Actor self)
|
||||
|
||||
@@ -5,6 +5,11 @@ using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderUnitMuzzleFlashInfo : RenderUnitInfo
|
||||
{
|
||||
public override object Create(Actor self) { return new RenderUnitMuzzleFlash(self); }
|
||||
}
|
||||
|
||||
class RenderUnitMuzzleFlash : RenderUnit
|
||||
{
|
||||
public RenderUnitMuzzleFlash(Actor self)
|
||||
|
||||
@@ -3,6 +3,11 @@ using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderUnitSpinnerInfo : RenderUnitInfo
|
||||
{
|
||||
public override object Create(Actor self) { return new RenderUnitSpinner(self); }
|
||||
}
|
||||
|
||||
class RenderUnitSpinner : RenderUnit
|
||||
{
|
||||
public Animation spinnerAnim;
|
||||
|
||||
@@ -4,6 +4,8 @@ using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderUnitTurretedInfo : RenderUnitInfo { }
|
||||
|
||||
class RenderUnitTurreted : RenderUnit
|
||||
{
|
||||
public Animation muzzleFlash;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class TurretedInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new Turreted(self); }
|
||||
}
|
||||
|
||||
class Turreted : ITick
|
||||
{
|
||||
[Sync]
|
||||
|
||||
Reference in New Issue
Block a user