From 0648fc9f310da5306a8ef13554f0e4022843b263 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 7 Sep 2017 19:31:24 +0000 Subject: [PATCH] Move damage notification interfaces to Mods.Common. --- OpenRA.Game/Traits/TraitsInterfaces.cs | 5 ----- OpenRA.Mods.Common/TraitsInterfaces.cs | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index db51046b79..70fac96fa2 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -131,10 +131,7 @@ namespace OpenRA.Traits public interface INotifyCreated { void Created(Actor self); } public interface INotifyAddedToWorld { void AddedToWorld(Actor self); } public interface INotifyRemovedFromWorld { void RemovedFromWorld(Actor self); } - public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } - public interface INotifyKilled { void Killed(Actor self, AttackInfo e); } public interface INotifyActorDisposing { void Disposing(Actor self); } - public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); } public interface INotifyOwnerChanged { void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner); } public interface INotifyEffectiveOwnerChanged { void OnEffectiveOwnerChanged(Actor self, Player oldEffectiveOwner, Player newEffectiveOwner); } @@ -181,8 +178,6 @@ namespace OpenRA.Traits public interface IDisabledTrait { bool IsTraitDisabled { get; } } public interface IDisable { bool Disabled { get; } } - public interface IExplodeModifier { bool ShouldExplode(Actor self); } - public interface IHuskModifier { string HuskActor(Actor self); } public interface IRadarSignature { diff --git a/OpenRA.Mods.Common/TraitsInterfaces.cs b/OpenRA.Mods.Common/TraitsInterfaces.cs index e7d2cef7d8..d6284a534c 100644 --- a/OpenRA.Mods.Common/TraitsInterfaces.cs +++ b/OpenRA.Mods.Common/TraitsInterfaces.cs @@ -82,6 +82,9 @@ namespace OpenRA.Mods.Common.Traits [RequireExplicitImplementation] public interface INotifyDamageStateChanged { void DamageStateChanged(Actor self, AttackInfo e); } + public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } + public interface INotifyKilled { void Killed(Actor self, AttackInfo e); } + public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); } public interface INotifyBuildingPlaced { void BuildingPlaced(Actor self); } public interface INotifyRepair { void Repairing(Actor self, Actor target); } public interface INotifyNuke { void Launching(Actor self); } @@ -97,6 +100,9 @@ namespace OpenRA.Mods.Common.Traits public interface IRenderActorPreviewInfo : ITraitInfo { IEnumerable RenderPreview(ActorPreviewInitializer init); } public interface ICruiseAltitudeInfo : ITraitInfo { WDist GetCruiseAltitude(); } + public interface IExplodeModifier { bool ShouldExplode(Actor self); } + public interface IHuskModifier { string HuskActor(Actor self); } + [RequireExplicitImplementation] public interface INotifyInfiltrated { void Infiltrated(Actor self, Actor infiltrator); }