From eca029a278f9cb367fd676b61f41a00c2d691f57 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 23 Jan 2021 20:00:29 +0100 Subject: [PATCH] adds attr --- Content.Server/Interfaces/GameObjects/IDisarmedAct.cs | 2 ++ Content.Server/Interfaces/GameObjects/IRefreshParts.cs | 2 ++ Content.Server/Interfaces/GameObjects/ISuicideAct.cs | 2 ++ .../Interfaces/GameObjects/Components/Interaction/IActivate.cs | 2 ++ .../GameObjects/Components/Interaction/IAfterInteract.cs | 2 ++ .../Interfaces/GameObjects/Components/Interaction/IAttack.cs | 2 ++ .../GameObjects/Components/Interaction/IDragDropOn.cs | 3 +++ .../GameObjects/Components/Interaction/IDraggable.cs | 2 ++ .../Interfaces/GameObjects/Components/Interaction/IDropped.cs | 2 ++ .../Interfaces/GameObjects/Components/Interaction/IEquipped.cs | 2 ++ .../GameObjects/Components/Interaction/IEquippedHand.cs | 2 ++ .../GameObjects/Components/Interaction/IHandDeselected.cs | 2 ++ .../GameObjects/Components/Interaction/IHandSelected.cs | 2 ++ .../Interfaces/GameObjects/Components/Interaction/IHotItem.cs | 2 ++ .../GameObjects/Components/Interaction/IInteractHand.cs | 2 ++ .../GameObjects/Components/Interaction/IInteractUsing.cs | 2 ++ .../Interfaces/GameObjects/Components/Interaction/ILand.cs | 2 ++ .../GameObjects/Components/Interaction/IRadiationAct.cs | 2 ++ .../GameObjects/Components/Interaction/IRangedInteract.cs | 2 ++ .../GameObjects/Components/Interaction/IReagentReaction.cs | 2 ++ .../GameObjects/Components/Interaction/IThrowCollide.cs | 2 ++ .../Interfaces/GameObjects/Components/Interaction/IThrown.cs | 2 ++ .../GameObjects/Components/Interaction/IUnequipped.cs | 2 ++ .../GameObjects/Components/Interaction/IUnequippedHand.cs | 2 ++ .../Interfaces/GameObjects/Components/Interaction/IUse.cs | 2 ++ 25 files changed, 51 insertions(+) diff --git a/Content.Server/Interfaces/GameObjects/IDisarmedAct.cs b/Content.Server/Interfaces/GameObjects/IDisarmedAct.cs index b1198b39d8..b1da1f277f 100644 --- a/Content.Server/Interfaces/GameObjects/IDisarmedAct.cs +++ b/Content.Server/Interfaces/GameObjects/IDisarmedAct.cs @@ -1,4 +1,5 @@ using System; +using Robust.Shared; using Robust.Shared.Interfaces.GameObjects; namespace Content.Server.Interfaces.GameObjects @@ -6,6 +7,7 @@ namespace Content.Server.Interfaces.GameObjects /// /// Implements behavior when an entity is disarmed. /// + [RequiresExplicitImplementation] public interface IDisarmedAct { /// diff --git a/Content.Server/Interfaces/GameObjects/IRefreshParts.cs b/Content.Server/Interfaces/GameObjects/IRefreshParts.cs index 5b2b449efe..8373f5e77e 100644 --- a/Content.Server/Interfaces/GameObjects/IRefreshParts.cs +++ b/Content.Server/Interfaces/GameObjects/IRefreshParts.cs @@ -1,9 +1,11 @@ using System.Collections.Generic; using Content.Server.GameObjects.Components.Construction; +using Robust.Shared; using Robust.Shared.Interfaces.GameObjects; namespace Content.Server.Interfaces.GameObjects { + [RequiresExplicitImplementation] public interface IRefreshParts { void RefreshParts(IEnumerable parts); diff --git a/Content.Server/Interfaces/GameObjects/ISuicideAct.cs b/Content.Server/Interfaces/GameObjects/ISuicideAct.cs index 161cba131d..44b1e7af63 100644 --- a/Content.Server/Interfaces/GameObjects/ISuicideAct.cs +++ b/Content.Server/Interfaces/GameObjects/ISuicideAct.cs @@ -1,8 +1,10 @@ using Content.Server.Interfaces.Chat; +using Robust.Shared; using Robust.Shared.Interfaces.GameObjects; namespace Content.Server.Interfaces.GameObjects { + [RequiresExplicitImplementation] public interface ISuicideAct { public SuicideKind Suicide(IEntity victim, IChatManager chat); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IActivate.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IActivate.cs index 80bf4c05e5..f2ffc7defb 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IActivate.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IActivate.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -12,6 +13,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// object in inventory. Unlike IUse, this can be performed on entities that aren't in the active hand, /// even when the active hand is currently holding something else. /// + [RequiresExplicitImplementation] public interface IActivate { /// diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IAfterInteract.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IAfterInteract.cs index 16299a23c9..7be3fdd56b 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IAfterInteract.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IAfterInteract.cs @@ -1,6 +1,7 @@ using System; using System.Threading.Tasks; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; @@ -14,6 +15,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// clicking on another object and no interaction occurs, at any range. This includes /// clicking on an object in the world as well as clicking on an object in inventory. /// + [RequiresExplicitImplementation] public interface IAfterInteract { /// diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IAttack.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IAttack.cs index 3555878ffc..6bef9778f6 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IAttack.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IAttack.cs @@ -1,5 +1,6 @@ #nullable enable using System; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.IoC; @@ -10,6 +11,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// /// This interface gives components behavior when being used to "attack". /// + [RequiresExplicitImplementation] public interface IAttack { // Redirects to ClickAttack by default. diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDragDropOn.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDragDropOn.cs index 761fbe86de..9ddf03c010 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDragDropOn.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDragDropOn.cs @@ -1,9 +1,12 @@ +using Robust.Shared; + namespace Content.Shared.Interfaces.GameObjects.Components { /// /// This interface allows the component's entity to be dragged and dropped /// onto by another entity and gives it behavior when that occurs. /// + [RequiresExplicitImplementation] public interface IDragDropOn { /// diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDraggable.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDraggable.cs index 2daff16ab7..40194e5f41 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDraggable.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDraggable.cs @@ -1,4 +1,5 @@ using System; +using Robust.Shared; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; @@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// This interface allows a local client to initiate dragging of the component's /// entity by mouse, for drag and drop interactions. /// + [RequiresExplicitImplementation] public interface IDraggable { /// diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDropped.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDropped.cs index ac27389fe3..7849bb7a95 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDropped.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IDropped.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// /// This interface gives components behavior when they're dropped by a mob. /// + [RequiresExplicitImplementation] public interface IDropped { void Dropped(DroppedEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IEquipped.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IEquipped.cs index f5b4cd5685..babcb527f6 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IEquipped.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IEquipped.cs @@ -1,6 +1,7 @@ using System; using Content.Shared.GameObjects.Components.Inventory; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -14,6 +15,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// This DOES NOT fire when putting the entity into a hand slot (), nor /// does it fire when putting the entity into held/equipped storage. /// + [RequiresExplicitImplementation] public interface IEquipped { void Equipped(EquippedEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IEquippedHand.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IEquippedHand.cs index 768149c4f7..c3eb592604 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IEquippedHand.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IEquippedHand.cs @@ -2,6 +2,7 @@ using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.Items; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -13,6 +14,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// This includes moving the entity from a non-hand slot into a hand slot /// (which would also fire ). /// + [RequiresExplicitImplementation] public interface IEquippedHand { void EquippedHand(EquippedHandEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHandDeselected.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHandDeselected.cs index 3abf713e25..2c73ddfc14 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHandDeselected.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHandDeselected.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// /// This interface gives components behavior when they're held on a deselected hand. /// + [RequiresExplicitImplementation] public interface IHandDeselected { void HandDeselected(HandDeselectedEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHandSelected.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHandSelected.cs index 70257cf553..5f705d9e5e 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHandSelected.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHandSelected.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// /// This interface gives components behavior when they're held on the selected hand. /// + [RequiresExplicitImplementation] public interface IHandSelected { void HandSelected(HandSelectedEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHotItem.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHotItem.cs index a86fee8c51..818d237004 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHotItem.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IHotItem.cs @@ -1,4 +1,5 @@ using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; namespace Content.Shared.Interfaces.GameObjects.Components @@ -10,6 +11,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// However say you hold an item that is always hot like lava rock, /// it will be permanently hot. /// + [RequiresExplicitImplementation] public interface IHotItem { bool IsCurrentlyHot(); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractHand.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractHand.cs index 576f013db1..21c5808061 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractHand.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractHand.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -9,6 +10,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// This interface gives components behavior when being clicked on by a user with an empty hand /// who is in range and has unobstructed reach of the target entity (allows inside blockers). /// + [RequiresExplicitImplementation] public interface IInteractHand { /// diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractUsing.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractUsing.cs index d233957b76..4184e47aa7 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractUsing.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IInteractUsing.cs @@ -1,6 +1,7 @@ using System; using System.Threading.Tasks; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; @@ -12,6 +13,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// who is in range and has unobstructed reach of the target entity (allows inside blockers). This includes /// clicking on an object in the world as well as clicking on an object in inventory. /// + [RequiresExplicitImplementation] public interface IInteractUsing { /// diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/ILand.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/ILand.cs index ec3b194a3d..8e429fc8c0 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/ILand.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/ILand.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; @@ -9,6 +10,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// /// This interface gives components behavior when landing after being thrown. /// + [RequiresExplicitImplementation] public interface ILand { void Land(LandEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IRadiationAct.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IRadiationAct.cs index b5fa62844d..6f49ca1208 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IRadiationAct.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IRadiationAct.cs @@ -1,8 +1,10 @@ using Content.Shared.GameObjects.Components; +using Robust.Shared; using Robust.Shared.Interfaces.GameObjects; namespace Content.Shared.Interfaces.GameObjects.Components { + [RequiresExplicitImplementation] public interface IRadiationAct : IComponent { void RadiationAct(float frameTime, SharedRadiationPulseComponent radiation); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IRangedInteract.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IRangedInteract.cs index e62f734680..cce39c8bf8 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IRangedInteract.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IRangedInteract.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; @@ -10,6 +11,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// This interface gives components behavior when being clicked on by a user with an object /// outside the range of direct use /// + [RequiresExplicitImplementation] public interface IRangedInteract { /// diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IReagentReaction.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IReagentReaction.cs index 5242681767..0737579446 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IReagentReaction.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IReagentReaction.cs @@ -1,4 +1,5 @@ using Content.Shared.Chemistry; +using Robust.Shared; namespace Content.Shared.Interfaces.GameObjects.Components { @@ -9,6 +10,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components Ingestion, } + [RequiresExplicitImplementation] public interface IReagentReaction { ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) => ReagentUnit.Zero; diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IThrowCollide.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IThrowCollide.cs index d5a255cad9..534974c28e 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IThrowCollide.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IThrowCollide.cs @@ -1,10 +1,12 @@ using System; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; namespace Content.Shared.Interfaces.GameObjects.Components { + [RequiresExplicitImplementation] public interface IThrowCollide { void HitBy(ThrowCollideEventArgs eventArgs) {} diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IThrown.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IThrown.cs index 349b2ccd1b..628c541059 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IThrown.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IThrown.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// /// This interface gives components behavior when thrown. /// + [RequiresExplicitImplementation] public interface IThrown { void Thrown(ThrownEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUnequipped.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUnequipped.cs index d9037fd93d..d0e2a99df5 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUnequipped.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUnequipped.cs @@ -1,6 +1,7 @@ using System; using Content.Shared.GameObjects.Components.Inventory; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -14,6 +15,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// This DOES NOT fire when removing the entity from a hand slot (), nor /// does it fire when removing the entity from held/equipped storage. /// + [RequiresExplicitImplementation] public interface IUnequipped { void Unequipped(UnequippedEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUnequippedHand.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUnequippedHand.cs index c738752896..3d4867d5f6 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUnequippedHand.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUnequippedHand.cs @@ -2,6 +2,7 @@ using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.Items; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -12,6 +13,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// even if it is going into another hand slot (which would also fire ). /// This includes moving the entity from a hand slot into a non-hand slot (which would also fire ). /// + [RequiresExplicitImplementation] public interface IUnequippedHand { void UnequippedHand(UnequippedHandEventArgs eventArgs); diff --git a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUse.cs b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUse.cs index e2028ab551..725d5beebe 100644 --- a/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUse.cs +++ b/Content.Shared/Interfaces/GameObjects/Components/Interaction/IUse.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; @@ -9,6 +10,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components /// This interface gives components behavior when using the entity in your active hand /// (done by clicking the entity in the active hand or pressing the keybind that defaults to Z). /// + [RequiresExplicitImplementation] public interface IUse { ///