This commit is contained in:
Rane
2022-04-23 21:05:02 -04:00
committed by GitHub
parent 18220b6488
commit 98cd4fdb58
44 changed files with 1160 additions and 15 deletions

View File

@@ -17,6 +17,9 @@ public sealed class StandingStateSystem : EntitySystem
var direction = EntityManager.TryGetComponent(uid, out PhysicsComponent? comp) ? comp.LinearVelocity / 50 : Vector2.Zero;
var dropAngle = _random.NextFloat(0.8f, 1.2f);
var fellEvent = new FellDownEvent(uid);
RaiseLocalEvent(uid, fellEvent, false);
if (!TryComp(uid, out SharedHandsComponent? handsComp))
return;
@@ -43,3 +46,15 @@ public sealed class StandingStateSystem : EntitySystem
}
}
/// <summary>
/// Raised after an entity falls down.
/// <summary>
public sealed class FellDownEvent : EntityEventArgs
{
public EntityUid Uid { get; }
public FellDownEvent(EntityUid uid)
{
Uid = uid;
}
}