mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Tool Sound/Speed (#25529)
* Initial work on tool sounds * Crowbars * playtoolsound() * aaaaaaaaaaaaaaaaaaaa * HERE WE GO AGAIN * Wrench * Screwdriver.ogg REDUX, Cuffs * drilling tools toolspeed is now a multiplier too * Wirecutter
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
/obj/machinery/disposal/compactor/attackby(var/obj/item/I, var/mob/user)
|
||||
add_fingerprint(user)
|
||||
if(I.is_wrench(user)) //We want this to be a high level operation, before any of the place in bin code or disassemble bin code
|
||||
wrenchAnchor(user)
|
||||
wrenchAnchor(user, I)
|
||||
power_change()
|
||||
return
|
||||
if(!emagged && istype(I,/obj/item/weapon/card/emag))
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
/obj/machinery/conveyor/togglePanelOpen(var/obj/item/toggle_item, mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/conveyor/crowbarDestroy(mob/user)
|
||||
/obj/machinery/conveyor/crowbarDestroy(mob/user, obj/item/weapon/crowbar/I)
|
||||
return
|
||||
|
||||
/obj/machinery/conveyor/attackby(obj/item/W, mob/user)
|
||||
@@ -279,10 +279,10 @@
|
||||
return
|
||||
if(!isturf(over_location) || !Adjacent(user))
|
||||
return
|
||||
var/obj/O = user.get_active_hand()
|
||||
var/obj/item/O = user.get_active_hand()
|
||||
if(iscrowbar(O))
|
||||
update_dir(get_dir(src, over_location))
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 25, 1)
|
||||
O.playtoolsound(src, 25)
|
||||
to_chat(user, "You change the direction of \the [src] using \the [O].")
|
||||
return
|
||||
return ..()
|
||||
@@ -533,7 +533,7 @@
|
||||
return .
|
||||
if(W.is_wrench(user))
|
||||
to_chat(user, "<span class='notice'>Deconstructing \the [src]...</span>")
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
W.playtoolsound(src, 100)
|
||||
if(do_after(user, src,50))
|
||||
to_chat(user, "<span class='notice'>You disassemble \the [src].</span>")
|
||||
var/turf/T=get_turf(src)
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
/obj/structure/conveyor_assembly/attackby(obj/item/P, mob/user)
|
||||
if(iscrowbar(P))
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
P.playtoolsound(src, 75)
|
||||
if(do_after(user, src, 10))
|
||||
to_chat(user, "<span class='notice'>You unhinge the frame.</span>")
|
||||
getFromPool(/obj/item/stack/conveyor_assembly, src.loc)
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
else
|
||||
setDensity(TRUE)
|
||||
to_chat(user, "You detach the [nicetype] from the underfloor.")
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
I.playtoolsound(src, 100)
|
||||
update()
|
||||
return
|
||||
else
|
||||
@@ -231,7 +231,7 @@
|
||||
else
|
||||
setDensity(TRUE) // We don't want disposal bins or outlets to go density 0
|
||||
to_chat(user, "You attach the [nicetype] to the underfloor.")
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
I.playtoolsound(src, 100)
|
||||
update()
|
||||
|
||||
else if(iswelder(I))
|
||||
|
||||
@@ -107,12 +107,12 @@
|
||||
return
|
||||
if(mode==0) // It's off but still not unscrewed
|
||||
mode=-1 // Set it to doubleoff l0l
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
I.playtoolsound(src, 50)
|
||||
to_chat(user, "You remove the screws around the power connection.")
|
||||
return
|
||||
else if(mode==-1)
|
||||
mode=0
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
I.playtoolsound(src, 50)
|
||||
to_chat(user, "You attach the screws around the power connection.")
|
||||
return
|
||||
else if(iswelder(I) && mode==-1)
|
||||
@@ -1596,12 +1596,12 @@
|
||||
if(I.is_screwdriver(user))
|
||||
if(mode==0)
|
||||
mode=1
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
I.playtoolsound(src, 50)
|
||||
to_chat(user, "You remove the screws around the power connection.")
|
||||
return
|
||||
else if(mode==1)
|
||||
mode=0
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
I.playtoolsound(src, 50)
|
||||
to_chat(user, "You attach the screws around the power connection.")
|
||||
return
|
||||
else if(iswelder(I) && mode==1)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
if(W.is_screwdriver(user))
|
||||
panel = !panel
|
||||
to_chat(user, "<span class='notify'>You [panel ? "open" : "close"] the panel on \the [src].</span>")
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
W.playtoolsound(src, 50)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
@@ -202,12 +202,12 @@
|
||||
if(I.is_screwdriver(user))
|
||||
if(c_mode==0)
|
||||
c_mode=1
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
I.playtoolsound(src, 50)
|
||||
to_chat(user, "You remove the screws around the power connection.")
|
||||
return
|
||||
else if(c_mode==1)
|
||||
c_mode=0
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
I.playtoolsound(src, 50)
|
||||
to_chat(user, "You attach the screws around the power connection.")
|
||||
return
|
||||
else if(iswelder(I) && c_mode==1)
|
||||
|
||||
Reference in New Issue
Block a user