Mark interactions as obsolete (#3902)

This commit is contained in:
metalgearsloth
2021-04-29 03:23:15 +10:00
committed by GitHub
parent 11aa6fb5a9
commit 578b767791
15 changed files with 20 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// Called when this component is activated by another entity who is in range. /// Called when this component is activated by another entity who is in range.
/// </summary> /// </summary>
[Obsolete("Use ActivateInWorldMessage instead")]
void Activate(ActivateEventArgs eventArgs); void Activate(ActivateEventArgs eventArgs);
} }

View File

@@ -27,6 +27,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// Called when we interact with nothing, or when we interact with an entity out of range that has no behavior /// Called when we interact with nothing, or when we interact with an entity out of range that has no behavior
/// </summary> /// </summary>
[Obsolete("Use AfterInteractMessage instead")]
Task<bool> AfterInteract(AfterInteractEventArgs eventArgs); Task<bool> AfterInteract(AfterInteractEventArgs eventArgs);
} }

View File

@@ -14,7 +14,10 @@ namespace Content.Shared.Interfaces.GameObjects.Components
public interface IAttack public interface IAttack
{ {
// Redirects to ClickAttack by default. // Redirects to ClickAttack by default.
[Obsolete("WideAttack")]
bool WideAttack(AttackEventArgs eventArgs) => ClickAttack(eventArgs); bool WideAttack(AttackEventArgs eventArgs) => ClickAttack(eventArgs);
[Obsolete("Use ClickAttack instead")]
bool ClickAttack(AttackEventArgs eventArgs); bool ClickAttack(AttackEventArgs eventArgs);
} }

View File

@@ -12,6 +12,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation] [RequiresExplicitImplementation]
public interface IDropped public interface IDropped
{ {
[Obsolete("Use DroppedMessage instead")]
void Dropped(DroppedEventArgs eventArgs); void Dropped(DroppedEventArgs eventArgs);
} }

View File

@@ -18,6 +18,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation] [RequiresExplicitImplementation]
public interface IEquipped public interface IEquipped
{ {
[Obsolete("Use EquippedMessage instead")]
void Equipped(EquippedEventArgs eventArgs); void Equipped(EquippedEventArgs eventArgs);
} }

View File

@@ -1,4 +1,5 @@
#nullable enable #nullable enable
using System;
using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Items;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Analyzers; using Robust.Shared.Analyzers;
@@ -15,6 +16,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation] [RequiresExplicitImplementation]
public interface IEquippedHand public interface IEquippedHand
{ {
[Obsolete("Use EquippedHandMessage instead")]
void EquippedHand(EquippedHandEventArgs eventArgs); void EquippedHand(EquippedHandEventArgs eventArgs);
} }

View File

@@ -12,6 +12,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation] [RequiresExplicitImplementation]
public interface IHandDeselected public interface IHandDeselected
{ {
[Obsolete("Use HandDeselectedMessage instead")]
void HandDeselected(HandDeselectedEventArgs eventArgs); void HandDeselected(HandDeselectedEventArgs eventArgs);
} }

View File

@@ -12,6 +12,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation] [RequiresExplicitImplementation]
public interface IHandSelected public interface IHandSelected
{ {
[Obsolete("Use HandSelectedMessage instead")]
void HandSelected(HandSelectedEventArgs eventArgs); void HandSelected(HandSelectedEventArgs eventArgs);
} }

View File

@@ -15,6 +15,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// Called when a player directly interacts with an empty hand when user is in range of the target entity. /// Called when a player directly interacts with an empty hand when user is in range of the target entity.
/// </summary> /// </summary>
[Obsolete("Use AttackHandMessage instead")]
bool InteractHand(InteractHandEventArgs eventArgs); bool InteractHand(InteractHandEventArgs eventArgs);
} }

View File

@@ -24,6 +24,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// Called when using one object on another when user is in range of the target entity. /// Called when using one object on another when user is in range of the target entity.
/// </summary> /// </summary>
[Obsolete("Use InteractUsingMessage instead")]
Task<bool> InteractUsing(InteractUsingEventArgs eventArgs); Task<bool> InteractUsing(InteractUsingEventArgs eventArgs);
} }

View File

@@ -16,7 +16,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// <summary> /// <summary>
/// Called when we try to interact with an entity out of range /// Called when we try to interact with an entity out of range
/// </summary> /// </summary>
/// <returns></returns> [Obsolete("Use RangedInteractMessage instead")]
bool RangedInteract(RangedInteractEventArgs eventArgs); bool RangedInteract(RangedInteractEventArgs eventArgs);
} }

View File

@@ -12,6 +12,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation] [RequiresExplicitImplementation]
public interface IThrown public interface IThrown
{ {
[Obsolete("Use ThrownMessage instead")]
void Thrown(ThrownEventArgs eventArgs); void Thrown(ThrownEventArgs eventArgs);
} }

View File

@@ -1,4 +1,5 @@
#nullable enable #nullable enable
using System;
using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.Inventory;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Analyzers; using Robust.Shared.Analyzers;
@@ -17,6 +18,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation] [RequiresExplicitImplementation]
public interface IUnequipped public interface IUnequipped
{ {
[Obsolete("Use UnequippedMessage instead")]
void Unequipped(UnequippedEventArgs eventArgs); void Unequipped(UnequippedEventArgs eventArgs);
} }

View File

@@ -1,4 +1,5 @@
#nullable enable #nullable enable
using System;
using Content.Shared.GameObjects.Components.Items; using Content.Shared.GameObjects.Components.Items;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Analyzers; using Robust.Shared.Analyzers;
@@ -14,6 +15,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation] [RequiresExplicitImplementation]
public interface IUnequippedHand public interface IUnequippedHand
{ {
[Obsolete("Use UnequippedHandMessage instead")]
void UnequippedHand(UnequippedHandEventArgs eventArgs); void UnequippedHand(UnequippedHandEventArgs eventArgs);
} }

View File

@@ -16,6 +16,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
/// Called when we activate an object we are holding to use it /// Called when we activate an object we are holding to use it
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[Obsolete("Use UseInHandMessage instead")]
bool UseEntity(UseEntityEventArgs eventArgs); bool UseEntity(UseEntityEventArgs eventArgs);
} }