* Remove
* Better description maybe
---------
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
var holderVelocity = _physicsQuery.TryComp(entity, out var physics) ? physics.LinearVelocity : Vector2.Zero;
var spreadMaxAngle = Angle.FromDegrees(DropHeldItemsSpread);
- var fellEvent = new FellDownEvent(entity);
- RaiseLocalEvent(entity, fellEvent);
-
foreach (var hand in entity.Comp.Hands.Keys)
{
if (!TryGetHeldItem(entity.AsNullable(), hand, out var heldEntity))
}
/// <summary>
-/// Raised after an entity falls down.
-/// </summary>
-public sealed class FellDownEvent : EntityEventArgs
-{
- public EntityUid Uid { get; }
-
- public FellDownEvent(EntityUid uid)
- {
- Uid = uid;
- }
-}
-
-/// <summary>
-/// Raised on the entity being thrown due to the holder falling down.
+/// Raised on an inhand entity being held by an entity who is dropping items as part of an attempted state change to down.
+/// If cancelled the inhand entity will not be dropped.
/// </summary>
[ByRefEvent]
public record struct FellDownThrowAttemptEvent(EntityUid Thrower, bool Cancelled = false);
-
-