Implement usesound/toolspeed

This commit is contained in:
Markolie
2017-03-07 16:46:28 +01:00
parent 3b73053bc4
commit 3aa1399995
179 changed files with 875 additions and 764 deletions
@@ -13,7 +13,7 @@
var/lastbang
var/cutting_tool = /obj/item/weapon/weldingtool
var/sound = 'sound/machines/click.ogg'
var/cutting_sound = 'sound/items/Welder.ogg'
var/cutting_sound
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
var/material_drop = /obj/item/stack/sheet/metal
var/material_drop_amount = 2
@@ -193,10 +193,10 @@
L[tmpname] = R
var/desc = input("Please select a telepad.", "RCS") in L
E.pad = L[desc]
playsound(E.loc, 'sound/machines/click.ogg', 50, 1)
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "\blue Teleporting [name]...")
E.teleporting = 1
if(!do_after(user, 50, target = src))
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
@@ -215,10 +215,10 @@
E.rand_x = rand(50,200)
E.rand_y = rand(50,200)
var/L = locate(E.rand_x, E.rand_y, 6)
playsound(E.loc, 'sound/machines/click.ogg', 50, 1)
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "\blue Teleporting [name]...")
E.teleporting = 1
if(!do_after(user, 50, target = src))
if(!do_after(user, 50, E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
@@ -248,11 +248,11 @@
if(!WT.remove_fuel(0, user))
return
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
playsound(loc, cutting_sound, 40, 1)
if(do_after(user, 40, 1, target = src))
playsound(loc, cutting_sound ? cutting_sound : WT.usesound, 40, 1)
if(do_after(user, 40 * WT.toolspeed, 1, target = src))
if(!opened || !WT.isOn())
return
playsound(loc, cutting_sound, 50, 1)
playsound(loc, cutting_sound ? cutting_sound : WT.usesound, 50, 1)
visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
"<span class='italics'>You hear welding.</span>")
@@ -25,7 +25,7 @@
if(istype(O, /obj/item/device/multitool))
to_chat(user, "\red Resetting circuitry...")
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
if(do_after(user, 20, target = src))
if(do_after(user, 20 * O.toolspeed, target = src))
src.locked = 0
to_chat(user, "<span class = 'caution'> You disable the locking modules.</span>")
update_icon()
@@ -89,7 +89,7 @@
src.locked = 1
to_chat(user, "\blue You re-enable the locking modules.")
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user,20, target = src))
if(do_after(user, 20 * O.toolspeed, target = src))
src.locked = 1
to_chat(user, "<span class = 'caution'> You re-enable the locking modules.</span>")
return
@@ -102,10 +102,10 @@
L[tmpname] = R
var/desc = input("Please select a telepad.", "RCS") in L
E.pad = L[desc]
playsound(E.loc, 'sound/machines/click.ogg', 50, 1)
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "\blue Teleporting [src.name]...")
E.teleporting = 1
if(!do_after(user, 50, target = src))
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
@@ -120,10 +120,10 @@
E.rand_x = rand(50,200)
E.rand_y = rand(50,200)
var/L = locate(E.rand_x, E.rand_y, 6)
playsound(E.loc, 'sound/machines/click.ogg', 50, 1)
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "\blue Teleporting [src.name]...")
E.teleporting = 1
if(!do_after(user, 50, target = src))
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
@@ -166,7 +166,7 @@
else if(istype(W, /obj/item/weapon/wirecutters))
if(rigged)
to_chat(user, "<span class='notice'>You cut away the wiring.</span>")
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
rigged = 0
return
else return attack_hand(user)
+6 -6
View File
@@ -33,14 +33,14 @@ var/global/list/captain_display_cases = list()
circuit.forceMove(src)
state++
to_chat(user, "<span class='notice'>You add the airlock electronics to the frame.</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src),W.usesound, 50, 1)
if(istype(W, /obj/item/weapon/crowbar))
new /obj/machinery/constructable_frame/machine_frame(T)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(T)
G.amount = 5
qdel(src)
to_chat(user, "<span class='notice'>You pry the glass out of the frame.</span>")
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
return
if(DISPLAYCASE_FRAME_SCREWDRIVER)
@@ -54,7 +54,7 @@ var/global/list/captain_display_cases = list()
C.req_one_access = null
if(isprox(sensor))
C.burglar_alarm = 1
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
qdel(src)
return
if(istype(W, /obj/item/weapon/crowbar))
@@ -65,13 +65,13 @@ var/global/list/captain_display_cases = list()
sensor = null
state--
to_chat(user, "<span class='notice'>You pry the electronics out of the frame.</span>")
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
if(isprox(W) && !isprox(sensor))
user.drop_item()
sensor = W
sensor.forceMove(src)
to_chat(user, "<span class='notice'>You add the proximity sensor to the frame.</span>")
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
if(pstate != state)
pstate = state
@@ -227,7 +227,7 @@ var/global/list/captain_display_cases = list()
"You pry \the [src] apart.", \
"You hear something pop.")
var/turf/T = get_turf(src)
playsound(T, 'sound/items/Crowbar.ogg', 50, 1)
playsound(T, W.usesound, 50, 1)
dump()
var/obj/item/weapon/airlock_electronics/C = circuit
if(!C)
+19 -19
View File
@@ -166,10 +166,10 @@
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src.loc, WT.usesound, 50, 1)
if(istext(glass))
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "\blue You welded the [glass] plating off!")
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
@@ -177,14 +177,14 @@
glass = 0
else if(glass == 1)
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "\blue You welded the glass panel out!")
new /obj/item/stack/sheet/rglass(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "\blue You dissasembled the airlock assembly!")
new /obj/item/stack/sheet/metal(src.loc, 4)
@@ -194,13 +194,13 @@
return
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
if(anchored)
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
else
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You [anchored? "un" : ""]secured the airlock assembly!")
anchored = !anchored
@@ -208,29 +208,29 @@
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
var/obj/item/stack/cable_coil/coil = W
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * coil.toolspeed, target = src))
if(!src) return
coil.use(1)
src.state = 1
to_chat(user, "\blue You wire the Airlock!")
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You cut the airlock wires.!")
new/obj/item/stack/cable_coil(src.loc, 1)
src.state = 0
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
user.drop_item()
W.loc = src
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You installed the airlock electronics!")
src.state = 2
@@ -240,10 +240,10 @@
W.loc = src.loc
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You removed the airlock electronics!")
src.state = 1
@@ -261,27 +261,27 @@
if(S)
if(S.amount>=1)
if(istype(S, /obj/item/stack/sheet/rglass))
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src.loc, S.usesound, 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * S.toolspeed, target = src))
to_chat(user, "\blue You installed reinforced glass windows into the airlock assembly!")
S.use(1)
glass = 1
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
var/M = S.sheettype
if(S.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src.loc, S.usesound, 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * S.toolspeed, target = src))
to_chat(user, "\blue You installed [M] plating into the airlock assembly!")
S.use(2)
glass = "[M]"
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "\blue Now finishing the airlock.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You finish the airlock!")
var/path
@@ -24,7 +24,7 @@
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(loc)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
C.dir = dir
part.loc = loc
part.master = null
+2 -2
View File
@@ -81,14 +81,14 @@
to_chat(user, fail_msg)
else if(istype(I, /obj/item/weapon/wrench))
if(!anchored && !isinspace())
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
"You hear ratchet.")
anchored = 1
else if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
+2 -2
View File
@@ -56,14 +56,14 @@
to_chat(user, fail_msg)
else if(istype(I, /obj/item/weapon/wrench))
if(!anchored && !isinspace())
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
"You hear ratchet.")
anchored = 1
else if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
+18 -16
View File
@@ -32,25 +32,26 @@
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench) && state == 0)
if(anchored && !istype(src,/obj/structure/girder/displaced))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "\blue Now disassembling the girder")
if(do_after(user,40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You dissasembled the girder!")
refundMetal(metalUsed)
qdel(src)
else if(!anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "\blue Now securing the girder")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
to_chat(user, "\blue You secured the girder!")
new/obj/structure/girder( src.loc )
qdel(src)
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
to_chat(user, "\blue Now slicing apart the girder")
if(do_after(user,30, target = src))
if(do_after(user, 30 * W.toolspeed, target = src))
if(!src) return
playsound(loc, W.usesound, 100, 1)
to_chat(user, "\blue You slice apart the girder!")
refundMetal(metalUsed)
qdel(src)
@@ -61,32 +62,32 @@
qdel(src)
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
playsound(src.loc, 'sound/weapons/sonic_jackhammer.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You Disintegrate the girder!</span>")
refundMetal(metalUsed)
qdel(src)
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "\blue Now unsecuring support struts")
if(do_after(user,40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You unsecured the support struts!")
state = 1
else if(istype(W, /obj/item/weapon/wirecutters) && istype(src,/obj/structure/girder/reinforced) && state == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "\blue Now removing support struts")
if(do_after(user,40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You removed the support struts!")
new/obj/structure/girder( src.loc )
qdel(src)
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored )
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
to_chat(user, "\blue Now dislodging the girder")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You dislodged the girder!")
new/obj/structure/girder/displaced( src.loc )
@@ -107,7 +108,7 @@
else
if(S.amount < 2) return ..()
to_chat(user, "\blue Now adding plating...")
if(do_after(user,40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src || !S || S.amount < 2) return
S.use(2)
to_chat(user, "\blue You added the plating!")
@@ -240,15 +241,16 @@
/obj/structure/cultgirder/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
to_chat(user, "\blue Now disassembling the girder")
if(do_after(user,40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
to_chat(user, "\blue You dissasembled the girder!")
dismantle()
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
to_chat(user, "\blue Now slicing apart the girder")
if(do_after(user,30, target = src))
if(do_after(user, 30 * W.toolspeed, target = src))
playsound(loc, W.usesound, 100, 1)
to_chat(user, "\blue You slice apart the girder!")
dismantle()
+3 -3
View File
@@ -141,7 +141,7 @@
user.changeNext_move(CLICK_CD_MELEE)
if(iswirecutter(W))
if(!shock(user, 100))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
if(!destroyed)
new /obj/item/stack/rods(loc, 2)
else
@@ -149,7 +149,7 @@
qdel(src)
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
anchored = !anchored
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the grille.</span>", \
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
@@ -180,7 +180,7 @@
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
return
to_chat(user, "<span class='notice'>You start placing the window.</span>")
if(do_after(user,20, target = src))
if(do_after(user, 20 * W.toolspeed, target = src))
if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
+3 -3
View File
@@ -85,20 +85,20 @@
to_chat(user, "<span class='notice'>[src] can't hold any more signs.</span>")
else if(istype(I, /obj/item/weapon/crowbar))
user.visible_message("<span class='warning'>[user] begins to empty the contents of [src].</span>")
if(do_after(user, 30, target = src))
if(do_after(user, 30 * I.toolspeed, target = src))
to_chat(usr, "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>")
reagents.reaction(src.loc)
src.reagents.clear_reagents()
else if(istype(I, /obj/item/weapon/wrench))
if(!anchored && !isinspace())
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
"You hear ratchet.")
anchored = 1
else if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
@@ -43,8 +43,8 @@
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if(istype(G, /obj/item/weapon/crowbar))
if(!buckled_mob)
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
if(do_after(user, 20, target = src))
playsound(loc, G.usesound, 100, 1)
if(do_after(user, 20 * G.toolspeed, target = src))
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
new /obj/item/stack/rods(loc, 4)
new /obj/structure/kitchenspike_frame(loc)
@@ -115,7 +115,7 @@
if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
to_chat(user, "You start digging the [name].")
if(do_after(user,digTool.digspeed*hardness, target = src) && src)
if(do_after(user,digTool.digspeed * hardness, target = src) && src)
to_chat(user, "You finished digging.")
Dismantle()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
+6 -4
View File
@@ -27,6 +27,7 @@
"The tray contains a body that might be responsive."
)
anchored = 1.0
var/open_sound = 'sound/items/Deconstruct.ogg'
/obj/structure/morgue/initialize()
. = ..()
@@ -100,11 +101,11 @@
for(var/atom/movable/A as mob|obj in connected.loc)
if(!( A.anchored ))
A.forceMove(src)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, open_sound, 50, 1)
qdel(connected)
connected = null
else
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, open_sound, 50, 1)
connected = new /obj/structure/m_tray( loc )
step(connected, dir)
connected.layer = OBJ_LAYER
@@ -258,6 +259,7 @@
var/cremating = 0
var/id = 1
var/locked = 0
var/open_sound = 'sound/items/Deconstruct.ogg'
/obj/structure/crematorium/proc/update()
if(connected)
@@ -305,11 +307,11 @@
for(var/atom/movable/A as mob|obj in connected.loc)
if(!( A.anchored ))
A.forceMove(src)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, open_sound, 50, 1)
qdel(connected)
connected = null
else if(locked == 0)
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, open_sound, 50, 1)
connected = new /obj/structure/c_tray( loc )
step(connected, SOUTH)
connected.layer = OBJ_LAYER
+4 -4
View File
@@ -307,18 +307,18 @@
/obj/structure/piano/attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/weapon/wrench))
if(!anchored && !isinspace())
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, O.usesound, 50, 1)
to_chat(user, "<span class='notice'> You begin to tighten \the [src] to the floor...</span>")
if(do_after(user, 20, target = src))
if(do_after(user, 20 * O.toolspeed, target = src))
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'> You have tightened \the [src]'s casters. Now it can be played again.</span>", \
"You hear ratchet.")
anchored = 1
else if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, O.usesound, 50, 1)
to_chat(user, "<span class='notice'> You begin to loosen \the [src]'s casters...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * O.toolspeed, target = src))
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'> You have loosened \the [src]. Now it can be pulled somewhere else.</span>", \
+9 -9
View File
@@ -14,10 +14,10 @@
user.changeNext_move(CLICK_CD_MELEE)
if(iswrench(W))
if(anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] is loosening the [name]'s bolts.", \
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!loc || !anchored)
return
user.visible_message("[user] loosened the [name]'s bolts!", \
@@ -27,10 +27,10 @@
if(!isfloorturf(loc))
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
return
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] is securing the [name]'s bolts...", \
"<span class='notice'>You are securing the [name]'s bolts...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!loc || anchored)
return
user.visible_message("[user] has secured the [name]'s bolts.", \
@@ -38,10 +38,10 @@
anchored = 1
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
playsound(src, 'sound/items/Welder.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] is slicing apart the [name]...", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!loc)
return
user.visible_message("[user] slices apart the [name].", \
@@ -58,13 +58,13 @@
qdel(src)
else if(iswelder(W) && !anchored)
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
playsound(loc, W.usesound, 40, 1)
user.visible_message("[user] is slicing apart the [name].", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!loc)
return
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
user.visible_message("[user] slices apart the [name].", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(TRUE)
@@ -32,7 +32,7 @@
return
user.drop_item()
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
E.dir = dir
E.part = SK
SK.loc = E
@@ -99,7 +99,7 @@
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
@@ -161,7 +161,7 @@
/obj/structure/stool/bed/chair/comfy/attackby(obj/item/weapon/W, mob/user, params)
if(iswrench(W))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/metal(get_turf(src))
new /obj/item/stack/sheet/metal(get_turf(src))
qdel(src)
@@ -29,10 +29,9 @@
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
qdel(src)
return
/obj/structure/stool/MouseDrop(atom/over_object, src_location, over_location, src_control, over_control, params, skip_fucking_stool_shit = 0)
if(skip_fucking_stool_shit)
+14 -14
View File
@@ -227,9 +227,9 @@
if(istype(W, /obj/item/weapon/wrench))
user.visible_message("<span class='notice'>[user] is disassembling \a [src].</span>", "<span class='notice'>You start disassembling \the [src].</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 50, target = src))
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(loc, W.usesound, 50, 1)
if(do_after(user, 50 * W.toolspeed, target = src))
playsound(loc, W.usesound, 50, 1)
destroy()
return
@@ -240,7 +240,7 @@
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 4))
O.show_message("\blue The [src] was sliced apart by [user]!", 1, "\red You hear [src] coming apart.", 2)
@@ -421,10 +421,10 @@
var/obj/item/stack/sheet/glass/G = I
if(G.amount >= 2)
to_chat(user, "<span class='notice'>You start to add the glass to \the [src].</span>")
if(do_after(user, 10, target = src))
if(do_after(user, 10 * G.toolspeed, target = src))
G.use(2)
to_chat(user, "<span class='notice'>You add the glass to \the [src].</span>")
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
playsound(get_turf(src), G.usesound, 50, 1)
new /obj/structure/table/glass(loc)
qdel(src)
else
@@ -433,9 +433,9 @@
if(iswrench(I))
to_chat(user, "<span class='notice'>You start to deconstruct \the [src].</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
if(do_after(user, 10, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
playsound(src.loc, I.usesound, 75, 1)
if(do_after(user, 10 * I.toolspeed, target = src))
playsound(src.loc, I.usesound, 75, 1)
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
new /obj/item/stack/sheet/metal(loc)
new /obj/item/stack/sheet/metal(loc)
@@ -495,15 +495,15 @@
if(WT.remove_fuel(0, user))
if(src.status == 2)
to_chat(user, "\blue Now weakening the reinforced table")
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 50, target = src))
playsound(src.loc, WT.usesound, 50, 1)
if(do_after(user, 50 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "\blue Table weakened")
src.status = 1
else
to_chat(user, "\blue Now strengthening the reinforced table")
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 50, target = src))
playsound(src.loc, WT.usesound, 50, 1)
if(do_after(user, 50 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "\blue Table strengthened")
src.status = 2
@@ -586,7 +586,7 @@
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
new /obj/item/weapon/rack_parts( src.loc )
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
qdel(src)
return
if(isrobot(user))
+1 -1
View File
@@ -52,7 +52,7 @@
if(istype(I, /obj/item/weapon/crowbar))
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...</span>")
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30, target = src))
if(do_after(user, 30 * I.toolspeed, target = src))
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "<span class='italics'>You hear grinding porcelain.</span>")
cistern = !cistern
update_icon()
@@ -78,9 +78,9 @@ obj/structure/windoor_assembly/Destroy()
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
user.visible_message("<span class='warning'>[user] dissassembles the windoor assembly.</span>", "<span class='notice'>You start to dissassemble the windoor assembly.</span>")
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src.loc, WT.usesound, 50, 1)
if(do_after(user, 40, target = src))
if(do_after(user, 40 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You dissasembled the windoor assembly!</span>")
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
@@ -98,10 +98,10 @@ obj/structure/windoor_assembly/Destroy()
if(WD.dir == src.dir)
to_chat(user, "<span class='warning'>There is already a windoor in that location.</span>")
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src || src.anchored)
return
for(var/obj/machinery/door/window/WD in src.loc)
@@ -117,10 +117,10 @@ obj/structure/windoor_assembly/Destroy()
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
else if(istype(W, /obj/item/weapon/wrench) && anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, W.usesound, 100, 1)
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src || !src.anchored)
return
to_chat(user, "<span class='notice'>You've unsecured the windoor assembly!</span>")
@@ -138,9 +138,10 @@ obj/structure/windoor_assembly/Destroy()
return
to_chat(user, "<span class='notice'>You start to reinforce the windoor with plasteel.</span>")
if(do_after(user,40, target = src))
if(do_after(user, 40 * P.toolspeed, target = src))
if(!src || secure)
return
playsound(loc, P.usesound, 100, 1)
P.use(2)
to_chat(user, "<span class='notice'>You reinforce the windoor.</span>")
@@ -154,12 +155,13 @@ obj/structure/windoor_assembly/Destroy()
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src || !src.anchored || src.state != "01")
return
var/obj/item/stack/cable_coil/CC = W
CC.use(1)
to_chat(user, "<span class='notice'>You wire the windoor!</span>")
playsound(loc, CC.usesound, 100, 1)
src.state = "02"
if(src.secure)
src.name = "secure wired windoor assembly"
@@ -172,10 +174,10 @@ obj/structure/windoor_assembly/Destroy()
//Removing wire from the assembly. Step 5 undone.
if(istype(W, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src || src.state != "02")
return
@@ -189,12 +191,12 @@ obj/structure/windoor_assembly/Destroy()
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/airlock_electronics))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
user.drop_item()
W.loc = src
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src || src.electronics)
W.loc = src.loc
return
@@ -209,10 +211,10 @@ obj/structure/windoor_assembly/Destroy()
if(!electronics)
return
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src || !electronics)
return
to_chat(user, "<span class='notice'>You've removed the airlock electronics!</span>")
@@ -239,10 +241,10 @@ obj/structure/windoor_assembly/Destroy()
to_chat(usr, "<span class='danger'>The assembly is missing electronics.</span>")
return
usr << browse(null, "window=windoor_access")
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
if(do_after(user, 40, target = src))
if(do_after(user, 40 * W.toolspeed, target = src))
if(src.loc && src.electronics)
+5 -5
View File
@@ -212,24 +212,24 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
if(istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(loc, W.usesound, 75, 1)
to_chat(user, (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>"))
else if(reinf && state == 0)
anchored = !anchored
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(loc, W.usesound, 75, 1)
to_chat(user, (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>"))
else if(!reinf)
anchored = !anchored
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(loc, W.usesound, 75, 1)
to_chat(user, (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>"))
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
state = 1 - state
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
playsound(loc, W.usesound, 75, 1)
to_chat(user, (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>"))
else if(istype(W, /obj/item/weapon/wrench) && !anchored && health > 7) //Disassemble deconstructed window into parts
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
for(var/i=0;i<sheets;i++)
var/obj/item/stack/sheet/glass/NG = new glasstype(src.loc)
for(var/obj/item/stack/sheet/glass/G in src.loc) //Stack em up