diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index fb922c6fb9a..39e5691e208 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -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() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index edf84e2cd08..1b5d5549e30 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -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 + user.visible_message("[user] presses a button on [src]", "You activate [src], it plays a loud noise!", "You hear the click of a button.") + spawn(5) //gia said so + icon_state = "nuketoy" + playsound(src, 'sound/machines/Alarm.ogg', 100, 0, surround = 0) + sleep(135) + icon_state = "nuketoyidle" diff --git a/code/game/sound.dm b/code/game/sound.dm index cf876319587..eed7b1c3bed 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -1,4 +1,4 @@ -/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff) +/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, surround = 1) soundin = get_sfx(soundin) // same sound for everyone @@ -17,12 +17,12 @@ if(get_dist(M, turf_source) <= world.view + extrarange) var/turf/T = get_turf(M) if(T && T.z == turf_source.z) - M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff) + M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, surround) var/const/FALLOFF_SOUNDS = 1 var/const/SURROUND_CAP = 7 -/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff) +/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, surround = 1) if(!src.client || ear_deaf > 0) return soundin = get_sfx(soundin) @@ -40,12 +40,12 @@ var/const/SURROUND_CAP = 7 if(isturf(turf_source)) // 3D sounds, the technology is here! var/turf/T = get_turf(src) - var/dx = turf_source.x - T.x // Hearing from the right/left + if (surround) + var/dx = turf_source.x - T.x // Hearing from the right/left + S.x = round(max(-SURROUND_CAP, min(SURROUND_CAP, dx)), 1) - S.x = round(max(-SURROUND_CAP, min(SURROUND_CAP, dx)), 1) - - var/dz = turf_source.y - T.y // Hearing from infront/behind - S.z = round(max(-SURROUND_CAP, min(SURROUND_CAP, dz)), 1) + var/dz = turf_source.y - T.y // Hearing from infront/behind + S.z = round(max(-SURROUND_CAP, min(SURROUND_CAP, dz)), 1) // The y value is for above your head, but there is no ceiling in 2d spessmens. S.y = 1 diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi index b0a8df3b071..9c50a17391e 100644 Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ