adds attr

This commit is contained in:
Paul
2021-01-23 20:00:29 +01:00
parent cd5b6ecc90
commit eca029a278
25 changed files with 51 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System; using System;
using Robust.Shared;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.Interfaces.GameObjects namespace Content.Server.Interfaces.GameObjects
@@ -6,6 +7,7 @@ namespace Content.Server.Interfaces.GameObjects
/// <summary> /// <summary>
/// Implements behavior when an entity is disarmed. /// Implements behavior when an entity is disarmed.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IDisarmedAct public interface IDisarmedAct
{ {
/// <summary> /// <summary>

View File

@@ -1,9 +1,11 @@
using System.Collections.Generic; using System.Collections.Generic;
using Content.Server.GameObjects.Components.Construction; using Content.Server.GameObjects.Components.Construction;
using Robust.Shared;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.Interfaces.GameObjects namespace Content.Server.Interfaces.GameObjects
{ {
[RequiresExplicitImplementation]
public interface IRefreshParts public interface IRefreshParts
{ {
void RefreshParts(IEnumerable<MachinePartComponent> parts); void RefreshParts(IEnumerable<MachinePartComponent> parts);

View File

@@ -1,8 +1,10 @@
using Content.Server.Interfaces.Chat; using Content.Server.Interfaces.Chat;
using Robust.Shared;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.Interfaces.GameObjects namespace Content.Server.Interfaces.GameObjects
{ {
[RequiresExplicitImplementation]
public interface ISuicideAct public interface ISuicideAct
{ {
public SuicideKind Suicide(IEntity victim, IChatManager chat); public SuicideKind Suicide(IEntity victim, IChatManager chat);

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.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, /// 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. /// even when the active hand is currently holding something else.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IActivate public interface IActivate
{ {
/// <summary> /// <summary>

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map; 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 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. /// clicking on an object in the world as well as clicking on an object in inventory.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IAfterInteract public interface IAfterInteract
{ {
/// <summary> /// <summary>

View File

@@ -1,5 +1,6 @@
#nullable enable #nullable enable
using System; using System;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
@@ -10,6 +11,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// This interface gives components behavior when being used to "attack". /// This interface gives components behavior when being used to "attack".
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IAttack public interface IAttack
{ {
// Redirects to ClickAttack by default. // Redirects to ClickAttack by default.

View File

@@ -1,9 +1,12 @@
using Robust.Shared;
namespace Content.Shared.Interfaces.GameObjects.Components namespace Content.Shared.Interfaces.GameObjects.Components
{ {
/// <summary> /// <summary>
/// This interface allows the component's entity to be dragged and dropped /// This interface allows the component's entity to be dragged and dropped
/// onto by another entity and gives it behavior when that occurs. /// onto by another entity and gives it behavior when that occurs.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IDragDropOn public interface IDragDropOn
{ {
/// <summary> /// <summary>

View File

@@ -1,4 +1,5 @@
using System; using System;
using Robust.Shared;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map; 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 /// This interface allows a local client to initiate dragging of the component's
/// entity by mouse, for drag and drop interactions. /// entity by mouse, for drag and drop interactions.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IDraggable public interface IDraggable
{ {
/// <summary> /// <summary>

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
@@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// This interface gives components behavior when they're dropped by a mob. /// This interface gives components behavior when they're dropped by a mob.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IDropped public interface IDropped
{ {
void Dropped(DroppedEventArgs eventArgs); void Dropped(DroppedEventArgs eventArgs);

View File

@@ -1,6 +1,7 @@
using System; using System;
using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.Inventory;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.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 (<see cref="IEquippedHand"/>), nor /// This DOES NOT fire when putting the entity into a hand slot (<see cref="IEquippedHand"/>), nor
/// does it fire when putting the entity into held/equipped storage. /// does it fire when putting the entity into held/equipped storage.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IEquipped public interface IEquipped
{ {
void Equipped(EquippedEventArgs eventArgs); void Equipped(EquippedEventArgs eventArgs);

View File

@@ -2,6 +2,7 @@
using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Items;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.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 /// This includes moving the entity from a non-hand slot into a hand slot
/// (which would also fire <see cref="IUnequipped"/>). /// (which would also fire <see cref="IUnequipped"/>).
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IEquippedHand public interface IEquippedHand
{ {
void EquippedHand(EquippedHandEventArgs eventArgs); void EquippedHand(EquippedHandEventArgs eventArgs);

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
@@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// This interface gives components behavior when they're held on a deselected hand. /// This interface gives components behavior when they're held on a deselected hand.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IHandDeselected public interface IHandDeselected
{ {
void HandDeselected(HandDeselectedEventArgs eventArgs); void HandDeselected(HandDeselectedEventArgs eventArgs);

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
@@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// This interface gives components behavior when they're held on the selected hand. /// This interface gives components behavior when they're held on the selected hand.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IHandSelected public interface IHandSelected
{ {
void HandSelected(HandSelectedEventArgs eventArgs); void HandSelected(HandSelectedEventArgs eventArgs);

View File

@@ -1,4 +1,5 @@
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
namespace Content.Shared.Interfaces.GameObjects.Components 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, /// However say you hold an item that is always hot like lava rock,
/// it will be permanently hot. /// it will be permanently hot.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IHotItem public interface IHotItem
{ {
bool IsCurrentlyHot(); bool IsCurrentlyHot();

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.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 /// 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). /// who is in range and has unobstructed reach of the target entity (allows inside blockers).
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IInteractHand public interface IInteractHand
{ {
/// <summary> /// <summary>

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map; 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 /// 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. /// clicking on an object in the world as well as clicking on an object in inventory.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IInteractUsing public interface IInteractUsing
{ {
/// <summary> /// <summary>

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map; using Robust.Shared.Map;
@@ -9,6 +10,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// This interface gives components behavior when landing after being thrown. /// This interface gives components behavior when landing after being thrown.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface ILand public interface ILand
{ {
void Land(LandEventArgs eventArgs); void Land(LandEventArgs eventArgs);

View File

@@ -1,8 +1,10 @@
using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.Components;
using Robust.Shared;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
namespace Content.Shared.Interfaces.GameObjects.Components namespace Content.Shared.Interfaces.GameObjects.Components
{ {
[RequiresExplicitImplementation]
public interface IRadiationAct : IComponent public interface IRadiationAct : IComponent
{ {
void RadiationAct(float frameTime, SharedRadiationPulseComponent radiation); void RadiationAct(float frameTime, SharedRadiationPulseComponent radiation);

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map; 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 /// This interface gives components behavior when being clicked on by a user with an object
/// outside the range of direct use /// outside the range of direct use
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IRangedInteract public interface IRangedInteract
{ {
/// <summary> /// <summary>

View File

@@ -1,4 +1,5 @@
using Content.Shared.Chemistry; using Content.Shared.Chemistry;
using Robust.Shared;
namespace Content.Shared.Interfaces.GameObjects.Components namespace Content.Shared.Interfaces.GameObjects.Components
{ {
@@ -9,6 +10,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
Ingestion, Ingestion,
} }
[RequiresExplicitImplementation]
public interface IReagentReaction public interface IReagentReaction
{ {
ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) => ReagentUnit.Zero; ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) => ReagentUnit.Zero;

View File

@@ -1,10 +1,12 @@
using System; using System;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map; using Robust.Shared.Map;
namespace Content.Shared.Interfaces.GameObjects.Components namespace Content.Shared.Interfaces.GameObjects.Components
{ {
[RequiresExplicitImplementation]
public interface IThrowCollide public interface IThrowCollide
{ {
void HitBy(ThrowCollideEventArgs eventArgs) {} void HitBy(ThrowCollideEventArgs eventArgs) {}

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
@@ -8,6 +9,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// This interface gives components behavior when thrown. /// This interface gives components behavior when thrown.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IThrown public interface IThrown
{ {
void Thrown(ThrownEventArgs eventArgs); void Thrown(ThrownEventArgs eventArgs);

View File

@@ -1,6 +1,7 @@
using System; using System;
using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.Inventory;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.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 (<see cref="IUnequippedHand"/>), nor /// This DOES NOT fire when removing the entity from a hand slot (<see cref="IUnequippedHand"/>), nor
/// does it fire when removing the entity from held/equipped storage. /// does it fire when removing the entity from held/equipped storage.
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IUnequipped public interface IUnequipped
{ {
void Unequipped(UnequippedEventArgs eventArgs); void Unequipped(UnequippedEventArgs eventArgs);

View File

@@ -2,6 +2,7 @@
using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Items;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.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 <see cref="IEquippedHand"/>). /// even if it is going into another hand slot (which would also fire <see cref="IEquippedHand"/>).
/// This includes moving the entity from a hand slot into a non-hand slot (which would also fire <see cref="IEquipped"/>). /// This includes moving the entity from a hand slot into a non-hand slot (which would also fire <see cref="IEquipped"/>).
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IUnequippedHand public interface IUnequippedHand
{ {
void UnequippedHand(UnequippedHandEventArgs eventArgs); void UnequippedHand(UnequippedHandEventArgs eventArgs);

View File

@@ -1,5 +1,6 @@
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.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 /// 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). /// (done by clicking the entity in the active hand or pressing the keybind that defaults to Z).
/// </summary> /// </summary>
[RequiresExplicitImplementation]
public interface IUse public interface IUse
{ {
/// <summary> /// <summary>