everything StoresOreInfo onward
This commit is contained in:
@@ -271,7 +271,6 @@
|
||||
<Compile Include="Traits\TakeCover.cs" />
|
||||
<Compile Include="Traits\Thief.cs" />
|
||||
<Compile Include="Traits\TraitsInterfaces.cs" />
|
||||
<Compile Include="Traits\Tree.cs" />
|
||||
<Compile Include="Traits\Turreted.cs" />
|
||||
<Compile Include="Traits\Unit.cs" />
|
||||
<Compile Include="Traits\WaterPaletteRotation.cs" />
|
||||
|
||||
@@ -3,16 +3,17 @@ using System;
|
||||
using OpenRa.Game.GameRules;
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class StoresOreInfo : ITraitInfo
|
||||
{
|
||||
public readonly int Pips = 0;
|
||||
public readonly int Capacity = 0;
|
||||
|
||||
public object Create(Actor self) { return new StoresOre(self); }
|
||||
}
|
||||
|
||||
class StoresOre : IPips, IAcceptThief
|
||||
{
|
||||
public const int MaxStealAmount = 100; //todo: How is cash stolen determined?
|
||||
|
||||
readonly Actor self;
|
||||
|
||||
public StoresOre(Actor self)
|
||||
{
|
||||
this.self = self;
|
||||
}
|
||||
public StoresOre(Actor self) {}
|
||||
|
||||
public void OnSteal(Actor self, Actor thief)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,11 @@ using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class SubmarineInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new Submarine(self); }
|
||||
}
|
||||
|
||||
class Submarine : IRenderModifier, INotifyAttack, ITick, INotifyDamage
|
||||
{
|
||||
[Sync]
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class TakeCoverInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new TakeCover(self); }
|
||||
}
|
||||
|
||||
// infantry prone behavior
|
||||
class TakeCover : ITick, INotifyDamage, IDamageModifier, ISpeedModifier
|
||||
{
|
||||
|
||||
@@ -3,6 +3,11 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class ThiefInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new Thief(self); }
|
||||
}
|
||||
|
||||
class Thief : IIssueOrder, IResolveOrder
|
||||
{
|
||||
public Thief(Actor self) { }
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class Tree : IRender
|
||||
{
|
||||
Sprite Image;
|
||||
|
||||
public Tree(Sprite treeImage)
|
||||
{
|
||||
Image = treeImage;
|
||||
}
|
||||
|
||||
public IEnumerable<Renderable> Render(Actor self)
|
||||
{
|
||||
yield return new Renderable(Image, Game.CellSize * (float2)self.Location, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class WaterPaletteRotationInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new WaterPaletteRotation(self); }
|
||||
}
|
||||
|
||||
class WaterPaletteRotation : ITick, IPaletteModifier
|
||||
{
|
||||
public WaterPaletteRotation(Actor self) { }
|
||||
|
||||
@@ -6,6 +6,11 @@ using OpenRa.Game.Graphics;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class WithShadowInfo : ITraitInfo
|
||||
{
|
||||
public object Create(Actor self) { return new WithShadow(self); }
|
||||
}
|
||||
|
||||
class WithShadow : IRenderModifier
|
||||
{
|
||||
public WithShadow(Actor self) {}
|
||||
|
||||
Reference in New Issue
Block a user