mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
@@ -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()
|
||||
|
||||
@@ -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("<span class='warning'>[user] presses a button on [src]</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='notice'>You hear the click of a button.</span>")
|
||||
spawn(5) //gia said so
|
||||
icon_state = "nuketoy"
|
||||
playsound(src, 'sound/machines/Alarm.ogg', 100, 0, surround = 0)
|
||||
sleep(135)
|
||||
icon_state = "nuketoyidle"
|
||||
|
||||
|
||||
|
||||
|
||||
+8
-8
@@ -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
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.7 KiB |
Reference in New Issue
Block a user