Adds new nuke toy, plays nuke sound when attack_self'd

Cooldown of 5 minutes
This commit is contained in:
JJRcop
2014-01-06 16:46:12 -05:00
parent 26d3d03d69
commit 94ef52e1cd
3 changed files with 20 additions and 3 deletions
+17 -1
View File
@@ -851,7 +851,23 @@ obj/item/toy/singlecard/attack_self(mob/user)
Flip()
/obj/item/toy/nuke
name = "\improper Nuclear Fission Explosive toy"
desc = "A plastic model of a Nuclear Fission Explosive."
icon = 'icons/obj/toy.dmi'
icon_state = "nuketoyidle"
w_class = 2.0
var/cooldown = 0
/obj/item/toy/nuke/attack_self(mob/user)
if (cooldown < world.time)
cooldown = world.time + 3000 //5 minutes
icon_state = "nuketoy"
for (var/mob/M in hearers(world.view, user)) //I'm doing this because playsound's dampening/stereo ruins the effect
if (M.client && !M.ear_deaf)
M << 'sound/machines/Alarm.ogg'
sleep(135)
icon_state = "nuketoyidle"