private void ManageUpdateList(EntityUid uid, HealOnBuckleComponent component, BuckleChangeEvent args) { if (args.Buckling) { AddComp <HealOnBuckleHealingComponent>(uid); return; } RemComp <HealOnBuckleHealingComponent>(uid); component.Accumulator = 0; }
private void ManageUpdateList(EntityUid uid, HealOnBuckleComponent component, BuckleChangeEvent args) { _prototypeManager.TryIndex <InstantActionPrototype>("Sleep", out var sleepAction); if (args.Buckling) { AddComp <HealOnBuckleHealingComponent>(uid); if (sleepAction != null) { _actionsSystem.AddAction(args.BuckledEntity, new InstantAction(sleepAction), null); } return; } if (sleepAction != null) { _actionsSystem.RemoveAction(args.BuckledEntity, sleepAction, null); } _sleepingSystem.TryWaking(args.BuckledEntity); RemComp <HealOnBuckleHealingComponent>(uid); component.Accumulator = 0; }