Files
Paradise/code/modules/ruins/objects_and_mobs/gym.dm
T
0f7a8707ef [Ready] Refactors stuns and status effects. (#17579)
* Fixes reviver runtime

* Confusion status effect

* Dizzy status effect

* Drowsiness status effect

* decaying -> transient

* Drunkenness status effect

* why use timer when SSfastprocessing work good

* stuns (mostly)

* weaken and immobalise

* stun/weaken times

* update_flags redundancies.

* Slowed()

* Silence + fixes transient decay

* Jittery

* sleeping

* Paralyze -> weaken

* Cult sluring

* paralyse

* Stammer

* slurring + projectile cleanups

* losebreath

* Hallucination

* forgor this

* eyeblurry

* eye blind

* Druggy

* affected didn't like my spacing

* review pass

* second review pass

* some cleanups

* documentation and signal framework

* confusion fix

* Fixes spec_stun

* rejuv fix

* removes a TODO

* conflicted myself

* fixes

* self review

* review

* removes TODOs

* adminfreeze

* TM fixes

* hallucination fix + others

* tones down alchol and runtime fixes

* confusion overlay suggestion

* more fixes

* runtime fix

* losebreath fix

* clamp => directional bounded sum

* steel review

* oops

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* reduces the dizziness cycle rate

* borg hotfix

* sanctified decursening

Co-authored-by: mochi <1496804+dearmochi@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
2022-05-24 16:35:26 +01:00

94 lines
3.0 KiB
Plaintext

/obj/structure/punching_bag
name = "punching bag"
desc = "A punching bag. Can you get to speed level 4???"
icon = 'icons/goonstation/objects/fitness.dmi'
icon_state = "punchingbag"
anchored = TRUE
layer = WALL_OBJ_LAYER
var/list/hit_sounds = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg',\
'sound/weapons/punch1.ogg', 'sound/weapons/punch2.ogg', 'sound/weapons/punch3.ogg', 'sound/weapons/punch4.ogg')
/obj/structure/punching_bag/attack_hand(mob/user as mob)
. = ..()
if(.)
return
flick("[icon_state]2", src)
playsound(loc, pick(hit_sounds), 25, 1, -1)
if(isliving(user))
var/mob/living/L = user
L.apply_status_effect(STATUS_EFFECT_EXERCISED)
/obj/structure/weightmachine
name = "weight machine"
desc = "Just looking at this thing makes you feel tired."
density = TRUE
anchored = TRUE
var/icon_state_inuse
/obj/structure/weightmachine/proc/AnimateMachine(mob/living/user)
return
/obj/structure/weightmachine/attack_hand(mob/living/user)
. = ..()
if(.)
return
if(in_use)
to_chat(user, "It's already in use - wait a bit.")
return
else
in_use = TRUE
icon_state = icon_state_inuse
user.setDir(SOUTH)
user.Stun(8 SECONDS)
user.forceMove(src.loc)
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
user.visible_message("<B>[user] is [bragmessage]!</B>")
AnimateMachine(user)
playsound(user, 'sound/machines/click.ogg', 60, 1)
in_use = FALSE
user.pixel_y = 0
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
icon_state = initial(icon_state)
to_chat(user, finishmessage)
user.apply_status_effect(STATUS_EFFECT_EXERCISED)
/obj/structure/weightmachine/stacklifter
icon = 'icons/goonstation/objects/fitness.dmi'
icon_state = "fitnesslifter"
icon_state_inuse = "fitnesslifter2"
/obj/structure/weightmachine/stacklifter/AnimateMachine(mob/living/user)
var/lifts = 0
while (lifts++ < 6)
if (user.loc != src.loc)
break
sleep(3)
animate(user, pixel_y = -2, time = 3)
sleep(3)
animate(user, pixel_y = -4, time = 3)
sleep(3)
playsound(user, 'sound/goonstation/effects/spring.ogg', 60, 1)
/obj/structure/weightmachine/weightlifter
icon = 'icons/goonstation/objects/fitness.dmi'
icon_state = "fitnessweight"
icon_state_inuse = "fitnessweight-c"
/obj/structure/weightmachine/weightlifter/AnimateMachine(mob/living/user)
var/mutable_appearance/swole_overlay = mutable_appearance(icon, "fitnessweight-w", WALL_OBJ_LAYER)
add_overlay(swole_overlay)
var/reps = 0
user.pixel_y = 5
while (reps++ < 6)
if (user.loc != src.loc)
break
for (var/innerReps = max(reps, 1), innerReps > 0, innerReps--)
sleep(3)
animate(user, pixel_y = (user.pixel_y == 3) ? 5 : 3, time = 3)
playsound(user, 'sound/goonstation/effects/spring.ogg', 60, 1)
sleep(3)
animate(user, pixel_y = 2, time = 3)
sleep(3)
cut_overlay(swole_overlay)