Partial buckling refactor (#29031)

* partial buckling refactor

* git mv test

* change test namespace

* git mv test

* Update test namespace

* Add pulling test

* Network BuckleTime

* Add two more tests

* smelly
This commit is contained in:
Leon Friedrich
2024-06-20 03:14:18 +12:00
committed by GitHub
parent e33f0341ad
commit fa3c89a521
38 changed files with 1053 additions and 890 deletions

View File

@@ -17,7 +17,8 @@ public sealed class LegsParalyzedSystem : EntitySystem
{
SubscribeLocalEvent<LegsParalyzedComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<LegsParalyzedComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<LegsParalyzedComponent, BuckleChangeEvent>(OnBuckleChange);
SubscribeLocalEvent<LegsParalyzedComponent, BuckledEvent>(OnBuckled);
SubscribeLocalEvent<LegsParalyzedComponent, UnbuckledEvent>(OnUnbuckled);
SubscribeLocalEvent<LegsParalyzedComponent, ThrowPushbackAttemptEvent>(OnThrowPushbackAttempt);
SubscribeLocalEvent<LegsParalyzedComponent, UpdateCanMoveEvent>(OnUpdateCanMoveEvent);
}
@@ -34,16 +35,14 @@ public sealed class LegsParalyzedSystem : EntitySystem
_bodySystem.UpdateMovementSpeed(uid);
}
private void OnBuckleChange(EntityUid uid, LegsParalyzedComponent component, ref BuckleChangeEvent args)
private void OnBuckled(EntityUid uid, LegsParalyzedComponent component, ref BuckledEvent args)
{
if (args.Buckling)
{
_standingSystem.Stand(args.BuckledEntity);
}
else
{
_standingSystem.Down(args.BuckledEntity);
}
_standingSystem.Stand(uid);
}
private void OnUnbuckled(EntityUid uid, LegsParalyzedComponent component, ref UnbuckledEvent args)
{
_standingSystem.Down(uid);
}
private void OnUpdateCanMoveEvent(EntityUid uid, LegsParalyzedComponent component, UpdateCanMoveEvent args)