Remove IThrown (#6375)

This commit is contained in:
metalgearsloth
2022-01-30 03:58:19 +11:00
committed by GitHub
parent e7d7db279d
commit fb2145fae8
2 changed files with 0 additions and 30 deletions

View File

@@ -719,14 +719,6 @@ namespace Content.Shared.Interaction
return; return;
} }
var comps = AllComps<IThrown>(thrown).ToList();
var args = new ThrownEventArgs(user);
// Call Thrown on all components that implement the interface
foreach (var comp in comps)
{
comp.Thrown(args);
}
_adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user):user} threw {ToPrettyString(thrown):entity}"); _adminLogSystem.Add(LogType.Throw, LogImpact.Low,$"{ToPrettyString(user):user} threw {ToPrettyString(thrown):entity}");
} }
#endregion #endregion

View File

@@ -1,30 +1,8 @@
using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
namespace Content.Shared.Throwing namespace Content.Shared.Throwing
{ {
/// <summary>
/// This interface gives components behavior when thrown.
/// </summary>
[RequiresExplicitImplementation]
public interface IThrown
{
[Obsolete("Use ThrownMessage instead")]
void Thrown(ThrownEventArgs eventArgs);
}
public class ThrownEventArgs : EventArgs
{
public ThrownEventArgs(EntityUid user)
{
User = user;
}
public EntityUid User { get; }
}
/// <summary> /// <summary>
/// Raised when throwing the entity in your hands. /// Raised when throwing the entity in your hands.
/// </summary> /// </summary>