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
+3 -2
View File
@@ -23,7 +23,8 @@
/obj/item/toy/prize/mauler = 1,
/obj/item/toy/prize/odysseus = 1,
/obj/item/toy/prize/phazon = 1,
/obj/item/toy/cards = 2
/obj/item/toy/cards = 2,
/obj/item/toy/nuke = 2
)
/obj/machinery/computer/arcade/New()
@@ -546,4 +547,4 @@
/obj/machinery/computer/arcade/orion_trail/proc/win()
playing = 0
prizevend()
prizevend()
+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"
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB