Skip to content

Commit

Permalink
Замедляем отжимания когда сделали их много
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantornRU committed Jan 20, 2024
1 parent e47ecf9 commit 28b6de7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modular_ss220/ranks/code/exercise/pushup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ Verbs related to getting fucking jacked, bro
return
currentloss = L.getStaminaLoss() + L.getOxyLoss()
pushup_value = calculate_valueloss_per_pushup(user, on_knees, one_arm, clap)
var/time_mod = 1 - round(L.getOxyLoss() / 300, 0.05)
if(!user.PushupAnimation(time_mod))
var/time_div = 1 - round(L.getOxyLoss() / 300, 0.05)
if(!user.PushupAnimation(time_div))
user.visible_message(span_notice("[user] прекратил отжиматься."), span_notice("Вы прекратили отжиматься."), span_notice("Вы слишите шорох."))
return
pushups_in_a_row++
Expand Down Expand Up @@ -140,11 +140,11 @@ Verbs related to getting fucking jacked, bro
dir = WEST
matrix.Turn(270)

/atom/proc/PushupAnimation(time_mod = 1)
/atom/proc/PushupAnimation(time_div = 1)
var/target_y = -5
var/delay = 0.6 SECONDS * time_mod
var/time_low = 0.2 SECONDS * time_mod
var/time_hight = 0.8 SECONDS * time_mod
var/delay = 0.6 SECONDS / time_div
var/time_low = 0.2 SECONDS / time_div
var/time_hight = 0.8 SECONDS / time_div
animate(src, pixel_y = target_y, time = time_hight, easing = QUAD_EASING) //down to the floor
if(!do_after(src, delay, TRUE))
animate(src, pixel_y = 0, time = time_low, easing = QUAD_EASING)
Expand Down

0 comments on commit 28b6de7

Please sign in to comment.