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