IWallConnectorInfo to allow gates connect to walls in map editor

This commit is contained in:
teees
2016-01-25 08:41:07 +01:00
parent 3dc63999e3
commit 5ca9f52a62
2 changed files with 20 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class WithGateSpriteBodyInfo : WithSpriteBodyInfo, Requires<GateInfo>
class WithGateSpriteBodyInfo : WithSpriteBodyInfo, IWallConnectorInfo, Requires<GateInfo>
{
[Desc("Cells (outside the gate footprint) that contain wall cells that can connect to the gate")]
public readonly CVec[] WallConnections = { };
@@ -34,6 +34,11 @@ namespace OpenRA.Mods.Common.Traits
yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale);
}
string IWallConnectorInfo.GetWallConnectionType()
{
return Type;
}
}
class WithGateSpriteBody : WithSpriteBody, INotifyRemovedFromWorld, INotifyBuildComplete, IWallConnector