Refactored Health usage to IHealth.

This commit is contained in:
Andre Mohren
2018-09-27 02:02:08 +02:00
committed by reaperrr
parent 83cd7cf485
commit 640078a2b1
30 changed files with 68 additions and 61 deletions

View File

@@ -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>();