Make building and bridge repair traits public
This commit is contained in:
@@ -22,7 +22,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
class BridgeInfo : TraitInfo, IRulesetLoaded, Requires<HealthInfo>, Requires<BuildingInfo>
|
||||
public class BridgeInfo : TraitInfo, IRulesetLoaded, Requires<HealthInfo>, Requires<BuildingInfo>
|
||||
{
|
||||
public readonly bool Long = false;
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
class Bridge : IRender, INotifyDamageStateChanged, IRadarSignature
|
||||
public class Bridge : IRender, INotifyDamageStateChanged, IRadarSignature
|
||||
{
|
||||
readonly BuildingInfo buildingInfo;
|
||||
readonly Bridge[] neighbours = new Bridge[2];
|
||||
|
||||
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Allows bridges to be targeted for demolition and repair.")]
|
||||
class BridgeHutInfo : TraitInfo, IDemolishableInfo
|
||||
public class BridgeHutInfo : TraitInfo, IDemolishableInfo
|
||||
{
|
||||
[Desc("Bridge types to act on")]
|
||||
public readonly string[] Types = { "GroundLevelBridge" };
|
||||
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public override object Create(ActorInitializer init) { return new BridgeHut(init.World, this); }
|
||||
}
|
||||
|
||||
class BridgeHut : INotifyCreated, IDemolishable, ITick
|
||||
public class BridgeHut : INotifyCreated, IDemolishable, ITick
|
||||
{
|
||||
public readonly BridgeHutInfo Info;
|
||||
readonly BridgeLayer bridgeLayer;
|
||||
|
||||
@@ -17,14 +17,14 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Allows bridges to be targeted for demolition and repair.")]
|
||||
class LegacyBridgeHutInfo : TraitInfo, IDemolishableInfo
|
||||
public class LegacyBridgeHutInfo : TraitInfo, IDemolishableInfo
|
||||
{
|
||||
public bool IsValidTarget(ActorInfo actorInfo, Actor saboteur) { return false; } // TODO: bridges don't support frozen under fog
|
||||
|
||||
public override object Create(ActorInitializer init) { return new LegacyBridgeHut(init); }
|
||||
}
|
||||
|
||||
class LegacyBridgeHut : IDemolishable
|
||||
public class LegacyBridgeHut : IDemolishable
|
||||
{
|
||||
public Bridge FirstBridge { get; private set; }
|
||||
public Bridge Bridge { get; private set; }
|
||||
|
||||
Reference in New Issue
Block a user