mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Updated the sound system (#18724)
* sdaf * sdaf * sdfa * sadf * sfda * gfd * reduce thrusters volume * sdafsadsdaf * sdfa * Reduced some sound ranges and made some/more not ignore walls for loops * health analyzers too * ivdrip adjustment * most tools now use play_tool_sound to have the sound played, reduced range for it
This commit is contained in:
@@ -30,14 +30,14 @@
|
||||
switch(state)
|
||||
if(ECD_LOOSE)
|
||||
state = ECD_BOLTED
|
||||
playsound(get_turf(src), W.usesound, 75, TRUE)
|
||||
W.play_tool_sound(get_turf(src), 75)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] secures \the [src] to the floor."), \
|
||||
SPAN_NOTICE("You secure \the [src]'s external reinforcing bolts to the floor."), \
|
||||
SPAN_WARNING("You hear a ratcheting noise."))
|
||||
anchored = TRUE
|
||||
if(ECD_BOLTED)
|
||||
state = ECD_LOOSE
|
||||
playsound(get_turf(src), W.usesound, 75, TRUE)
|
||||
W.play_tool_sound(get_turf(src), 75)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] unsecures \the [src]'s reinforcing bolts from the floor."), \
|
||||
SPAN_NOTICE("You undo \the [src]'s external reinforcing bolts."), \
|
||||
SPAN_WARNING("You hear a ratcheting noise."))
|
||||
|
||||
@@ -410,33 +410,33 @@
|
||||
else if(attacking_item.isscrewdriver() && canbemoved)
|
||||
if(screwed)
|
||||
to_chat(user, SPAN_NOTICE("You start to unscrew \the [src] from the floor..."))
|
||||
playsound(loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
if (do_after(user, 10/attacking_item.toolspeed SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
to_chat(user, SPAN_NOTICE("You unscrew the locker!"))
|
||||
playsound(loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
screwed = FALSE
|
||||
else if(!screwed && wrenched)
|
||||
to_chat(user, SPAN_NOTICE("You start to screw the \the [src] to the floor..."))
|
||||
playsound(src, 'sound/items/Welder.ogg', 80, 1)
|
||||
if (do_after(user, 15/attacking_item.toolspeed SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
to_chat(user, SPAN_NOTICE("You screw \the [src]!"))
|
||||
playsound(loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
screwed = TRUE
|
||||
else if(attacking_item.iswrench() && canbemoved)
|
||||
if(wrenched && !screwed)
|
||||
to_chat(user, SPAN_NOTICE("You start to unfasten the bolts holding \the [src] in place..."))
|
||||
playsound(loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
if (do_after(user, 15/attacking_item.toolspeed SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
to_chat(user, SPAN_NOTICE("You unfasten \the [src]'s bolts!"))
|
||||
playsound(loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
wrenched = FALSE
|
||||
anchored = FALSE
|
||||
else if(!wrenched)
|
||||
to_chat(user, SPAN_NOTICE("You start to fasten the bolts holding the locker in place..."))
|
||||
playsound(loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
if (do_after(user, 15/attacking_item.toolspeed SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
to_chat(user, SPAN_NOTICE("You fasten the \the [src]'s bolts!"))
|
||||
playsound(loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
wrenched = TRUE
|
||||
anchored = TRUE
|
||||
else if(istype(attacking_item, /obj/item/device/hand_labeler))
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(C != src && C.anchored) //Can't secure more than one curtain in a tile
|
||||
to_chat(user, "There is already a curtain secured here!")
|
||||
return
|
||||
playsound(src.loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
visible_message(SPAN_NOTICE("\The [src] has been [anchored ? "secured in place" : "unsecured"] by \the [user]."))
|
||||
|
||||
/obj/structure/curtain/proc/toggle()
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
return
|
||||
if(WT.use(0, user))
|
||||
to_chat(user, SPAN_NOTICE("You use \the [WT] to weld apart \the [src]."))
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
WT.play_tool_sound(get_turf(src), 50)
|
||||
new /obj/item/stack/material/steel(get_turf(src), 4)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
to_chat(user, "<span class='notice'>You unsecured the support struts!</span>")
|
||||
state = 1
|
||||
else if(anchored && !reinf_material)
|
||||
playsound(src.loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
reinforcing = !reinforcing
|
||||
to_chat(user, "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>")
|
||||
return
|
||||
|
||||
@@ -203,7 +203,11 @@
|
||||
spill()
|
||||
|
||||
if(user)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
|
||||
if(iswelder(I))
|
||||
var/obj/item/welder = I
|
||||
welder.play_tool_sound(get_turf(src), 50)
|
||||
|
||||
user.visible_message("<b>[user]</b> starts taking apart the [src]...", SPAN_NOTICE("You start disassembling the [src]..."))
|
||||
if (!do_after(user, 30, do_flags = DO_DEFAULT & ~DO_USER_SAME_HAND))
|
||||
return
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
return
|
||||
// Wrench Open
|
||||
else
|
||||
playsound(get_turf(src), attacking_item.usesound, 50, TRUE)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
if(density)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] wrenches \the [src] open."), SPAN_NOTICE("You wrench \the [src] open."))
|
||||
density = FALSE
|
||||
@@ -260,7 +260,7 @@
|
||||
if(health >= maxhealth)
|
||||
to_chat(user, SPAN_WARNING("\The [src] does not need repairs."))
|
||||
return
|
||||
playsound(get_turf(src), attacking_item.usesound, 50, TRUE)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
if(do_after(user, 20, src))
|
||||
if(health >= maxhealth)
|
||||
return
|
||||
@@ -274,7 +274,7 @@
|
||||
to_chat(user, SPAN_NOTICE("You need to wrench \the [src] from back into place first."))
|
||||
return
|
||||
user.visible_message(anchored ? "<span class='notice'>\The [user] begins unscrewing \the [src].</span>" : "<span class='notice'>\The [user] begins fastening \the [src].</span>" )
|
||||
playsound(get_turf(src), attacking_item.usesound, 75, TRUE)
|
||||
attacking_item.play_tool_sound(get_turf(src), 75)
|
||||
if(do_after(user, 10, src) && density)
|
||||
to_chat(user, (anchored ? "<span class='notice'>You have unfastened \the [src] from the floor.</span>" : "<span class='notice'>You have fastened \the [src] to the floor.</span>"))
|
||||
anchored = !anchored
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
/obj/structure/metronome/attackby(obj/item/attacking_item, mob/user)
|
||||
if(attacking_item.iswrench())
|
||||
playsound(src.loc, attacking_item.usesound, 50, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 50)
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You unanchor \the [src] and it destabilizes.</span>")
|
||||
STOP_PROCESSING(SSfast_process, src)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
/obj/machinery/shower/Initialize()
|
||||
. = ..()
|
||||
create_reagents(2)
|
||||
soundloop = new(list(src), FALSE)
|
||||
soundloop = new(src, FALSE)
|
||||
|
||||
/obj/machinery/shower/Destroy()
|
||||
QDEL_NULL(soundloop)
|
||||
|
||||
@@ -265,24 +265,24 @@
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
update_nearby_icons()
|
||||
playsound(loc, attacking_item.usesound, 75, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 75)
|
||||
to_chat(user, (state == 1 ? SPAN_NOTICE("You have unfastened the window from the frame.") : SPAN_NOTICE("You have fastened the window to the frame.")))
|
||||
else if(reinf && state == 0)
|
||||
anchored = !anchored
|
||||
update_icon()
|
||||
update_nearby_icons()
|
||||
playsound(loc, attacking_item.usesound, 75, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 75)
|
||||
to_chat(user, (anchored ? SPAN_NOTICE("You have fastened the frame to the floor.") : SPAN_NOTICE("You have unfastened the frame from the floor.")))
|
||||
else if(!reinf)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
playsound(loc, attacking_item.usesound, 75, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 75)
|
||||
to_chat(user, (anchored ? SPAN_NOTICE("You have fastened the window to the floor.") : SPAN_NOTICE("You have unfastened the window.")))
|
||||
update_icon()
|
||||
update_nearby_icons()
|
||||
else if(attacking_item.iscrowbar() && reinf && state <= 1 && user.a_intent != I_HURT)
|
||||
state = 1 - state
|
||||
playsound(loc, attacking_item.usesound, 75, 1)
|
||||
attacking_item.play_tool_sound(get_turf(src), 75)
|
||||
to_chat(user, (state ? SPAN_NOTICE("You have pried the window into the frame.") : SPAN_NOTICE("You have pried the window out of the frame.")))
|
||||
else if(attacking_item.iswrench() && !anchored && (!state || !reinf) && user.a_intent != I_HURT)
|
||||
if(!glasstype)
|
||||
|
||||
Reference in New Issue
Block a user