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

View File

@@ -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<MachinePartComponent> parts);

View File

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

View File

@@ -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.
/// </summary>
[RequiresExplicitImplementation]
public interface IActivate
{
/// <summary>

View File

@@ -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.
/// </summary>
[RequiresExplicitImplementation]
public interface IAfterInteract
{
/// <summary>

View File

@@ -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
/// <summary>
/// This interface gives components behavior when being used to "attack".
/// </summary>
[RequiresExplicitImplementation]
public interface IAttack
{
// Redirects to ClickAttack by default.

View File

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

View File

@@ -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.
/// </summary>
[RequiresExplicitImplementation]
public interface IDraggable
{
/// <summary>

View File

@@ -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
/// <summary>
/// This interface gives components behavior when they're dropped by a mob.
/// </summary>
[RequiresExplicitImplementation]
public interface IDropped
{
void Dropped(DroppedEventArgs eventArgs);

View File

@@ -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 (<see cref="IEquippedHand"/>), nor
/// does it fire when putting the entity into held/equipped storage.
/// </summary>
[RequiresExplicitImplementation]
public interface IEquipped
{
void Equipped(EquippedEventArgs eventArgs);

View File

@@ -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 <see cref="IUnequipped"/>).
/// </summary>
[RequiresExplicitImplementation]
public interface IEquippedHand
{
void EquippedHand(EquippedHandEventArgs eventArgs);

View File

@@ -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
/// <summary>
/// This interface gives components behavior when they're held on a deselected hand.
/// </summary>
[RequiresExplicitImplementation]
public interface IHandDeselected
{
void HandDeselected(HandDeselectedEventArgs eventArgs);

View File

@@ -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
/// <summary>
/// This interface gives components behavior when they're held on the selected hand.
/// </summary>
[RequiresExplicitImplementation]
public interface IHandSelected
{
void HandSelected(HandSelectedEventArgs eventArgs);

View File

@@ -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.
/// </summary>
[RequiresExplicitImplementation]
public interface IHotItem
{
bool IsCurrentlyHot();

View File

@@ -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).
/// </summary>
[RequiresExplicitImplementation]
public interface IInteractHand
{
/// <summary>

View File

@@ -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.
/// </summary>
[RequiresExplicitImplementation]
public interface IInteractUsing
{
/// <summary>

View File

@@ -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
/// <summary>
/// This interface gives components behavior when landing after being thrown.
/// </summary>
[RequiresExplicitImplementation]
public interface ILand
{
void Land(LandEventArgs eventArgs);

View File

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

View File

@@ -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
/// </summary>
[RequiresExplicitImplementation]
public interface IRangedInteract
{
/// <summary>

View File

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

View File

@@ -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) {}

View File

@@ -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
/// <summary>
/// This interface gives components behavior when thrown.
/// </summary>
[RequiresExplicitImplementation]
public interface IThrown
{
void Thrown(ThrownEventArgs eventArgs);

View File

@@ -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 (<see cref="IUnequippedHand"/>), nor
/// does it fire when removing the entity from held/equipped storage.
/// </summary>
[RequiresExplicitImplementation]
public interface IUnequipped
{
void Unequipped(UnequippedEventArgs eventArgs);

View File

@@ -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 <see cref="IEquippedHand"/>).
/// This includes moving the entity from a hand slot into a non-hand slot (which would also fire <see cref="IEquipped"/>).
/// </summary>
[RequiresExplicitImplementation]
public interface IUnequippedHand
{
void UnequippedHand(UnequippedHandEventArgs eventArgs);

View File

@@ -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).
/// </summary>
[RequiresExplicitImplementation]
public interface IUse
{
/// <summary>