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>
/// Called when this component is activated by another entity who is in range.
/// </summary>
[Obsolete("Use ActivateInWorldMessage instead")]
void Activate(ActivateEventArgs eventArgs);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
#nullable enable
using System;
using Content.Shared.GameObjects.Components.Items;
using JetBrains.Annotations;
using Robust.Shared.Analyzers;
@@ -14,6 +15,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
[RequiresExplicitImplementation]
public interface IUnequippedHand
{
[Obsolete("Use UnequippedHandMessage instead")]
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
/// </summary>
/// <returns></returns>
[Obsolete("Use UseInHandMessage instead")]
bool UseEntity(UseEntityEventArgs eventArgs);
}