Remove IThrown (#6375)
This commit is contained in:
@@ -719,14 +719,6 @@ namespace Content.Shared.Interaction
|
||||
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}");
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,30 +1,8 @@
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
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>
|
||||
/// Raised when throwing the entity in your hands.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user