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

Cooldown of 5 minutes

Conflicts:
	code/game/machinery/computer/arcade.dm
	code/game/objects/items/toys.dm
	icons/obj/toy.dmi
This commit is contained in:
JJRcop
2014-01-06 16:46:12 -05:00
committed by ZomgPonies
parent 76495953db
commit e235bc94e6
3 changed files with 22 additions and 2 deletions
+3 -2
View File
@@ -23,7 +23,8 @@
/obj/item/toy/prize/seraph = 1,
/obj/item/toy/prize/mauler = 1,
/obj/item/toy/prize/odysseus = 1,
/obj/item/toy/prize/phazon = 1
/obj/item/toy/prize/phazon = 1,
/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()
+19
View File
@@ -518,6 +518,7 @@
desc = "Mini-Mecha action figure! Collect them all! 11/11."
icon_state = "phazonprize"
/obj/item/toy/katana
name = "replica katana"
desc = "Woefully underpowered in D20."
@@ -532,6 +533,24 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced")
/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"
/obj/item/weapon/toddler
icon_state = "toddler"
name = "toddler"