Skip to content

Commit

Permalink
consistent variable rest
Browse files Browse the repository at this point in the history
  • Loading branch information
DEATHB4DEFEAT committed Aug 20, 2024
1 parent ade3ff0 commit aa667ea
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ private void Rest(EntityUid uid, ShadowkinRestPowerComponent component, Shadowki
_entity.EnsureComponent<ForcedSleepingComponent>(args.Performer);
// No waking up normally (it would do nothing)
if (_entity.TryGetComponent<SleepingComponent>(uid, out var sleepingComponent))
_actions.RemoveAction(args.Performer, sleepingComponent.WakeAction);
_actions.RemoveAction(uid, sleepingComponent.WakeAction);

_power.TryAddMultiplier(args.Performer, 2f);
_power.TryAddMultiplier(uid, 2f);

// No action cooldown
_actions.ClearCooldown(sleepingComponent?.WakeAction);
Expand All @@ -70,9 +70,9 @@ private void Rest(EntityUid uid, ShadowkinRestPowerComponent component, Shadowki
else
{
// Wake up
_entity.RemoveComponent<ForcedSleepingComponent>(args.Performer);
_entity.RemoveComponent<SleepingComponent>(args.Performer);
_power.TryAddMultiplier(args.Performer, -2f);
_entity.RemoveComponent<ForcedSleepingComponent>(uid);
_entity.RemoveComponent<SleepingComponent>(uid);
_power.TryAddMultiplier(uid, -2f);

// Action cooldown
args.Handled = true;
Expand Down

0 comments on commit aa667ea

Please sign in to comment.