mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Resprites hand labeller and big red button (#20744)
* sprites * timing * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -828,18 +828,18 @@
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/redbutton/attack_self(mob/user)
|
||||
if(cooldown < world.time)
|
||||
cooldown = (world.time + 300) // Sets cooldown at 30 seconds
|
||||
user.visible_message("<span class='warning'>[user] presses the big red button.</span>", "<span class='notice'>You press the button, it plays a loud noise!</span>", "<span class='notice'>The button clicks loudly.</span>")
|
||||
playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, 0)
|
||||
for(var/mob/M in range(10, src)) // Checks range
|
||||
if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
|
||||
sleep(8) // Short delay to match up with the explosion sound
|
||||
shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second.
|
||||
|
||||
else
|
||||
if(cooldown >= world.time)
|
||||
to_chat(user, "<span class='alert'>Nothing happens.</span>")
|
||||
return
|
||||
|
||||
cooldown = (world.time + 300) // Sets cooldown at 30 seconds
|
||||
user.visible_message("<span class='warning'>[user] presses the big red button.</span>", "<span class='notice'>You press the button, it plays a loud noise!</span>", "<span class='notice'>The button clicks loudly.</span>")
|
||||
playsound(src, 'sound/effects/explosionfar.ogg', 50, FALSE, 0)
|
||||
flick("bigred_press", src)
|
||||
for(var/mob/M in range(10, src)) // Checks range
|
||||
if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
|
||||
sleep(8) // Short delay to match up with the explosion sound
|
||||
shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second.
|
||||
|
||||
/*
|
||||
* AI core prizes
|
||||
|
||||
Reference in New Issue
Block a user