Files
wwdpublic/Content.Shared/Throwing/ThrowEvents.cs
gluesniffler 2a33691a1c Ports Shitmed Updates From Goob (#1387)
Lots of stuff. Also moved everything I could to the _Shitmed namespace
as I do in Goob. Will make future ports way faster

# Changelog
🆑 Mocho
- add: Added some fun organs and other thingies, check out the Goob PRs
if you want more details.
- fix: Fixed tons of issues with shitmed. Too many for the changelog in
fact.

(cherry picked from commit 3c9db94102cb25b28a83d51ac8d659fa31fe7d12)
2025-01-13 23:01:51 +03:00

51 lines
1.8 KiB
C#

using Content.Shared._Shitmed.Targeting;
namespace Content.Shared.Throwing
{
/// <summary>
/// Base class for all throw events.
/// </summary>
public abstract class ThrowEvent : HandledEntityEventArgs
{
///Nyano - Summary: Allows us to tell who threw the item. It matters!
/// <summary>
/// The entity that threw <see cref="Thrown"/>.
/// </summary>
public EntityUid? User { get; }
// End Nyano code.
public readonly EntityUid Thrown;
public readonly EntityUid Target;
public ThrownItemComponent Component;
public TargetBodyPart? TargetPart;
public ThrowEvent(EntityUid? user, EntityUid thrown, EntityUid target, ThrownItemComponent component, TargetBodyPart? targetPart) //Nyano - Summary: User added.
{
User = user; //Nyano - Summary: User added.
Thrown = thrown;
Target = target;
Component = component;
TargetPart = targetPart;
}
}
/// <summary>
/// Raised directed on the target entity being hit by the thrown entity.
/// </summary>
public sealed class ThrowHitByEvent : ThrowEvent
{
public ThrowHitByEvent(EntityUid? user, EntityUid thrown, EntityUid target, ThrownItemComponent component, TargetBodyPart? targetPart) : base(user, thrown, target, component, targetPart) //Nyano - Summary: User added.
{
}
}
/// <summary>
/// Raised directed on the thrown entity that hits another.
/// </summary>
public sealed class ThrowDoHitEvent : ThrowEvent
{
public ThrowDoHitEvent(EntityUid thrown, EntityUid target, ThrownItemComponent component, TargetBodyPart? targetPart) : base(null, thrown, target, component, targetPart) //Nyano - Summary: User added.
{
}
}
}