Refactored Health usage to IHealth.
This commit is contained in:
@@ -18,7 +18,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Bridge actor that can't be passed underneath.")]
|
||||
class GroundLevelBridgeInfo : ITraitInfo, IRulesetLoaded, Requires<BuildingInfo>, Requires<HealthInfo>
|
||||
class GroundLevelBridgeInfo : ITraitInfo, IRulesetLoaded, Requires<BuildingInfo>, Requires<IHealthInfo>
|
||||
{
|
||||
public readonly string TerrainType = "Bridge";
|
||||
|
||||
@@ -53,13 +53,13 @@ namespace OpenRA.Mods.Common.Traits
|
||||
readonly Actor self;
|
||||
readonly BridgeLayer bridgeLayer;
|
||||
readonly IEnumerable<CPos> cells;
|
||||
readonly Health health;
|
||||
readonly IHealth health;
|
||||
|
||||
public GroundLevelBridge(Actor self, GroundLevelBridgeInfo info)
|
||||
{
|
||||
Info = info;
|
||||
this.self = self;
|
||||
health = self.Trait<Health>();
|
||||
health = self.Trait<IHealth>();
|
||||
|
||||
bridgeLayer = self.World.WorldActor.Trait<BridgeLayer>();
|
||||
var buildingInfo = self.Info.TraitInfo<BuildingInfo>();
|
||||
|
||||
Reference in New Issue
Block a user