diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 47c5689054c..0fe1a291b31 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -170,13 +170,13 @@ Pipelines + Other Objects -> Pipe network var/unsafe_wrenching = FALSE var/internal_pressure = int_air.return_pressure()-env_air.return_pressure() - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) to_chat(user, "You begin to unfasten \the [src]...") if(internal_pressure > 2*ONE_ATMOSPHERE) to_chat(user, "As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?") unsafe_wrenching = TRUE //Oh dear oh dear - if(do_after(user, 40, target = src) && isnull(gcDestroyed)) + if(do_after(user, 40 * W.toolspeed, target = src) && isnull(gcDestroyed)) user.visible_message( \ "[user] unfastens \the [src].", \ "You have unfastened \the [src].", \ diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index 2eca090d086..a247d6f93a3 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -107,9 +107,9 @@ to_chat(user, "You cannot unwrench [src], it is too exerted due to internal pressure.") add_fingerprint(user) return 1 - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You begin to unfasten \the [src]...") - if(do_after(user, 40, target = src)) + if(do_after(user, 40 * W.toolspeed, target = src)) user.visible_message( \ "[user] unfastens \the [src].", \ "You have unfastened \the [src].", \ diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index a2ba4429ffa..eabeccb641f 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -325,9 +325,9 @@ var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) to_chat(user, "Now welding the vent.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return - playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) + playsound(src.loc, WT.usesound, 50, 1) if(!welded) user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.") welded = 1 @@ -345,13 +345,15 @@ if(istype(W, /obj/item/weapon/screwdriver)) if(!welded) if(open) - to_chat(user, " Now closing the vent.") - if(do_after(user, 20, target = src)) + to_chat(user, "Now closing the vent.") + if(do_after(user, 20 * W.toolspeed, target = src)) + playsound(loc, W.usesound, 100, 1) open = 0 user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.") else - to_chat(user, " Now opening the vent.") - if(do_after(user, 20, target = src)) + to_chat(user, "Now opening the vent.") + if(do_after(user, 20 * W.toolspeed, target = src)) + playsound(loc, W.usesound, 100, 1) open = 1 user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.") return diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index 5554723c945..6747b103972 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -375,9 +375,9 @@ var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) to_chat(user, "Now welding the scrubber.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return - playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1) + playsound(get_turf(src), WT.usesound, 50, 1) if(!welded) user.visible_message("[user] welds the scrubber shut.", "You weld the vent scrubber.", "You hear welding.") welded = 1 diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index 0a17435c5c0..04054c17632 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -46,17 +46,20 @@ if(istype(used_atom, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/W = used_atom if(W.remove_fuel(0, user)) - playsound(holder, 'sound/items/Welder2.ogg', 50, 1) + playsound(holder, W.usesound, 50, 1) else return 0 else if(istype(used_atom, /obj/item/weapon/wrench)) - playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) + var/obj/item/weapon/wrench/W = used_atom + playsound(holder, W.usesound, 50, 1) else if(istype(used_atom, /obj/item/weapon/screwdriver)) - playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) + var/obj/item/weapon/screwdriver/S = used_atom + playsound(holder, S.usesound, 50, 1) else if(istype(used_atom, /obj/item/weapon/wirecutters)) - playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) + var/obj/item/weapon/wirecutters/W = used_atom + playsound(holder, W.usesound, 50, 1) else if(istype(used_atom, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = used_atom @@ -65,7 +68,7 @@ return 0 else C.use(4) - playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(holder, C.usesound, 50, 1) else if(istype(used_atom, /obj/item/stack)) var/obj/item/stack/S = used_atom if(S.amount < 5) diff --git a/code/datums/spells/conjure.dm b/code/datums/spells/conjure.dm index 75ca13ad522..ebf9fa59fe8 100644 --- a/code/datums/spells/conjure.dm +++ b/code/datums/spells/conjure.dm @@ -23,7 +23,7 @@ targets -= T playsound(get_turf(src), cast_sound, 50, 1) - if(do_after(user,delay, target = user)) + if(do_after(user, delay, target = user)) for(var/i=0,i 0) data["wires"] = W @@ -99,44 +99,53 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", /datum/wires/nano_host() return holder + +/datum/wires/proc/can_see_wire_index(mob/user) + if(user.can_admin_interact()) + return TRUE + else if(istype(user.get_active_hand(), /obj/item/device/multitool)) + var/obj/item/device/multitool/M = user.get_active_hand() + if(M.shows_wire_information) + return TRUE + + return FALSE /datum/wires/Topic(href, href_list) if(..()) return 1 - if(in_range(holder, usr) && isliving(usr)) - - var/mob/living/L = usr - if(CanUse(L) && href_list["action"]) - var/obj/item/I = L.get_active_hand() - var/colour = lowertext(href_list["wire"]) - holder.add_hiddenprint(L) - switch(href_list["action"]) - if("cut") // Toggles the cut/mend status - if(istype(I, /obj/item/weapon/wirecutters)) - playsound(holder, 'sound/items/Wirecutter.ogg', 20, 1) - CutWireColour(colour) - else - to_chat(L, "You need wirecutters!") - if("pulse") - if(istype(I, /obj/item/device/multitool)) - playsound(holder, 'sound/weapons/empty.ogg', 20, 1) - PulseColour(colour) - else - to_chat(L, "You need a multitool!") - if("attach") - if(IsAttached(colour)) - var/obj/item/O = Detach(colour) - if(O) - L.put_in_hands(O) - else - if(istype(I, /obj/item/device/assembly/signaler)) - if(L.drop_item()) - Attach(colour, I) - else - to_chat(L, "[L.get_active_hand()] is stuck to your hand!") + var/mob/L = usr + if(CanUse(L) && href_list["action"]) + var/obj/item/I = L.get_active_hand() + var/colour = lowertext(href_list["wire"]) + holder.add_hiddenprint(L) + switch(href_list["action"]) + if("cut") // Toggles the cut/mend status + if(istype(I, /obj/item/weapon/wirecutters) || L.can_admin_interact()) + if(istype(I)) + playsound(holder, I.usesound, 20, 1) + CutWireColour(colour) + else + to_chat(L, "You need wirecutters!") + if("pulse") + if(istype(I, /obj/item/device/multitool) || L.can_admin_interact()) + playsound(holder, 'sound/weapons/empty.ogg', 20, 1) + PulseColour(colour) + else + to_chat(L, "You need a multitool!") + if("attach") + if(IsAttached(colour)) + var/obj/item/O = Detach(colour) + if(O) + L.put_in_hands(O) + else + if(istype(I, /obj/item/device/assembly/signaler)) + if(L.drop_item()) + Attach(colour, I) else - to_chat(L, "You need a remote signaller!") + to_chat(L, "[L.get_active_hand()] is stuck to your hand!") + else + to_chat(L, "You need a remote signaller!") nanomanager.update_uis(src) return 1 @@ -155,7 +164,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", if(holder) nanomanager.update_uis(holder) -/datum/wires/proc/CanUse(mob/living/L) +/datum/wires/proc/CanUse(mob/L) return 1 /datum/wires/CanUseTopic(mob/user, datum/topic_state/state) @@ -203,6 +212,9 @@ var/const/POWER = 8 return index else CRASH("[colour] is not a key in wires.") + +/datum/wires/proc/GetWireName(index) + return // // Is Index/Colour Cut procs diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm index db86c482f03..ab41b7c24b8 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction.dm @@ -247,9 +247,10 @@ V.flags |= NODROP agent.equip_to_slot_or_del(V, slot_wear_suit) agent.equip_to_slot_or_del(new /obj/item/weapon/abductor_baton(agent), slot_in_backpack) - agent.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/decloner/alien(agent), slot_belt) + agent.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/decloner/alien(agent), slot_in_backpack) agent.equip_to_slot_or_del(new /obj/item/device/abductor/silencer(agent), slot_in_backpack) agent.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/abductor(agent), slot_head) + agent.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/military/abductor/full(agent), slot_belt) agent.update_icons() diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 29f217b44bc..8f026650b7c 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -547,31 +547,37 @@ Congratulations! You are now trained for xenobiology research!"} name = "alien scalpel" icon = 'icons/obj/abductor.dmi' origin_tech = "materials=2;biotech=2;abductor=2" + toolspeed = 0.25 /obj/item/weapon/hemostat/alien name = "alien hemostat" icon = 'icons/obj/abductor.dmi' origin_tech = "materials=2;biotech=2;abductor=2" + toolspeed = 0.25 /obj/item/weapon/retractor/alien name = "alien retractor" icon = 'icons/obj/abductor.dmi' origin_tech = "materials=2;biotech=2;abductor=2" + toolspeed = 0.25 /obj/item/weapon/circular_saw/alien name = "alien saw" icon = 'icons/obj/abductor.dmi' origin_tech = "materials=2;biotech=2;abductor=2" + toolspeed = 0.25 /obj/item/weapon/surgicaldrill/alien name = "alien drill" icon = 'icons/obj/abductor.dmi' origin_tech = "materials=2;biotech=2;abductor=2" + toolspeed = 0.25 /obj/item/weapon/cautery/alien name = "alien cautery" icon = 'icons/obj/abductor.dmi' origin_tech = "materials=2;biotech=2;abductor=2" + toolspeed = 0.25 /obj/item/clothing/head/helmet/abductor name = "agent headgear" @@ -605,9 +611,9 @@ Congratulations! You are now trained for xenobiology research!"} /obj/structure/abductor_tableframe/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/wrench)) to_chat(user, "You start disassembling [src]...") - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 30, target = src)) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) + if(do_after(user, 30 * I.toolspeed, target = src)) + playsound(src.loc, I.usesound, 50, 1) new /obj/item/stack/sheet/mineral/abductor(get_turf(src)) qdel(src) return @@ -617,7 +623,7 @@ Congratulations! You are now trained for xenobiology research!"} to_chat(user, "You need one alien alloy sheet to do this!") return to_chat(user, "You start adding [P] to [src]...") - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * I.toolspeed, target = src)) P.use(1) new /obj/structure/table/abductor(src.loc) qdel(src) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/console.dm b/code/game/gamemodes/miniantags/abduction/machinery/console.dm index ddac0731249..3922b80a9e5 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/console.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/console.dm @@ -51,7 +51,7 @@ return if(!IsAbductor(user)) to_chat(user, "You start mashing alien buttons at random!") - if(do_after(user,100, target = src)) + if(do_after(user, 100, target = src)) TeleporterSend() return user.set_machine(src) diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 83d450a7222..7214357739a 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -322,7 +322,7 @@ to_chat(src, "You slither up [M] and begin probing at their ear canal...") - if(!do_after(src,50, target = M)) + if(!do_after(src, 50, target = M)) to_chat(src, "As [M] moves away, you are dislodged and fall to the ground.") return diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index 9bf6be0bbdc..be21008d5f2 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -164,7 +164,7 @@ else if(istype(target,/obj/item)) // Eat items just to be annoying var/obj/item/I = target if(!I.anchored) - if(do_after(src,20, target = I)) + if(do_after(src, 20, target = I)) eat(I) return target.attack_animal(src) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 0dfc13a069f..c3bf543a043 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -58,12 +58,12 @@ var/bomb_set panel_open = 1 overlays += image(icon, "npanel_open") to_chat(user, "You unscrew the control panel of [src].") - playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src, O.usesound, 50, 1) else panel_open = 0 overlays -= image(icon, "npanel_open") to_chat(user, "You screw the control panel of [src] back on.") - playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src, O.usesound, 50, 1) else if(panel_open == 0) to_chat(user, "[src] emits a buzzing noise, the panel staying locked in.") @@ -71,7 +71,7 @@ var/bomb_set panel_open = 0 overlays -= image(icon, "npanel_open") to_chat(user, "You screw the control panel of [src] back on.") - playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src, O.usesound, 50, 1) flick("nuclearbombc", src) return diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 1cdff2ec775..b855c1d671f 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -26,7 +26,7 @@ jobtype = /datum/job/chief_engineer uniform = /obj/item/clothing/under/rank/chief_engineer - belt = /obj/item/weapon/storage/belt/utility/full + belt = /obj/item/weapon/storage/belt/utility/chief/full gloves = /obj/item/clothing/gloves/color/black/ce shoes = /obj/item/clothing/shoes/brown head = /obj/item/clothing/head/hardhat/white diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 4394147cb37..af91e7788bd 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -210,7 +210,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0) access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_magistrate) - minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer, access_magistrate) + minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer, access_magistrate, access_heads) outfit = /datum/outfit/job/judge @@ -220,6 +220,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0) uniform = /obj/item/clothing/under/suit_jacket/really_black suit = /obj/item/clothing/suit/judgerobe + gloves = /obj/item/clothing/gloves/color/white shoes = /obj/item/clothing/shoes/centcom head = /obj/item/clothing/head/powdered_wig l_ear = /obj/item/device/radio/headset/heads/magistrate/alt diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index 542ed8b47b4..0c207c8217e 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -65,7 +65,7 @@ var/list/choices = list("West" = WEST, "East" = EAST, "South" = SOUTH, "North" = NORTH) var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in choices dir = choices[selected] - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) var/node_connect = dir initialize_directions = dir for(var/obj/machinery/atmospherics/target in get_step(src,node_connect)) @@ -224,7 +224,7 @@ var/list/choices = list("West" = WEST, "East" = EAST, "South" = SOUTH, "North" = NORTH) var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in choices dir = choices[selected] - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) var/node_connect = dir initialize_directions = dir for(var/obj/machinery/atmospherics/target in get_step(src,node_connect)) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index fdbc8bd7b56..64a6761c10b 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -139,8 +139,8 @@ qdel(W) return if(istype(W, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, W.usesound, 50, 1) + if(do_after(user, 20 * W.toolspeed, target = src)) to_chat(user, "You deconstruct the table.") new /obj/item/stack/sheet/plasteel(loc, 5) qdel(src) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 2a29e23db73..a17202aa4de 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -312,7 +312,7 @@ else orient = "RIGHT" dir = 4 - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, G.usesound, 50, 1) return if(exchange_parts(user, G)) @@ -519,7 +519,7 @@ if(do_after(user, 20, target = L)) if(src.occupant) - to_chat(user, ">The sleeper is already occupied!") + to_chat(user, "The sleeper is already occupied!") return if(!L) return L.forceMove(src) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 1222d3e00b3..151dc377f5d 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -65,7 +65,7 @@ dir = 8 else dir = 4 - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, G.usesound, 50, 1) return if(exchange_parts(user, G)) @@ -293,7 +293,7 @@ dir = 8 else dir = 4 - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, G.usesound, 50, 1) if(exchange_parts(user, G)) return diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 469446f25bb..c139edc19b2 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -581,9 +581,7 @@ return ui_interact(user) /obj/machinery/alarm/attack_ghost(user as mob) - if(stat & (BROKEN|MAINT)) - return - return ui_interact(user) + return interact(user) /obj/machinery/alarm/attack_hand(mob/user) . = ..() @@ -595,7 +593,7 @@ if(buildstage != 2) return - if(wiresexposed && !istype(user, /mob/living/silicon/ai)) + if(wiresexposed) wires.Interact(user) if(!shorted) @@ -1004,6 +1002,7 @@ return to_chat(user, "You wire \the [src]!") + playsound(get_turf(src), coil.usesound, 50, 1) coil.amount -= 5 if(!coil.amount) qdel(coil) @@ -1015,8 +1014,8 @@ else if(istype(W, /obj/item/weapon/crowbar)) to_chat(user, "You start prying out the circuit.") - playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) - if(do_after(user,20, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 20 * W.toolspeed, target = src)) if(buildstage != 1) return to_chat(user, "You pry out the circuit!") @@ -1028,6 +1027,7 @@ if(0) if(istype(W, /obj/item/weapon/airalarm_electronics)) to_chat(user, "You insert the circuit!") + playsound(get_turf(src), W.usesound, 50, 1) qdel(W) buildstage = 1 update_icon() @@ -1036,7 +1036,7 @@ else if(istype(W, /obj/item/weapon/wrench)) to_chat(user, "You remove the fire alarm assembly from the wall!") new /obj/item/mounted/frame/alarm_frame(get_turf(user)) - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) + playsound(get_turf(src), W.usesound, 50, 1) qdel(src) return 0 @@ -1067,3 +1067,5 @@ Just an object used in constructing air alarms desc = "Looks like a circuit. Probably is." w_class = 2 materials = list(MAT_METAL=50, MAT_GLASS=50) + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index d00128c51fa..91687844329 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -75,9 +75,9 @@ obj/machinery/air_sensor if(bolts) to_chat(usr, "The [src] is bolted to the floor! You can't detach it like this.") return 1 - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You begin to unfasten \the [src]...") - if(do_after(user, 40, target = src)) + if(do_after(user, 40 * W.toolspeed, target = src)) user.visible_message("[user] unfastens \the [src].", "You have unfastened \the [src].", "You hear ratchet.") new /obj/item/pipe_gsensor(src.loc) qdel(src) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index d5595185cbf..b785297bd06 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -631,9 +631,9 @@ update_flag // Do after stuff here to_chat(user, "You start to slice away at \the [src]...") - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + playsound(src.loc, WT.usesound, 50, 1) busy = 1 - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * WT.toolspeed, target = src)) busy = 0 if(!WT.isOn()) return 0 diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 7ce0520f62b..231a50bf802 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -123,9 +123,9 @@ if(!istype(W, /obj/item/weapon/wrench)) return ..() - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You begin to unfasten \the [src]...") - if(do_after(user, 40, target = src)) + if(do_after(user, 40 * W.toolspeed, target = src)) user.visible_message( \ "[user] unfastens \the [src].", \ "You have unfastened \the [src].", \ diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 044023c394a..2d714606610 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -202,7 +202,7 @@ return anchored = !anchored - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") return diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index b2d934dc9a2..80cfef47d88 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -69,8 +69,8 @@ return 1 if(istype(W, /obj/item/weapon/wrench)) - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 30, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 30 * W.toolspeed, target = src)) to_chat(user, "You detach \the [src] from the wall.") new/obj/item/mounted/frame/driver_button(get_turf(src)) qdel(src) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index db616620244..fa17c5a9c67 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -28,6 +28,8 @@ var/alarm_on = 0 var/busy = 0 var/emped = 0 //Number of consecutive EMP's on this camera + + var/toggle_message = 'sound/items/Wirecutter.ogg' /obj/machinery/camera/New() ..() @@ -107,8 +109,12 @@ /obj/machinery/camera/blob_act() qdel(src) return + +/obj/machinery/camera/attack_ghost(mob/user) + if(panel_open) + wires.Interact(user) -/obj/machinery/camera/attack_alien(mob/living/carbon/alien/humanoid/user as mob) +/obj/machinery/camera/attack_alien(mob/living/carbon/alien/humanoid/user) if(!istype(user)) return user.do_attack_animation(src) @@ -123,7 +129,7 @@ src.view_range = num cameranet.updateVisibility(src, 0) -/obj/machinery/camera/attackby(W as obj, mob/living/user as mob, params) +/obj/machinery/camera/attackby(obj/item/W, mob/living/user as mob, params) var/msg = "You attach [W] into the assembly inner circuits." var/msg2 = "The camera already has that upgrade!" @@ -134,7 +140,7 @@ panel_open = !panel_open user.visible_message("[user] screws the camera's panel [panel_open ? "open" : "closed"]!", "You screw the camera's panel [panel_open ? "open" : "closed"].") - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) else if((istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool)) && panel_open) wires.Interact(user) @@ -234,7 +240,7 @@ var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() spark_system.set_up(5, 0, loc) spark_system.start() - playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) playsound(loc, "sparks", 50, 1) visible_message("[user] has sliced the camera apart with an energy blade!") qdel(src) @@ -271,7 +277,7 @@ else visible_message("\The [src] [change_msg]!") - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) + playsound(src.loc, toggle_message, 100, 1) // now disconnect anyone using the camera //Apparently, this will disconnect anyone even if the camera was re-activated. @@ -351,9 +357,9 @@ return 0 to_chat(user, "You start to weld [src]...") - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + playsound(src.loc, WT.usesound, 50, 1) busy = 1 - if(do_after(user, 100, target = src)) + if(do_after(user, 100 * WT.toolspeed, target = src)) busy = 0 if(!WT.isOn()) return 0 diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 5b7d035d461..99e9273b682 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -26,7 +26,7 @@ if(0) // State 0 if(iswrench(W) && isturf(src.loc)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) to_chat(user, "You wrench the assembly into place.") anchored = 1 state = 1 @@ -44,7 +44,7 @@ return else if(iswrench(W)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) to_chat(user, "You unattach the assembly from it's place.") anchored = 0 update_icon() @@ -57,6 +57,7 @@ var/obj/item/stack/cable_coil/C = W if(C.use(2)) to_chat(user, "You add wires to the assembly.") + playsound(loc, W.usesound, 50, 1) state = 3 else to_chat(user, "You need 2 coils of wire to wire the assembly.") @@ -74,7 +75,7 @@ if(3) // State 3 if(isscrewdriver(W)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13")) if(!input) @@ -116,7 +117,7 @@ else if(iswirecutter(W)) new/obj/item/stack/cable_coil(get_turf(src), 2) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) to_chat(user, "You cut the wires from the circuits.") state = 2 return @@ -137,7 +138,7 @@ var/obj/U = locate(/obj) in upgrades if(U) to_chat(user, "You unattach an upgrade from the assembly.") - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) U.loc = get_turf(src) upgrades -= U return @@ -162,9 +163,9 @@ return 0 to_chat(user, "You start to weld the [src]..") - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + playsound(src.loc, WT.usesound, 50, 1) busy = 1 - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * WT.toolspeed, target = src)) busy = 0 if(!WT.isOn()) return 0 diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index b17ed18b826..9795b161072 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -62,7 +62,7 @@ anchored = !anchored to_chat(user, "You [anchored ? "attach" : "detach"] the cell charger [anchored ? "to" : "from"] the ground") - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1) + playsound(get_turf(src), W.usesound, 75, 1) attack_hand(mob/user) if(charging) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 9255c38d3db..96579b00cf1 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -382,7 +382,7 @@ connected = null else anchored = 1 - playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(loc, W.usesound, 100, 1) if(anchored) user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.") else diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index ff1fe50ec97..492baed22e3 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -22,8 +22,8 @@ switch(state) if(0) if(istype(P, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) to_chat(user, "You wrench the frame into place.") anchored = 1 state = 1 @@ -32,33 +32,33 @@ if(!WT.isOn()) to_chat(user, "The welder must be on for this task.") return - playsound(loc, 'sound/items/Welder.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, WT.usesound, 50, 1) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.remove_fuel(0, user)) return to_chat(user, "You deconstruct the frame.") new /obj/item/stack/sheet/plasteel(loc, 4) qdel(src) if(1) if(istype(P, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) to_chat(user, "You unfasten the frame.") anchored = 0 state = 0 if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit) - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You place the circuit board inside the frame.") icon_state = "1" circuit = P user.drop_item() P.loc = src if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You screw the circuit board into place.") state = 2 icon_state = "2" if(istype(P, /obj/item/weapon/crowbar) && circuit) - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the circuit board.") state = 1 icon_state = "0" @@ -66,14 +66,14 @@ circuit = null if(2) if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You unfasten the circuit board.") state = 1 icon_state = "1" if(istype(P, /obj/item/stack/cable_coil)) if(P:amount >= 5) - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) P:amount -= 5 if(!P:amount) qdel(P) to_chat(user, "You add cables to the frame.") @@ -84,7 +84,7 @@ if(brain) to_chat(user, "Get that brain out of there first") else - playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the cables.") state = 2 icon_state = "2" @@ -93,8 +93,8 @@ if(istype(P, /obj/item/stack/sheet/rglass)) if(P:amount >= 2) - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) if(P) P:amount -= 2 if(!P:amount) qdel(P) @@ -147,7 +147,7 @@ icon_state = "3b" if(istype(P, /obj/item/weapon/crowbar) && brain) - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the brain.") brain.loc = loc brain = null @@ -155,7 +155,7 @@ if(4) if(istype(P, /obj/item/weapon/crowbar)) - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the glass panel.") state = 3 if(brain) @@ -166,7 +166,7 @@ return if(istype(P, /obj/item/weapon/screwdriver)) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You connect the monitor.") if(!brain) var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes" @@ -199,7 +199,7 @@ else if(istype(W, /obj/item/weapon/wrench)) if(anchored) user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") - if(!do_after(user,40, target = src)) + if(!do_after(user, 40 * W.toolspeed, target = src)) user.visible_message("\The [user] decides not to unbolt \the [src].") return user.visible_message("\The [user] finishes unfastening \the [src]!") @@ -207,7 +207,7 @@ return else user.visible_message("\The [user] starts to bolt \the [src] to the plating...") - if(!do_after(user,40, target = src)) + if(!do_after(user, 40 * W.toolspeed, target = src)) user.visible_message("\The [user] decides not to bolt \the [src].") return user.visible_message("\The [user] finishes fastening down \the [src]!") diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index d3d7b8cf3d1..2f5e90e3039 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -29,6 +29,8 @@ var/list/records = null var/frame_desc = null var/contain_parts = 1 + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/item/weapon/circuitboard/computer board_type = "computer" @@ -354,8 +356,8 @@ switch(state) if(0) if(istype(P, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) to_chat(user, "You wrench the frame into place.") anchored = 1 state = 1 @@ -364,23 +366,23 @@ if(!WT.remove_fuel(0, user)) to_chat(user, "The welding tool must be on to complete this task.") return - playsound(loc, 'sound/items/Welder.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, WT.usesound, 50, 1) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return to_chat(user, "You deconstruct the frame.") new /obj/item/stack/sheet/metal(loc, 5) qdel(src) if(1) if(istype(P, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) to_chat(user, "You unfasten the frame.") anchored = 0 state = 0 if(istype(P, /obj/item/weapon/circuitboard) && !circuit) var/obj/item/weapon/circuitboard/B = P if(B.board_type == "computer") - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, B.usesound, 50, 1) to_chat(user, "You place the circuit board inside the frame.") icon_state = "1" circuit = P @@ -389,12 +391,12 @@ else to_chat(user, "This frame does not accept circuit boards of this type!") if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You screw the circuit board into place.") state = 2 icon_state = "2" if(istype(P, /obj/item/weapon/crowbar) && circuit) - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the circuit board.") state = 1 icon_state = "0" @@ -402,16 +404,16 @@ circuit = null if(2) if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You unfasten the circuit board.") state = 1 icon_state = "1" if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = P if(C.amount >= 5) - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, C.usesound, 50, 1) to_chat(user, "You start to add cables to the frame.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * C.toolspeed, target = src)) if(state == 2 && C.amount >= 5 && C.use(5)) to_chat(user, "You add cables to the frame.") state = 3 @@ -424,7 +426,7 @@ return if(3) if(istype(P, /obj/item/weapon/wirecutters)) - playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the cables.") state = 2 icon_state = "2" @@ -434,9 +436,9 @@ if(istype(P, /obj/item/stack/sheet/glass)) var/obj/item/stack/sheet/glass/G = P if(G.amount >= 2) - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, G.usesound, 50, 1) to_chat(user, "You start to add the glass panel to the frame.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * G.toolspeed, target = src)) if(state == 3 && G.amount >= 2 && G.use(2)) to_chat(user, "You put in the glass panel.") state = 4 @@ -449,13 +451,13 @@ return if(4) if(istype(P, /obj/item/weapon/crowbar)) - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the glass panel.") state = 3 icon_state = "3" new /obj/item/stack/sheet/glass(loc, 2) if(istype(P, /obj/item/weapon/screwdriver)) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You connect the monitor.") var/B = new circuit.build_path (loc) if(circuit.powernet) B:powernet = circuit.powernet @@ -478,7 +480,7 @@ switch(state) if(0) if(istype(P, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) if(do_after(user, 20, target = src)) to_chat(user, "You wrench the frame into place.") anchored = 1 @@ -488,23 +490,23 @@ if(!WT.remove_fuel(0, user)) to_chat(user, "The welding tool must be on to complete this task.") return - playsound(loc, 'sound/items/Welder.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, WT.usesound, 50, 1) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return to_chat(user, "You deconstruct the frame.") new /obj/item/stack/sheet/mineral/bananium(loc, 5) qdel(src) if(1) if(istype(P, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) to_chat(user, "You unfasten the frame.") anchored = 0 state = 0 if(istype(P, /obj/item/weapon/circuitboard) && !circuit) var/obj/item/weapon/circuitboard/B = P if(B.board_type == "honkcomputer") - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You place the circuit board inside the frame.") icon_state = "1" circuit = P @@ -513,12 +515,12 @@ else to_chat(user, "This frame does not accept circuit boards of this type!") if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You screw the circuit board into place.") state = 2 icon_state = "2" if(istype(P, /obj/item/weapon/crowbar) && circuit) - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the circuit board.") state = 1 icon_state = "0" @@ -526,16 +528,16 @@ circuit = null if(2) if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You unfasten the circuit board.") state = 1 icon_state = "1" if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = P if(C.amount >= 5) - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, C.usesound, 50, 1) to_chat(user, "You start to add cables to the frame.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * C.toolspeed, target = src)) if(state == 2 && C.amount >= 5 && C.use(5)) to_chat(user, "You add cables to the frame.") state = 3 @@ -548,7 +550,7 @@ return if(3) if(istype(P, /obj/item/weapon/wirecutters)) - playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the cables.") state = 2 icon_state = "2" @@ -558,9 +560,9 @@ if(istype(P, /obj/item/stack/sheet/glass)) var/obj/item/stack/sheet/glass/G = P if(G.amount >= 2) - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, G.usesound, 50, 1) to_chat(user, "You start to add the glass panel to the frame.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * G.toolspeed, target = src)) if(state == 3 && G.amount >= 2 && G.use(2)) to_chat(user, "You put in the glass panel.") state = 4 @@ -573,13 +575,13 @@ return if(4) if(istype(P, /obj/item/weapon/crowbar)) - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the glass panel.") state = 3 icon_state = "3" new /obj/item/stack/sheet/glass(loc, 2) if(istype(P, /obj/item/weapon/screwdriver)) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) to_chat(user, "You connect the monitor.") var/B = new circuit.build_path (loc) if(circuit.powernet) B:powernet = circuit.powernet diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 88bde80be07..e343135b246 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -101,18 +101,19 @@ text = replacetext(text, "\n", "
") return text -/obj/machinery/computer/attack_ghost(user as mob) +/obj/machinery/computer/attack_ghost(mob/user) return attack_hand(user) -/obj/machinery/computer/attack_hand(user as mob) +/obj/machinery/computer/attack_hand(mob/user) /* Observers can view computers, but not actually use them via Topic*/ if(istype(user, /mob/dead/observer)) return 0 return ..() -/obj/machinery/computer/attackby(I as obj, user as mob, params) +/obj/machinery/computer/attackby(obj/I, mob/user, params) if(istype(I, /obj/item/weapon/screwdriver) && circuit) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20, target = src)) + var/obj/item/weapon/screwdriver/S = I + playsound(src.loc, S.usesound, 50, 1) + if(do_after(user, 20 * S.toolspeed, target = src)) var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) var/obj/item/weapon/circuitboard/M = new circuit( A ) A.circuit = M diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm index 167949be5ec..90d574cb61e 100644 --- a/code/game/machinery/computer/honkputer.dm +++ b/code/game/machinery/computer/honkputer.dm @@ -93,10 +93,11 @@ onclose(user, "honkputer") -/obj/machinery/computer/HONKputer/attackby(I as obj, user as mob, params) +/obj/machinery/computer/HONKputer/attackby(obj/I, mob/user, params) if(istype(I, /obj/item/weapon/screwdriver) && circuit) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20, target = src)) + var/obj/item/weapon/screwdriver/S = I + playsound(src.loc, S.usesound, 50, 1) + if(do_after(user, 20 * S.toolspeed, target = src)) var/obj/structure/computerframe/HONKputer/A = new /obj/structure/computerframe/HONKputer( src.loc ) var/obj/item/weapon/circuitboard/M = new circuit( A ) A.circuit = M diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index b34ec03c91f..99b53415e5b 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -66,9 +66,9 @@ if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = P if(C.amount >= 5) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, C.usesound, 50, 1) to_chat(user, "You start to add cables to the frame.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * C.toolspeed, target = src)) if(state == 1 && C.amount >= 5 && C.use(5)) to_chat(user, "You add cables to the frame.") state = 2 @@ -86,13 +86,13 @@ return G.use(5) to_chat(user, "You add the glass to the frame.") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(get_turf(src), G.usesound, 50, 1) new /obj/structure/displaycase_frame(src.loc) qdel(src) return if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, P.usesound, 75, 1) to_chat(user, "You dismantle the frame.") new /obj/item/stack/sheet/metal(src.loc, 5) qdel(src) @@ -100,7 +100,7 @@ if(istype(P, /obj/item/weapon/circuitboard)) var/obj/item/weapon/circuitboard/B = P if(B.board_type == "machine") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, B.usesound, 50, 1) to_chat(user, "You add the circuit board to the frame.") circuit = P user.drop_item() @@ -114,7 +114,7 @@ else to_chat(user, "This frame does not accept circuit boards of this type!") if(istype(P, /obj/item/weapon/wirecutters)) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the cables.") state = 1 icon_state = "box_0" @@ -123,7 +123,7 @@ if(3) if(istype(P, /obj/item/weapon/crowbar)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) state = 2 circuit.loc = src.loc circuit = null @@ -145,7 +145,7 @@ component_check = 0 break if(component_check) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) var/obj/machinery/new_machine = new src.circuit.build_path(src.loc) new_machine.construction() for(var/obj/O in new_machine.component_parts) @@ -190,7 +190,7 @@ for(var/I in req_components) if(istype(P, I) && (req_components[I] > 0) && (!(P.flags & NODROP) || istype(P, /obj/item/stack))) success=1 - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) if(istype(P, /obj/item/stack)) var/obj/item/stack/S = P var/camt = min(S.amount, req_components[I]) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 1ed19123e52..abeb4c5c611 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -66,7 +66,7 @@ for reference: if(istype(W, stacktype)) if(src.health < src.maxhealth) visible_message("[user] begins to repair the [src]!") - if(do_after(user,20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) src.health = src.maxhealth W:use(1) visible_message("[user] repairs the [src]!") @@ -77,9 +77,9 @@ for reference: else if(istype(W, /obj/item/weapon/crowbar)) user.changeNext_move(CLICK_CD_MELEE) user.visible_message("[user] is prying apart \the [src].", "You begin to pry apart \the [src].") - playsound(src, 'sound/items/Crowbar.ogg', 200, 1) + playsound(src, W.usesound, 200, 1) - if(do_after(user, 300, target = src) && src && !src.gcDestroyed) + if(do_after(user, 300 * W.toolspeed, target = src) && src && !src.gcDestroyed) user.visible_message("[user] pries apart \the [src].", "You pry apart \the [src].") dismantle() return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index c2fb9f483e0..4c580e1ebb9 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -560,6 +560,8 @@ About the new airlock wires panel: return /obj/machinery/door/airlock/attack_ghost(mob/user) + if(p_open) + wires.Interact(user) ui_interact(user) /obj/machinery/door/airlock/attack_ai(mob/user) @@ -793,7 +795,7 @@ About the new airlock wires panel: update_icon() return 1 -/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob, params) +/obj/machinery/door/airlock/attackby(obj/item/C, mob/user as mob, params) // to_chat(world, text("airlock attackby src [] obj [] mob []", src, C, user)) if(!istype(usr, /mob/living/silicon)) if(isElectrified()) @@ -828,16 +830,16 @@ About the new airlock wires panel: else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE var/obj/item/weapon/pai_cable/cable = C cable.plugin(src, user) - else if(istype(C, /obj/item/weapon/crowbar) || istype(C, /obj/item/weapon/twohanded/fireaxe) ) + else if(istype(C, /obj/item/weapon/crowbar) || istype(C, /obj/item/weapon/twohanded/fireaxe)) var/beingcrowbarred = null if(istype(C, /obj/item/weapon/crowbar) ) beingcrowbarred = 1 //derp, Agouri else beingcrowbarred = 0 if( beingcrowbarred && p_open && (operating == -1 || (density && welded && operating != 1 && !arePowerSystemsOn() && !locked)) ) - playsound(loc, 'sound/items/Crowbar.ogg', 100, 1) + playsound(loc, C.usesound, 100, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.") - if(do_after(user,40, target = src)) + if(do_after(user, 40 * C.toolspeed, target = src)) to_chat(user, "You removed the airlock electronics!") var/obj/structure/door_assembly/da = new assembly_type(loc) @@ -871,6 +873,29 @@ About the new airlock wires panel: qdel(src) return + else if(istype(C, /obj/item/weapon/crowbar/power)) + if(isElectrified()) + shock(user, 100)//it's like sticking a fork in a power socket + return + + if(!density)//already open + return + + if(locked) + to_chat(user, "The bolts are down, it won't budge!") + return + + if(welded) + to_chat(user, "It's welded, it won't budge!") + return + + if(arePowerSystemsOn()) + var/obj/item/weapon/crowbar/power/P = C + playsound(src, 'sound/machines/airlock_alien_prying.ogg',100,1) //is it aliens or just the CE being a dick? + if(do_after(user, P.airlock_open_time, target = src)) + open(2) + if(density && !open(2)) + to_chat(user, "Despite your attempts, the [src] refuses to open.") else if(arePowerSystemsOn()) to_chat(user, "The airlock's motors resist your efforts to force it.") else if(locked) diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index acad5a5a563..b39e3798ae1 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -14,6 +14,8 @@ var/last_configurator = null var/locked = TRUE var/const/max_brain_damage = 60 // Maximum brain damage a mob can have until it can't use the electronics + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/item/weapon/airlock_electronics/attack_self(mob/user) if(!ishuman(user) && !isrobot(user)) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 052f0a99bea..63fed84088a 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -64,12 +64,12 @@ if(boltslocked) to_chat(user, "There are screws locking the bolts in place!") return - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) user.visible_message("[user] starts undoing [src]'s bolts...", \ "You start unfastening [src]'s floor bolts...") - if(!do_after(user, 50, target = src)) + if(!do_after(user, 50 * C.toolspeed, target = src)) return - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) user.visible_message("[user] unfastens [src]'s bolts.", \ "You undo [src]'s floor bolts.") deconstruct(TRUE) @@ -77,7 +77,7 @@ else if(istype(C, /obj/item/weapon/screwdriver)) user.visible_message("[user] [boltslocked ? "unlocks" : "locks"] [src]'s bolts...", \ "You [boltslocked ? "unlock" : "lock"] [src]'s floor bolts...") - playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) boltslocked = !boltslocked return else @@ -250,6 +250,8 @@ desc = "A circuit board used in construction of firelocks." w_class = 2 materials = list(MAT_METAL=50, MAT_GLASS=50) + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/structure/firelock_frame name = "firelock frame" @@ -287,14 +289,14 @@ switch(constructionStep) if(CONSTRUCTION_PANEL_OPEN) if(istype(C, /obj/item/weapon/crowbar)) - playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) user.visible_message("[user] starts prying something out from [src]...", \ "You begin prying out the wire cover...") - if(!do_after(user, 50, target = src)) + if(!do_after(user, 50 * C.toolspeed, target = src)) return if(constructionStep != CONSTRUCTION_PANEL_OPEN) return - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) user.visible_message("[user] pries out a metal plate from [src], exposing the wires.", \ "You remove the cover plate from [src], exposing the wires.") constructionStep = CONSTRUCTION_WIRES_EXPOSED @@ -304,16 +306,16 @@ if(locate(/obj/machinery/door/firedoor) in get_turf(src)) to_chat(user, "There's already a firelock there.") return - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) user.visible_message("[user] starts bolting down [src]...", \ "You begin bolting [src]...") - if(!do_after(user, 30, target = src)) + if(!do_after(user, 30 * C.toolspeed, target = src)) return if(locate(/obj/machinery/door/firedoor) in get_turf(src)) return user.visible_message("[user] finishes the firelock.", \ "You finish the firelock.") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) if(reinforced) new /obj/machinery/door/firedoor/heavy(get_turf(src)) else @@ -330,23 +332,23 @@ return user.visible_message("[user] begins reinforcing [src]...", \ "You begin reinforcing [src]...") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 60, target = src)) + playsound(get_turf(src), C.usesound, 50, 1) + if(do_after(user, 60 * C.toolspeed, target = src)) if(constructionStep != CONSTRUCTION_PANEL_OPEN || reinforced || P.get_amount() < 2 || !P) return user.visible_message("[user] reinforces [src].", \ "You reinforce [src].") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) P.use(2) reinforced = 1 return if(CONSTRUCTION_WIRES_EXPOSED) if(istype(C, /obj/item/weapon/wirecutters)) - playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) user.visible_message("[user] starts cutting the wires from [src]...", \ "You begin removing [src]'s wires...") - if(!do_after(user, 60, target = src)) + if(!do_after(user, 60 * C.toolspeed, target = src)) return if(constructionStep != CONSTRUCTION_WIRES_EXPOSED) return @@ -360,14 +362,14 @@ if(istype(C, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/W = C if(W.remove_fuel(1, user)) - playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) user.visible_message("[user] starts welding a metal plate into [src]...", \ "You begin welding the cover plate back onto [src]...") - if(!do_after(user, 80, target = src)) + if(!do_after(user, 80 * C.toolspeed, target = src)) return if(constructionStep != CONSTRUCTION_WIRES_EXPOSED) return - playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) user.visible_message("[user] welds the metal plate into [src].", \ "You weld [src]'s cover plate into place, hiding the wires.") constructionStep = CONSTRUCTION_PANEL_OPEN @@ -377,15 +379,15 @@ if(istype(C, /obj/item/weapon/crowbar)) user.visible_message("[user] begins removing the circuit board from [src]...", \ "You begin prying out the circuit board from [src]...") - playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) - if(!do_after(user, 50, target = src)) + playsound(get_turf(src), C.usesound, 50, 1) + if(!do_after(user, 50 * C.toolspeed, target = src)) return if(constructionStep != CONSTRUCTION_GUTTED) return user.visible_message("[user] removes [src]'s circuit board.", \ "You remove the circuit board from [src].") new /obj/item/weapon/firelock_electronics(get_turf(src)) - playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) constructionStep = CONSTRUCTION_NOCIRCUIT update_icon() return @@ -396,13 +398,13 @@ return user.visible_message("[user] begins wiring [src]...", \ "You begin adding wires to [src]...") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 60, target = src)) + playsound(get_turf(src), B.usesound, 50, 1) + if(do_after(user, 60 * B.toolspeed, target = src)) if(constructionStep != CONSTRUCTION_GUTTED || B.get_amount() < 5 || !B) return user.visible_message("[user] adds wires to [src].", \ "You wire [src].") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(get_turf(src), B.usesound, 50, 1) B.use(5) constructionStep = CONSTRUCTION_WIRES_EXPOSED update_icon() @@ -411,16 +413,16 @@ if(istype(C, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/W = C if(W.remove_fuel(1,user)) - playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1) + playsound(get_turf(src), W.usesound, 50, 1) user.visible_message("[user] begins cutting apart [src]'s frame...", \ "You begin slicing [src] apart...") - if(!do_after(user, 80, target = src)) + if(!do_after(user, 80 * W.toolspeed, target = src)) return if(constructionStep != CONSTRUCTION_NOCIRCUIT) return user.visible_message("[user] cuts apart [src]!", \ "You cut [src] into metal.") - playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1) + playsound(get_turf(src), W.usesound, 50, 1) var/turf/T = get_turf(src) new /obj/item/stack/sheet/metal(T, 3) if(reinforced) @@ -430,8 +432,8 @@ if(istype(C, /obj/item/weapon/firelock_electronics)) user.visible_message("[user] starts adding [C] to [src]...", \ "You begin adding a circuit board to [src]...") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) - if(!do_after(user, 40, target = src)) + playsound(get_turf(src), C.usesound, 50, 1) + if(!do_after(user, 40 * C.toolspeed, target = src)) return if(constructionStep != CONSTRUCTION_NOCIRCUIT) return @@ -439,7 +441,7 @@ qdel(C) user.visible_message("[user] adds a circuit to [src].", \ "You insert and secure [C].") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(get_turf(src), C.usesound, 50, 1) constructionStep = CONSTRUCTION_GUTTED update_icon() return diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 74a65f1a93d..44af5be4cb0 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -227,18 +227,19 @@ /obj/machinery/door/window/attack_hand(mob/user as mob) return attackby(user, user) -/obj/machinery/door/window/emag_act(user as mob, weapon as obj) +/obj/machinery/door/window/emag_act(mob/user, obj/weapon) if(density) operating = -1 flick("[base_state]spark", src) sleep(6) desc += "
Its access panel is smoking slightly." if(istype(weapon, /obj/item/weapon/melee/energy/blade)) + var/obj/item/weapon/melee/energy/blade/B var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() spark_system.set_up(5, 0, loc) spark_system.start() playsound(loc, "sparks", 50, 1) - playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) + playsound(loc, B.usesound, 50, 1) visible_message(" The glass door was sliced open by [user]!") open(2) emagged = 1 @@ -264,17 +265,17 @@ if(density || operating) to_chat(user, "You need to open the door to access the maintenance panel.") return - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, I.usesound, 50, 1) p_open = !( p_open ) to_chat(user, "You [p_open ? "open":"close"] the maintenance panel of the [name].") return if(istype(I, /obj/item/weapon/crowbar)) if(p_open && !density && !operating) - playsound(loc, 'sound/items/Crowbar.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) user.visible_message("[user] removes the electronics from the [name].", \ "You start to remove electronics from the [name].") - if(do_after(user,40, target = src)) + if(do_after(user, 40 * I.toolspeed, target = src)) if(p_open && !density && !operating && loc) var/obj/structure/windoor_assembly/WA = new /obj/structure/windoor_assembly(loc) switch(base_state) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 777c2c1bfd5..a54cf0d7e74 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -20,7 +20,7 @@ var/list/doppler_arrays = list() /obj/machinery/doppler_array/process() return PROCESS_KILL -/obj/machinery/doppler_array/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/doppler_array/attackby(var/obj/item/O, var/mob/user, params) if(istype(O, /obj/item/weapon/wrench)) if(!anchored && !isinspace()) anchored = 1 @@ -30,7 +30,7 @@ var/list/doppler_arrays = list() anchored = 0 power_change() to_chat(user, "You unfasten [src].") - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, O.usesound, 50, 1) /obj/machinery/doppler_array/verb/rotate() set name = "Rotate Tachyon-doppler Dish" diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index d901947ad40..f3db17f9b47 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -97,7 +97,7 @@ FIRE ALARM else if(istype(W, /obj/item/weapon/wirecutters)) // cutting the wires out to_chat(user, "You cut the wires!") - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) var/obj/item/stack/cable_coil/new_coil = new /obj/item/stack/cable_coil() new_coil.amount = 5 new_coil.loc = user.loc @@ -111,17 +111,18 @@ FIRE ALARM return buildstage = 2 + playsound(get_turf(src), W.usesound, 50, 1) to_chat(user, "You wire \the [src]!") update_icon() else if(istype(W, /obj/item/weapon/crowbar)) to_chat(user, "You pry out the circuit!") - playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 20 * W.toolspeed, target = src)) if(buildstage != 1) return var/obj/item/weapon/firealarm_electronics/circuit = new /obj/item/weapon/firealarm_electronics() - circuit.loc = user.loc + circuit.forceMove(get_turf(src)) buildstage = 0 update_icon() if(0) @@ -134,7 +135,7 @@ FIRE ALARM else if(istype(W, /obj/item/weapon/wrench)) to_chat(user, "You remove the fire alarm assembly from the wall!") new /obj/item/mounted/frame/firealarm(get_turf(user)) - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) + playsound(get_turf(src), W.usesound, 50, 1) qdel(src) return @@ -275,6 +276,8 @@ Just a object used in constructing fire alarms desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\"" w_class = 2 materials = list(MAT_METAL=50, MAT_GLASS=50) + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/machinery/partyalarm name = "\improper PARTY BUTTON" diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 1b5587d9fe4..ac3d1b7037c 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -76,14 +76,14 @@ /obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(istype(W, /obj/item/weapon/wrench)) if(!anchored && !isinspace()) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) user.visible_message( \ "[user] tightens \the [src]'s casters.", \ " You have tightened \the [src]'s casters.", \ "You hear ratchet.") anchored = 1 else if(anchored) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) user.visible_message( \ "[user] loosens \the [src]'s casters.", \ " You have loosened \the [src]'s casters.", \ diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 330fc5e1104..644b5a73ab9 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -152,8 +152,8 @@ return 1 if(istype(W, /obj/item/weapon/wrench)) - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 30, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 30 * W.toolspeed, target = src)) to_chat(user, "You detach \the [src] from the wall.") new/obj/item/mounted/frame/light_switch(get_turf(src)) qdel(src) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 398fc7d34ac..1b55977a483 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -395,7 +395,7 @@ Class Procs: /obj/machinery/proc/default_deconstruction_crowbar(var/obj/item/weapon/crowbar/C, var/ignore_panel = 0) if(istype(C) && (panel_open || ignore_panel)) - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, C.usesound, 50, 1) spawn_frame() for(var/obj/item/I in component_parts) if(I.reliability != 100 && crit_fail) @@ -413,7 +413,7 @@ Class Procs: /obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/icon_state_open, var/icon_state_closed, var/obj/item/weapon/screwdriver/S) if(istype(S)) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, S.usesound, 50, 1) if(!panel_open) panel_open = 1 icon_state = icon_state_open @@ -427,7 +427,7 @@ Class Procs: /obj/machinery/proc/default_change_direction_wrench(var/mob/user, var/obj/item/weapon/wrench/W) if(panel_open && istype(W)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) dir = turn(dir,-90) to_chat(user, "You rotate [src].") return 1 @@ -436,14 +436,14 @@ Class Procs: /obj/proc/default_unfasten_wrench(mob/user, obj/item/weapon/wrench/W, time = 20) if(istype(W)) to_chat(user, "Now [anchored ? "un" : ""]securing [name].") - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, time, target = src)) + playsound(loc, W.usesound, 50, 1) + if(do_after(user, time * W.toolspeed, target = src)) to_chat(user, "You've [anchored ? "un" : ""]secured [name].") anchored = !anchored if(istype(src, /obj/machinery)) var/obj/machinery/M = src M.power_change() //Turn on or off the machine depending on the status of power in the new area. - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) return 1 return 0 diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index 7953f738a40..1d5f4e8cba8 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -22,8 +22,8 @@ if(istype(W, /obj/item/weapon/screwdriver)) to_chat(user, "You begin to unscrew the bolts off the [src]...") - playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 30, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 30 * W.toolspeed, target = src)) var/obj/machinery/mass_driver_frame/F = new(get_turf(src)) F.dir = src.dir F.anchored = 1 @@ -106,17 +106,17 @@ if(!WT.remove_fuel(0, user)) to_chat(user, "The welding tool must be on to complete this task.") return 1 - playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1) + playsound(get_turf(src), WT.usesound, 50, 1) to_chat(user, "You begin to cut the frame apart...") - if(do_after(user, 30, target = src) && (build == 0)) + if(do_after(user, 30 * WT.toolspeed, target = src) && (build == 0)) to_chat(user, "You detach the plasteel sheets from each others.") new /obj/item/stack/sheet/plasteel(get_turf(src),3) qdel(src) return 1 if(istype(W, /obj/item/weapon/wrench)) to_chat(user, "You begin to anchor \the [src] on the floor.") - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 10, target = src) && (build == 0)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 10 * W.toolspeed, target = src) && (build == 0)) to_chat(user, "You anchor \the [src]!") anchored = 1 build++ @@ -125,8 +125,8 @@ if(1) // Fixed to the floor if(istype(W, /obj/item/weapon/wrench)) to_chat(user, "You begin to de-anchor \the [src] from the floor.") - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 10, target = src) && (build == 1)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 10 * W.toolspeed, target = src) && (build == 1)) build-- update_icon() anchored = 0 @@ -137,9 +137,9 @@ if(!WT.remove_fuel(0, user)) to_chat(user, "The welding tool must be on to complete this task.") return 1 - playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1) + playsound(get_turf(src), WT.usesound, 50, 1) to_chat(user, "You begin to weld \the [src] to the floor...") - if(do_after(user, 40, target = src) && (build == 1)) + if(do_after(user, 40 * WT.toolspeed, target = src) && (build == 1)) to_chat(user, "You welded \the [src] to the floor.") build++ update_icon() @@ -150,17 +150,17 @@ if(!WT.remove_fuel(0, user)) to_chat(user, "The welding tool must be on to complete this task.") return 1 - playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1) + playsound(get_turf(src), WT.usesound, 50, 1) to_chat(user, "You begin to unweld \the [src] to the floor...") - if(do_after(user, 40, target = src) && (build == 2)) + if(do_after(user, 40 * WT.toolspeed, target = src) && (build == 2)) to_chat(user, "You unwelded \the [src] to the floor.") build-- update_icon() if(istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/C=W + var/obj/item/stack/cable_coil/C = W to_chat(user, "You start adding cables to \the [src]...") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20, target = src) && (C.amount >= 3) && (build == 2)) + playsound(get_turf(src), C.usesound, 50, 1) + if(do_after(user, 20 * C.toolspeed, target = src) && (C.amount >= 3) && (build == 2)) C.use(3) to_chat(user, "You've added cables to \the [src].") build++ @@ -168,18 +168,18 @@ if(3) // Wired if(istype(W, /obj/item/weapon/wirecutters)) to_chat(user, "You begin to remove the wiring from \the [src].") - if(do_after(user, 10, target = src) && (build == 3)) + if(do_after(user, 10 * W.toolspeed, target = src) && (build == 3)) new /obj/item/stack/cable_coil(loc,3) - playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1) + playsound(get_turf(src), W.usesound, 50, 1) to_chat(user, "You've removed the cables from \the [src].") build-- update_icon() return 1 if(istype(W, /obj/item/stack/rods)) - var/obj/item/stack/rods/R=W + var/obj/item/stack/rods/R = W to_chat(user, "You begin to complete \the [src]...") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20, target = src) && (R.amount >= 3) && (build == 3)) + playsound(get_turf(src), R.usesound, 50, 1) + if(do_after(user, 20 * R.toolspeed, target = src) && (R.amount >= 3) && (build == 3)) R.use(3) to_chat(user, "You've added the grille to \the [src].") build++ @@ -188,15 +188,15 @@ if(4) // Grille in place if(istype(W, /obj/item/weapon/crowbar)) to_chat(user, "You begin to pry off the grille from \the [src]...") - playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) - if(do_after(user, 30, target = src) && (build == 4)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 30 * W.toolspeed, target = src) && (build == 4)) new /obj/item/stack/rods(loc,2) build-- update_icon() return 1 if(istype(W, /obj/item/weapon/screwdriver)) to_chat(user, "You finalize the Mass Driver...") - playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1) + playsound(get_turf(src), W.usesound, 50, 1) var/obj/machinery/mass_driver/M = new(get_turf(src)) M.dir = src.dir qdel(src) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index dfde3ee64b8..428a9eeb8e9 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -543,10 +543,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co /obj/machinery/newscaster/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/weapon/wrench)) to_chat(user, "Now [anchored ? "un" : ""]securing [name]") - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 60, target = src)) + playsound(loc, I.usesound, 50, 1) + if(do_after(user, 60 * I.toolspeed, target = src)) new /obj/item/mounted/frame/newscaster_frame(loc) - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, I.usesound, 50, 1) qdel(src) return diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index b0d5f08c44c..de52cd49793 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -620,7 +620,7 @@ var/obj/machinery/atmospherics/omni/filter/P = new(loc) P.construction(dir, pipe_dir, color) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) user.visible_message( \ "[user] fastens the [src].", \ "You have fastened the [src].", \ @@ -645,9 +645,9 @@ if(!locate(/obj/machinery/atmospherics/pipe, src.loc)) to_chat(user, "You need to fasten it to a pipe") return 1 - new/obj/machinery/meter( src.loc ) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - to_chat(user, "You have fastened the meter to the pipe") + new /obj/machinery/meter(loc) + playsound(src.loc, W.usesound, 50, 1) + to_chat(user, "You have fastened the meter to the pipe.") qdel(src) /obj/item/pipe_gsensor @@ -663,8 +663,8 @@ if(!istype(W, /obj/item/weapon/wrench)) return ..() new/obj/machinery/air_sensor( src.loc ) - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) - to_chat(user, "You have fastened the gas sensor") + playsound(get_turf(src), W.usesound, 50, 1) + to_chat(user, "You have fastened the gas sensor.") qdel(src) #undef PIPE_SIMPLE_STRAIGHT diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index d7ac49381b9..37836e8f798 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -112,9 +112,9 @@ return else if(istype(W, /obj/item/weapon/wrench)) if(unwrenched==0) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You begin to unfasten \the [src] from the floor...") - if(do_after(user, 40, target = src)) + if(do_after(user, 40 * W.toolspeed, target = src)) user.visible_message( \ "[user] unfastens \the [src].", \ "You have unfastened \the [src]. Now it can be pulled somewhere else.", \ @@ -125,9 +125,9 @@ if(usr.machine==src) usr << browse(null, "window=pipedispenser") else /*if(unwrenched==1)*/ - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You begin to fasten \the [src] to the floor...") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) user.visible_message( \ "[user] fastens \the [src].", \ "You have fastened \the [src]. Now it can dispense pipes.", \ diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 28b3cfe7132..461df0e39f7 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -337,7 +337,7 @@ var/list/turret_icons //If the turret is destroyed, you can remove it with a crowbar to //try and salvage its components to_chat(user, "You begin prying the metal coverings off.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * I.toolspeed, target = src)) if(prob(70)) to_chat(user, "You remove the turret and salvage some components.") if(installation) @@ -369,15 +369,15 @@ var/list/turret_icons ) wrenching = 1 - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * I.toolspeed, target = src)) //This code handles moving the turret around. After all, it's a portable turret! if(!anchored) - playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) anchored = 1 update_icon() to_chat(user, "You secure the exterior bolts on the turret.") else if(anchored) - playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) anchored = 0 to_chat(user, "You unsecure the exterior bolts on the turret.") update_icon() @@ -778,14 +778,14 @@ var/list/turret_icons switch(build_step) if(0) //first step if(istype(I, /obj/item/weapon/wrench) && !anchored) - playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) to_chat(user, "You secure the external bolts.") anchored = 1 build_step = 1 return else if(istype(I, /obj/item/weapon/crowbar) && !anchored) - playsound(loc, 'sound/items/Crowbar.ogg', 75, 1) + playsound(loc, I.usesound, 75, 1) to_chat(user, "You dismantle the turret construction.") new /obj/item/stack/sheet/metal( loc, 5) qdel(src) // qdel @@ -803,7 +803,7 @@ var/list/turret_icons return else if(istype(I, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(loc, I.usesound, 75, 1) to_chat(user, "You unfasten the external bolts.") anchored = 0 build_step = 0 @@ -812,7 +812,7 @@ var/list/turret_icons if(2) if(istype(I, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) to_chat(user, "You bolt the metal armor into place.") build_step = 3 return @@ -825,8 +825,8 @@ var/list/turret_icons to_chat(user, "You need more fuel to complete this task.") return - playsound(loc, pick('sound/items/Welder.ogg', 'sound/items/Welder2.ogg'), 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, WT.usesound, 50, 1) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.remove_fuel(5, user)) return build_step = 1 to_chat(user, "You remove the turret's interior metal armor.") @@ -857,7 +857,7 @@ var/list/turret_icons return else if(istype(I, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) to_chat(user, "You remove the turret's metal armor bolts.") build_step = 2 return @@ -876,7 +876,7 @@ var/list/turret_icons if(5) if(istype(I, /obj/item/weapon/screwdriver)) - playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) build_step = 6 to_chat(user, "You close the internal access hatch.") return @@ -894,7 +894,7 @@ var/list/turret_icons return else if(istype(I, /obj/item/weapon/screwdriver)) - playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) build_step = 5 to_chat(user, "You open the internal access hatch.") return @@ -906,8 +906,8 @@ var/list/turret_icons if(WT.get_fuel() < 5) to_chat(user, "You need more fuel to complete this task.") - playsound(loc, pick('sound/items/Welder.ogg', 'sound/items/Welder2.ogg'), 50, 1) - if(do_after(user, 30, target = src)) + playsound(loc, WT.usesound, 50, 1) + if(do_after(user, 30 * WT.toolspeed, target = src)) if(!src || !WT.remove_fuel(5, user)) return build_step = 8 @@ -924,7 +924,7 @@ var/list/turret_icons qdel(src) // qdel else if(istype(I, /obj/item/weapon/crowbar)) - playsound(loc, 'sound/items/Crowbar.ogg', 75, 1) + playsound(loc, I.usesound, 75, 1) to_chat(user, "You pry off the turret's exterior armor.") new /obj/item/stack/sheet/metal(loc, 2) build_step = 6 diff --git a/code/game/machinery/programmable_unloader.dm b/code/game/machinery/programmable_unloader.dm index a8806c3296c..c86d745c05a 100644 --- a/code/game/machinery/programmable_unloader.dm +++ b/code/game/machinery/programmable_unloader.dm @@ -198,9 +198,9 @@ /obj/machinery/programmable/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I,/obj/item/weapon/wrench)) // code borrowed from pipe dispenser if(unwrenched==0) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) to_chat(user, "You begin to unfasten \the [src] from the floor...") - if(do_after(user, 40, target = src)) + if(do_after(user, 40 * I.toolspeed, target = src)) user.visible_message( \ "[user] unfastens \the [src].", \ "You have unfastened \the [src]. Now it can be pulled somewhere else.", \ @@ -211,9 +211,9 @@ if(usr.machine==src) usr << browse(null, "window=pipedispenser") else /* unwrenched */ - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) to_chat(user, "You begin to fasten \the [src] to the floor...") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * I.toolspeed, target = src)) user.visible_message( \ "[user] fastens \the [src].", \ "You fastened \the [src] into place.", \ @@ -238,8 +238,9 @@ if(istype(I,/obj/item/weapon/crowbar)) if(open) to_chat(user, "You begin to pry out the [src]'s circuits.") - if(do_after(user,40, target = src)) + if(do_after(user, 40 * I.toolspeed, target = src)) to_chat(user, "You remove the circuitboard.") + playsound(loc, I.usesound, 50, 1) circuit_removed = 1 use_power = 0 on = 0 diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 7db5b4797be..1762840b52f 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -57,7 +57,7 @@ return anchored = !anchored to_chat(user, "You [anchored ? "attached" : "detached"] the recharger.") - playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(loc, G.usesound, 75, 1) /obj/machinery/recharger/attack_hand(mob/user as mob) add_fingerprint(user) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index fed3cd03768..4c396327fb6 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -238,7 +238,7 @@ update_icon() else if(istype(W, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(src.loc, W.usesound, 100, 1) if(is_open) to_chat(user, "You close the panel.") is_open = 0 @@ -250,11 +250,12 @@ var/obj/item/stack/cable_coil/coil = W to_chat(user, "You begin to replace the wires.") //if(do_after(user, min(60, round( ((maxhealth/health)*10)+(malfunction*10) ), target = src)) //Take longer to repair heavier damage - if(do_after(user, 30, target = src)) + if(do_after(user, 30 * coil.toolspeed, target = src)) if(!src || !coil) return coil.use(1) health = max_health malfunction = 0 + playsound(loc, coil.usesound, 50, 1) to_chat(user, "You repair the [src]!") update_icon() @@ -263,7 +264,7 @@ to_chat(user, "The bolts are covered, unlocking this would retract the covers.") return if(anchored) - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(src.loc, W.usesound, 100, 1) to_chat(user, "You unsecure the [src] from the floor!") if(active) to_chat(user, "The [src] shuts off!") @@ -271,7 +272,7 @@ anchored = 0 else if(istype(get_turf(src), /turf/space)) return //No wrenching these in space! - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(src.loc, W.usesound, 100, 1) to_chat(user, "You secure the [src] to the floor!") anchored = 1 @@ -460,14 +461,14 @@ else if(state == 0) state = 1 - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) to_chat(user, "You secure the external reinforcing bolts to the floor.") src.anchored = 1 return else if(state == 1) state = 0 - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) to_chat(user, "You undo the external reinforcing bolts.") src.anchored = 0 return diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index fe1a367efc8..eee465e062a 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -503,7 +503,7 @@ return if(istype(I, /obj/item/weapon/screwdriver)) src.panelopen = !src.panelopen - playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(src.loc, I.usesound, 100, 1) to_chat(user, text("You [] the unit's maintenance panel.",(src.panelopen ? "open up" : "close") )) src.updateUsrDialog() return diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index f9355a98d37..2f0dc7b2666 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -59,14 +59,14 @@ to_chat(user, "The bomb must be placed on solid ground to attach it") else to_chat(user, "You firmly wrench the bomb to the floor") - playsound(loc, 'sound/items/ratchet.ogg', 50, 1) + playsound(loc, I.usesound, 50, 1) anchored = 1 if(active) to_chat(user, "The bolts lock in place") else if(!active) to_chat(user, "You wrench the bomb from the floor") - playsound(loc, 'sound/items/ratchet.ogg', 50, 1) + playsound(loc, I.usesound, 50, 1) anchored = 0 else to_chat(user, "The bolts are locked down!") @@ -89,7 +89,7 @@ else to_chat(user, "There isn't anything in here to remove!") else if(open_panel) - to_chat(user, "The wires conneting the shell to the explosives are holding it down!") + to_chat(user, "The wires connecting the shell to the explosives are holding it down!") else to_chat(user, "The cover is screwed on, it won't pry off!") else if(istype(I, /obj/item/weapon/bombcore)) @@ -102,38 +102,51 @@ to_chat(user, "[payload] is already loaded into [src], you'll have to remove it first.") else ..() + +/obj/machinery/syndicatebomb/attack_ghost(mob/user) + interact(user) -/obj/machinery/syndicatebomb/attack_hand(var/mob/user) +/obj/machinery/syndicatebomb/attack_hand(mob/user) interact(user) /obj/machinery/syndicatebomb/attack_ai() return -/obj/machinery/syndicatebomb/interact(var/mob/user) +/obj/machinery/syndicatebomb/interact(mob/user) if(wires && open_panel) wires.Interact(user) - if(!open_panel) + if(!open_panel && can_interact(user)) if(!active) spawn() settings(user) return else if(anchored) to_chat(user, "The bomb is bolted to the floor!") - return + +/obj/machinery/syndicatebomb/proc/can_interact(mob/user) + if(user.can_advanced_admin_interact()) + return TRUE + if(!isliving(user)) + return FALSE + if(user.incapacitated()) + return FALSE + if(!Adjacent(user)) + return FALSE + return TRUE -/obj/machinery/syndicatebomb/proc/settings(var/mob/user) +/obj/machinery/syndicatebomb/proc/settings(mob/user) var/newtime = input(user, "Please set the timer.", "Timer", "[timer]") as num newtime = Clamp(newtime, 120, 60000) - if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station + if(can_interact(user)) //No running off and setting bombs from across the station timer = newtime - src.loc.visible_message("[bicon(src)] timer set for [timer] seconds.") - if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user)) + loc.visible_message("[bicon(src)] timer set for [timer] seconds.") + if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && can_interact(user)) if(defused || active) if(defused) - src.loc.visible_message("[bicon(src)] Device error: User intervention required.") + loc.visible_message("[bicon(src)] Device error: User intervention required.") return else - src.loc.visible_message("[bicon(src)] [timer] seconds until detonation, please clear the area.") + loc.visible_message("[bicon(src)] [timer] seconds until detonation, please clear the area.") playsound(loc, 'sound/machines/click.ogg', 30, 1) active = 1 update_icon() @@ -143,8 +156,8 @@ var/area/A = get_area(bombturf) if(payload && !istype(payload, /obj/item/weapon/bombcore/training)) msg_admin_attack("[key_name_admin(user)] has primed a [name] ([payload]) for detonation at [A.name] (JMP).") - log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])") - payload.adminlog = "The [src.name] that [key_name(user)] had primed detonated!" + log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name] ([bombturf.x], [bombturf.y], [bombturf.z])") + payload.adminlog = "\The [src] that [key_name(user)] had primed detonated!" /obj/machinery/syndicatebomb/proc/isWireCut(var/index) return wires.IsIndexCut(index) diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index c0e240b7fdb..48d65eb051b 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -184,8 +184,8 @@ attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params) if(istype(D, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, D.usesound, 50, 1) + if(do_after(user, 20 * D.toolspeed, target = src)) if(src.stat & BROKEN) to_chat(user, "The broken glass falls out.") var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index c1a10cacd48..db436bfb772 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -24,24 +24,24 @@ if(0) if(istype(P, /obj/item/weapon/screwdriver)) to_chat(user, "You unfasten the bolts.") - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) construct_op++ if(1) if(istype(P, /obj/item/weapon/screwdriver)) to_chat(user, "You fasten the bolts.") - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc,P.usesound, 50, 1) construct_op-- if(istype(P, /obj/item/weapon/wrench)) to_chat(user, "You dislodge the external plating.") - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, P.usesound, 75, 1) construct_op++ if(2) if(istype(P, /obj/item/weapon/wrench)) to_chat(user, "You secure the external plating.") - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, P.usesound, 75, 1) construct_op-- if(istype(P, /obj/item/weapon/wirecutters)) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the cables.") construct_op++ var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc ) @@ -51,6 +51,7 @@ if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/A = P if(A.amount >= 5) + playsound(loc, A.usesound, 50, 1) to_chat(user, "You insert the cables.") A.amount -= 5 if(A.amount <= 0) @@ -60,8 +61,8 @@ stat &= ~BROKEN // the machine's not borked anymore! if(istype(P, /obj/item/weapon/crowbar)) to_chat(user, "You begin prying out the circuit board other components...") - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - if(do_after(user,60, target = src)) + playsound(src.loc, P.usesound, 50, 1) + if(do_after(user, 60 * P.toolspeed, target = src)) to_chat(user, "You finish prying out the components.") // Drop all the component stuff diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index b2f607fe057..6b5201460e4 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -128,8 +128,8 @@ attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params) if(istype(D, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, D.usesound, 50, 1) + if(do_after(user, 20 * D.toolspeed, target = src)) if(src.stat & BROKEN) to_chat(user, "The broken glass falls out.") var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index bb25c072b7e..2aa0c2a5d59 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -340,8 +340,8 @@ /obj/machinery/computer/telecomms/traffic/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params) if(istype(D, /obj/item/weapon/screwdriver)) - playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(get_turf(src), D.usesound, 50, 1) + if(do_after(user, 20 * D.toolspeed, target = src)) if(src.stat & BROKEN) to_chat(user, "The broken glass falls out.") var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 163fbba7269..d9996b6fb9c 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -237,7 +237,7 @@ return if(istype(I, /obj/item/weapon/screwdriver) && anchored) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, I.usesound, 50, 1) panel_open = !panel_open to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") overlays.Cut() diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 23e18d53a0d..3493f03dd69 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -194,6 +194,8 @@ range = MELEE|RANGED var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock. var/canRwall = 0 + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/item/mecha_parts/mecha_equipment/rcd/New() rcd_list += src @@ -224,7 +226,7 @@ if(do_after_cooldown(W)) chassis.spark_system.start() W.ChangeTurf(/turf/simulated/floor/plating) - playsound(W, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(W, usesound, 50, 1) else if(istype(target, /turf/simulated/floor)) var/turf/simulated/floor/F = target occupant_message("Deconstructing [target]...") @@ -232,27 +234,27 @@ chassis.spark_system.start() F.ChangeTurf(/turf/space) F.air_update_turf() - playsound(F, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(F, usesound, 50, 1) else if(istype(target, /obj/machinery/door/airlock)) occupant_message("Deconstructing [target]...") if(do_after_cooldown(target)) chassis.spark_system.start() qdel(target) - playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(target, usesound, 50, 1) if(1) if(istype(target, /turf/space)) var/turf/space/S = target occupant_message("Building Floor...") if(do_after_cooldown(S)) S.ChangeTurf(/turf/simulated/floor/plating) - playsound(S, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(S, usesound, 50, 1) chassis.spark_system.start() else if(istype(target, /turf/simulated/floor)) var/turf/simulated/floor/F = target occupant_message("Building Wall...") if(do_after_cooldown(F)) F.ChangeTurf(/turf/simulated/wall) - playsound(F, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(F, usesound, 50, 1) chassis.spark_system.start() if(2) if(istype(target, /turf/simulated/floor)) @@ -261,7 +263,7 @@ chassis.spark_system.start() var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock(target) T.autoclose = 1 - playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(target, usesound, 50, 1) playsound(target, 'sound/effects/sparks2.ogg', 50, 1) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 20913bfe33b..eebe3487c1b 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -734,7 +734,7 @@ // Since having maint protocols available is controllable by the MMI, I see this as a consensual way to remove an MMI without destroying the mech user.visible_message("[user] begins levering out the MMI from the [src].", "You begin to lever out the MMI from the [src].") to_chat(occupant, "[user] is prying you out of the exosuit!") - if(do_after(user,80,target=src)) + if(do_after(user, 80 * W.toolspeed, target=src)) user.visible_message("[user] pries the MMI out of the [src]!", "You finish removing the MMI from the [src]!") go_out() return diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index f1641c94b64..76fa87f6988 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -6,22 +6,25 @@ if(istype(used_atom, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/W = used_atom if(W.remove_fuel(0, user)) - playsound(holder, 'sound/items/Welder2.ogg', 50, 1) + playsound(holder, W.usesound, 50, 1) else return 0 else if(istype(used_atom, /obj/item/weapon/wrench)) - playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) + var/obj/item/weapon/wrench/W = used_atom + playsound(holder, W.usesound, 50, 1) else if(istype(used_atom, /obj/item/weapon/screwdriver)) - playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) + var/obj/item/weapon/screwdriver/S = used_atom + playsound(holder, S.usesound, 50, 1) else if(istype(used_atom, /obj/item/weapon/wirecutters)) - playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) + var/obj/item/weapon/wirecutters/W = used_atom + playsound(holder, W.usesound, 50, 1) else if(istype(used_atom, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = used_atom if(C.use(4)) - playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(holder, C.usesound, 50, 1) else to_chat(user, ("There's not enough cable to finish the task.")) return 0 @@ -38,22 +41,25 @@ if(istype(used_atom, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/W = used_atom if(W.remove_fuel(0, user)) - playsound(holder, 'sound/items/Welder2.ogg', 50, 1) + playsound(holder, W.usesound, 50, 1) else return 0 else if(istype(used_atom, /obj/item/weapon/wrench)) - playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) + var/obj/item/weapon/wrench/W = used_atom + playsound(holder, W.usesound, 50, 1) else if(istype(used_atom, /obj/item/weapon/screwdriver)) - playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) + var/obj/item/weapon/screwdriver/S = used_atom + playsound(holder, S.usesound, 50, 1) else if(istype(used_atom, /obj/item/weapon/wirecutters)) - playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) + var/obj/item/weapon/wirecutters/W = used_atom + playsound(holder, W.usesound, 50, 1) else if(istype(used_atom, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = used_atom if(C.use(4)) - playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(holder, C.usesound, 50, 1) else to_chat(user, ("There's not enough cable to finish the task.")) return 0 diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index 6c499427f9a..c115119cc97 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -35,7 +35,7 @@ var/obj/item/weapon/weldingtool/WT = W if(salvage_num <= 0) user.visible_message("[user] begins to slice apart the now completely stripped [src].", "You begin to slice apart the [src].", "You hear the sound of a welder nearby.") - if(WT.remove_fuel(0,user) && do_after(user,80,target=src)) + if(WT.remove_fuel(0,user) && do_after(user, 80 * WT.toolspeed, target = src)) user.visible_message("The now-dilapidated [src] falls apart in a clatter.", "As you slice apart the final support structures, the [src] falls apart in a heap.", "You hear metal clanking to the floor.") new /obj/item/stack/sheet/metal(src.loc) var/obj/item/stack/rods/rods = new /obj/item/stack/rods(src.loc) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 19cbbd38c5a..122f1741a3c 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -222,7 +222,7 @@ var/obj/item/weapon/weldingtool/WT = I if(WT.remove_fuel(0, user)) damage = 15 - playsound(loc, 'sound/items/Welder.ogg', 100, 1) + playsound(loc, WT.usesound, 100, 1) health -= damage healthcheck() @@ -381,7 +381,7 @@ if(WT.remove_fuel(0, user)) damage = 15 - playsound(loc, 'sound/items/Welder.ogg', 100, 1) + playsound(loc, WT.usesound, 100, 1) health -= damage user.changeNext_move(CLICK_CD_MELEE) diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 9c3dd867c74..62395eb3135 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -309,7 +309,7 @@ obj/structure/sign/poster/New(serial,var/subtypeIn = -1) obj/structure/sign/poster/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/wirecutters)) - playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) + playsound(loc, I.usesound, 100, 1) if(ruined) to_chat(user, "You remove the remnants of the poster.") qdel(src) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 8443ac90f17..80cbb208c76 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -33,7 +33,7 @@ if(WT.remove_fuel(0, user)) damage = 15 - playsound(loc, 'sound/items/Welder.ogg', 100, 1) + playsound(loc, WT.usesound, 100, 1) health -= damage healthcheck() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b4789991887..ce81575a1ea 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -19,6 +19,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/r_speed = 1.0 var/health = null var/hitsound = null + var/usesound = null var/w_class = 3 var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE @@ -60,6 +61,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/block_chance = 0 var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom + var/toolspeed = 1 // If this item is a tool, the speed multiplier + /* Species-specific sprites, concept stolen from Paradise//vg/. ex: sprite_sheets = list( diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 2a2237559fb..3852d67e6ff 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -10,6 +10,7 @@ w_class = 1 slot_flags = SLOT_BELT | SLOT_EARS attack_verb = list("attacked", "coloured") + toolspeed = 1 var/colour = "#FF0000" //RGB var/drawtype = "rune" var/list/graffiti = list("body","amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","up","down","left","right","heart","borgsrogue","voxpox","shitcurity","catbeast","hieroglyphs1","hieroglyphs2","hieroglyphs3","security","syndicate1","syndicate2","nanotrasen","lie","valid","arrowleft","arrowright","arrowup","arrowdown","chicken","hailcrab","brokenheart","peace","scribble","scribble2","scribble3","skrek","squish","tunnelsnake","yip","youaredead") @@ -86,7 +87,7 @@ else if(graffiti.Find(drawtype)) temp = "graffiti" to_chat(user, "You start drawing a [temp] on the [target.name].") - if(instant || do_after(user, 50, target = target)) + if(instant || do_after(user, 50 * toolspeed, target = target)) var/obj/effect/decal/cleanable/crayon/C = new /obj/effect/decal/cleanable/crayon(target,colour,drawtype,temp) C.add_hiddenprint(user) to_chat(user, "You finish drawing [temp].") diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm index fb5d49165af..a4e0fba0c6c 100644 --- a/code/game/objects/items/devices/modkit.dm +++ b/code/game/objects/items/devices/modkit.dm @@ -14,7 +14,7 @@ /obj/item/clothing/suit/space/hardsuit ) -/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity) +/obj/item/device/modkit/afterattack(obj/item/O, mob/user as mob, proximity) if(!proximity) return @@ -47,7 +47,7 @@ to_chat(user, "[O] must be safely placed on the ground for modification.") return - playsound(user.loc, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(user.loc, O.usesound, 100, 1) user.visible_message("[user] opens \the [src] and modifies \the [O].","You open \the [src] and modify \the [O].") diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 742afb83c81..e734f22b97f 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -1,3 +1,7 @@ +#define PROXIMITY_NONE "" +#define PROXIMITY_ON_SCREEN "_red" +#define PROXIMITY_NEAR "_yellow" + /** * Multitool -- A multitool is used for hacking electronic devices. * TO-DO -- Using it as a power measurement tool for cables etc. Nannek. @@ -10,13 +14,15 @@ icon_state = "multitool" flags = CONDUCT force = 5.0 - w_class = 2 - throwforce = 5.0 - throw_range = 15 + w_class = WEIGHT_CLASS_SMALL + throwforce = 0 + throw_range = 7 throw_speed = 3 - desc = "You can use this on airlocks or APCs to try to hack them without cutting wires." materials = list(MAT_METAL=50, MAT_GLASS=20) - origin_tech = "magnets=1;engineering=1" + origin_tech = "magnets=1;engineering=2" + toolspeed = 1 + hitsound = 'sound/weapons/tap.ogg' + var/shows_wire_information = FALSE // shows what a wire does if set to TRUE var/obj/machinery/buffer // simple machine buffer for device linkage /obj/item/device/multitool/proc/IsBufferA(var/typepath) @@ -28,38 +34,74 @@ /obj/item/device/multitool/ai_detect - var/track_delay = 0 + var/track_cooldown = 0 + var/track_delay = 10 //How often it checks for proximity + var/detect_state = PROXIMITY_NONE + var/rangealert = 8 //Glows red when inside + var/rangewarning = 20 //Glows yellow when inside + origin_tech = "magnets=1;engineering=2;syndicate=1" /obj/item/device/multitool/ai_detect/New() ..() processing_objects += src - /obj/item/device/multitool/ai_detect/Destroy() processing_objects -= src return ..() /obj/item/device/multitool/ai_detect/process() - - if(track_delay > world.time) + if(track_cooldown > world.time) return - - var/found_eye = 0 - - for(var/mob/camera/aiEye/A in living_mob_list) - - var/turf/our_turf = get_turf(src) - var/turf/eye_turf = get_turf(A) - - if(get_dist(our_turf, eye_turf) < 9) - found_eye = 1 + detect_state = PROXIMITY_NONE + multitool_detect() + icon_state = "[initial(icon_state)][detect_state]" + track_cooldown = world.time + track_delay + +/obj/item/device/multitool/ai_detect/proc/multitool_detect() + var/turf/our_turf = get_turf(src) + for(var/mob/living/silicon/ai/AI in ai_list) + if(AI.cameraFollow == src) + detect_state = PROXIMITY_ON_SCREEN break - if(found_eye) - icon_state = "[initial(icon_state)]_red" - else - icon_state = initial(icon_state) + if(!detect_state && cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z)) + var/datum/camerachunk/chunk = cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z) + if(chunk) + if(chunk.seenby.len) + for(var/mob/camera/aiEye/A in chunk.seenby) + var/turf/detect_turf = get_turf(A) + if(get_dist(our_turf, detect_turf) < rangealert) + detect_state = PROXIMITY_ON_SCREEN + break + if(get_dist(our_turf, detect_turf) < rangewarning) + detect_state = PROXIMITY_NEAR + break + +/obj/item/device/multitool/ai_detect/admin + desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'" //What else should I say for a meme item? + track_delay = 5 + shows_wire_information = TRUE - track_delay = world.time + 10 // 1 second - return +/obj/item/device/multitool/ai_detect/admin/multitool_detect() + var/turf/our_turf = get_turf(src) + for(var/mob/J in urange(rangewarning,our_turf)) + if(check_rights(R_ADMIN, 0, J)) + detect_state = PROXIMITY_NEAR + var/turf/detect_turf = get_turf(J) + if(get_dist(our_turf, detect_turf) < rangealert) + detect_state = PROXIMITY_ON_SCREEN + break +/obj/item/device/multitool/cyborg + name = "multitool" + desc = "Optimised and stripped-down version of a regular multitool." + toolspeed = 0.5 + +/obj/item/device/multitool/abductor + name = "alien multitool" + desc = "An omni-technological interface." + icon = 'icons/obj/abductor.dmi' + icon_state = "multitool" + toolspeed = 0.1 + origin_tech = "magnets=5;engineering=5;abductor=3" + shows_wire_information = TRUE diff --git a/code/game/objects/items/devices/pizza_bomb.dm b/code/game/objects/items/devices/pizza_bomb.dm index 836da188bba..093d7481c51 100644 --- a/code/game/objects/items/devices/pizza_bomb.dm +++ b/code/game/objects/items/devices/pizza_bomb.dm @@ -63,7 +63,7 @@ var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained()) return - playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1) + playsound(src, I.usesound, 50, 1, 1) user.visible_message("[user] cuts the [chosen_wire] wire!", "You cut the [chosen_wire] wire!") sleep(5) if(chosen_wire == correct_wire) @@ -84,8 +84,8 @@ to_chat(user, "You can't see the box well enough to cut the wires out.") return user.visible_message("[user] starts removing the payload and wires from \the [src].") - if(do_after(user, 40, target = src)) - playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1) + if(do_after(user, 40 * I.toolspeed, target = src)) + playsound(src, I.usesound, 50, 1, 1) user.unEquip(src) user.visible_message("[user] removes the insides of \the [src]!") var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(src.loc) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 12b12c14406..43289678591 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -138,8 +138,8 @@ if(3) if(iswirecutter(W) && b_stat && wires.IsAllCut()) to_chat(user, "You cut out the intercoms wiring and disconnect its electronics.") - playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1) - if(do_after(user, 10, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 10 * W.toolspeed, target = src)) if(buildstage != 3) return new /obj/item/stack/cable_coil(get_turf(src),5) @@ -152,8 +152,8 @@ else return ..() if(2) if(isscrewdriver(W)) - playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 10, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 10 * W.toolspeed, target = src)) update_icon() on = 1 b_stat = 0 @@ -170,15 +170,15 @@ if(coil.amount < 5) to_chat(user, "You need more cable for this!") return - if(do_after(user, 10, target = src)) + if(do_after(user, 10 * coil.toolspeed, target = src)) coil.use(5) to_chat(user, "You wire \the [src]!") buildstage = 2 return 1 if(iscrowbar(W)) to_chat(user, "You begin removing the electronics...") - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 10, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 10 * W.toolspeed, target = src)) if(buildstage != 1) return new /obj/item/weapon/intercom_electronics(get_turf(src)) @@ -187,19 +187,19 @@ return 1 if(0) if(istype(W,/obj/item/weapon/intercom_electronics)) - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 10, target = src)) + playsound(get_turf(src), W.usesound, 50, 1) + if(do_after(user, 10 * W.toolspeed, target = src)) qdel(W) to_chat(user, "You insert \the [W] into \the [src]!") buildstage = 1 return 1 if(iswelder(W)) var/obj/item/weapon/weldingtool/WT=W - playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1) + playsound(get_turf(src), WT.usesound, 50, 1) if(!WT.remove_fuel(3, user)) to_chat(user, "You're out of welding fuel.") return 1 - if(do_after(user, 10, target = src)) + if(do_after(user, 10 * WT.toolspeed, target = src)) to_chat(user, "You cut the intercom frame from the wall!") new /obj/item/mounted/frame/intercom(get_turf(src)) qdel(src) @@ -233,6 +233,8 @@ desc = "Looks like a circuit. Probably is." w_class = 2 materials = list(MAT_METAL=50, MAT_GLASS=50) + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/item/device/radio/intercom/locked var/locked_frequency diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index ff97e30cf33..f79e6693940 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -94,7 +94,7 @@ var/global/list/default_medbay_channels = list( secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT) /obj/item/device/radio/attack_ghost(mob/user) - return ui_interact(user) + return interact(user) /obj/item/device/radio/attack_self(mob/user as mob) user.set_machine(src) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 1ac623f82f7..7d96ae6d82e 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -279,7 +279,7 @@ REAGENT SCANNER else to_chat(user, "You install the upgrade in the [src].") overlays += "advanced" - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, usesound, 50, 1) upgraded = 1 qdel(W) @@ -296,6 +296,7 @@ REAGENT SCANNER desc = "An upgrade unit that can be installed on a health analyzer for expanded functionality." w_class = 1 origin_tech = "magnets=2;biotech=2" + usesound = 'sound/items/Deconstruct.ogg' /obj/item/device/analyzer desc = "A hand-held environmental scanner which reports current gas levels." diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index c573e4ff975..43aff1cb05d 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -303,7 +303,7 @@ /obj/item/device/tape/attackby(obj/item/I, mob/user) if(ruined && istype(I, /obj/item/weapon/screwdriver)) to_chat(user, "You start winding the tape back in.") - if(do_after(user, 120, target = src)) + if(do_after(user, 120 * I.toolspeed, target = src)) to_chat(user, "You wound the tape back in!") fix() else if(istype(I, /obj/item/weapon/pen)) diff --git a/code/game/objects/items/mountable_frames/frames.dm b/code/game/objects/items/mountable_frames/frames.dm index e377cac4015..b8ef9216053 100644 --- a/code/game/objects/items/mountable_frames/frames.dm +++ b/code/game/objects/items/mountable_frames/frames.dm @@ -3,6 +3,8 @@ desc = "Place it on a wall." var/sheets_refunded = 2 var/list/mount_reqs = list() //can contain simfloor, nospace. Used in try_build to see if conditions are needed, then met + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/item/mounted/frame/attackby(obj/item/weapon/W, mob/user) ..() diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 55e1cc4a722..a21bb504fdc 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -6,7 +6,7 @@ icon_state = "tube" origin_tech = "materials=3;engineering=2" amount = 10 - + toolspeed = 1 /obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob) if(!istype(M) || !istype(user)) diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index bde2de6fda3..0925a433d45 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -14,6 +14,8 @@ max_amount = 60 attack_verb = list("hit", "bludgeoned", "whacked") hitsound = 'sound/weapons/grenadelaunch.ogg' + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/item/stack/rods/cyborg materials = list() diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index 46f7b3fb469..3a2d07aa2f6 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -143,7 +143,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \ /obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(W.sharp) user.visible_message("[user] starts cutting hair off \the [src].", "You start cutting the hair off \the [src]...", "You hear the sound of a knife rubbing against flesh.") - if(do_after(user,50, target = src)) + if(do_after(user, 50 * W.toolspeed, target = src)) to_chat(user, "You cut the hair from this [src.singular_name].") //Try locating an exisitng stack on the tile and add to there if possible for(var/obj/item/stack/sheet/hairlesshide/HS in usr.loc) diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 2a8b2130be6..4e5a0e9fdc8 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -9,6 +9,8 @@ attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") var/perunit = MINERAL_MATERIAL_AMOUNT var/sheettype = null //this is used for girders in the creation of walls/false walls + usesound = 'sound/items/Deconstruct.ogg' + toolspeed = 1 // Since the sheetsnatcher was consolidated into weapon/storage/bag we now use diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index feb681e47c2..87da0987487 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1301,7 +1301,7 @@ obj/item/toy/cards/deck/syndicate/black /obj/item/toy/minigibber/attackby(var/obj/O, var/mob/user, params) if(istype(O,/obj/item/toy/character) && O.loc == user) to_chat(user, "You start feeding \the [O] [bicon(O)] into \the [src]'s mini-input.") - if(do_after(user,10, target = src)) + if(do_after(user, 10, target = src)) if(O.loc != user) to_chat(user, "\The [O] is too far away to feed into \the [src]!") else diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index bb57a4a2cc2..6c105796150 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -20,6 +20,8 @@ RCD w_class = 3 materials = list(MAT_METAL = 30000) origin_tech = "engineering=4;materials=2" + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' var/datum/effect/system/spark_spread/spark_system var/max_matter = 100 var/matter = 0 @@ -172,7 +174,7 @@ RCD door_name = temp_t /obj/item/weapon/rcd/proc/activate() - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(loc, usesound, 50, 1) /obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity) @@ -197,7 +199,7 @@ RCD if(checkResource(3, user)) to_chat(user, "Building Wall ...") playsound(loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 20, target = A)) + if(do_after(user, 20 * toolspeed, target = A)) if(!useResource(3, user)) return 0 activate() var/turf/AT = A @@ -210,7 +212,7 @@ RCD if(checkResource(10, user)) to_chat(user, "Building Airlock...") playsound(loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 50, target = A)) + if(do_after(user, 50 * toolspeed, target = A)) if(!useResource(10, user)) return 0 activate() var/obj/machinery/door/airlock/T = new door_type(A) @@ -231,7 +233,7 @@ RCD if(checkResource(5, user)) to_chat(user, "Deconstructing Wall...") playsound(loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 40, target = A)) + if(do_after(user, 40 * toolspeed, target = A)) if(!useResource(5, user)) return 0 activate() var/turf/AT = A @@ -243,7 +245,7 @@ RCD if(checkResource(5, user)) to_chat(user, "Deconstructing Floor...") playsound(loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 50, target = A)) + if(do_after(user, 50 * toolspeed, target = A)) if(!useResource(5, user)) return 0 activate() var/turf/AT = A @@ -255,7 +257,7 @@ RCD if(checkResource(20, user)) to_chat(user, "Deconstructing Airlock...") playsound(loc, 'sound/machines/click.ogg', 50, 1) - if(do_after(user, 50, target = A)) + if(do_after(user, 50 * toolspeed, target = A)) if(!useResource(20, user)) return 0 activate() qdel(A) @@ -270,7 +272,7 @@ RCD return 0 to_chat(user, "Deconstructing window...") playsound(loc, 'sound/machines/click.ogg', 50, 1) - if(!do_after(user, 20, target = A)) + if(!do_after(user, 20 * toolspeed, target = A)) return 0 if(locate(/obj/structure/window/full/shuttle) in A.contents) return 0 // Let's not give shuttle-griefers an easy time. @@ -307,7 +309,7 @@ RCD return 0 to_chat(user, "Constructing window...") playsound(loc, 'sound/machines/click.ogg', 50, 1) - if(!do_after(user, 20, target = A)) + if(!do_after(user, 20 * toolspeed, target = A)) return 0 if(locate(/obj/structure/grille) in A.contents) return 0 // We already have window diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index e60a68f42d6..f311d56d1ba 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -87,6 +87,8 @@ icon_state = "razor" flags = CONDUCT w_class = 1 + usesound = 'sound/items/Welder2.ogg' + toolspeed = 1 /obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob) if(ishuman(M)) @@ -106,24 +108,24 @@ if(H == user) //shaving yourself user.visible_message("[user] starts to shave their facial hair with \the [src].", \ "You take a moment shave your facial hair with \the [src].") - if(do_after(user, 50, target = H)) + if(do_after(user, 50 * toolspeed, target = H)) user.visible_message("[user] shaves his facial hair clean with the [src].", \ "You finish shaving with the [src]. Fast and clean!") C.f_style = "Shaved" H.update_fhair() - playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1) + playsound(src.loc, usesound, 20, 1) else var/turf/user_loc = user.loc var/turf/H_loc = H.loc user.visible_message("[user] tries to shave [H]'s facial hair with \the [src].", \ "You start shaving [H]'s facial hair.") - if(do_after(user, 50, target = H)) + if(do_after(user, 50 * toolspeed, target = H)) if(user_loc == user.loc && H_loc == H.loc) user.visible_message("[user] shaves off [H]'s facial hair with \the [src].", \ "You shave [H]'s facial hair clean off.") C.f_style = "Shaved" H.update_fhair() - playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1) + playsound(src.loc, usesound, 20, 1) if(user.zone_sel.selecting == "head") if(!get_location_accessible(H, "head")) to_chat(user, "The headgear is in the way.") @@ -137,24 +139,24 @@ if(H == user) //shaving yourself user.visible_message("[user] starts to shave their head with \the [src].", \ "You start to shave your head with \the [src].") - if(do_after(user, 50, target = H)) + if(do_after(user, 50 * toolspeed, target = H)) user.visible_message("[user] shaves his head with the [src].", \ "You finish shaving with the [src].") C.h_style = "Skinhead" H.update_hair() - playsound(src.loc, 'sound/items/Welder2.ogg', 40, 1) + playsound(src.loc, usesound, 40, 1) else var/turf/user_loc = user.loc var/turf/H_loc = H.loc user.visible_message("[user] tries to shave [H]'s head with \the [src]!", \ "You start shaving [H]'s head.") - if(do_after(user, 50, target = H)) + if(do_after(user, 50 * toolspeed, target = H)) if(user_loc == user.loc && H_loc == H.loc) user.visible_message("[user] shaves [H]'s head bald with \the [src]!", \ "You shave [H]'s head bald.") C.h_style = "Skinhead" H.update_hair() - playsound(src.loc, 'sound/items/Welder2.ogg', 40, 1) + playsound(src.loc, usesound, 40, 1) else ..() else diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 924b5e3d590..4151cdc0d05 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -256,6 +256,7 @@ force = 0 throwforce = 6 w_class = 4 + toolspeed = 1 var/revivecost = 1000 var/cooldown = 0 @@ -346,7 +347,7 @@ user.visible_message("[user] begins to place [src] on [M.name]'s chest.", "You begin to place [src] on [M.name]'s chest.") busy = 1 update_icon() - if(do_after(user, 30, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process + if(do_after(user, 30 * toolspeed, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process user.visible_message("[user] places [src] on [M.name]'s chest.", "You place [src] on [M.name]'s chest.") playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0) var/mob/dead/observer/ghost = H.get_ghost() @@ -362,7 +363,7 @@ var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting var/total_burn = 0 var/total_brute = 0 - if(do_after(user, 20, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total + if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total for(var/obj/item/carried_item in H.contents) if(istype(carried_item, /obj/item/clothing/suit/space)) if(!defib.combat) @@ -455,6 +456,7 @@ var/busy = 0 var/safety = 1 flags = NODROP + toolspeed = 1 /obj/item/weapon/borg_defib/attack(mob/M, mob/user) var/tobehealed @@ -495,7 +497,7 @@ user.visible_message("[user] begins to place [src] on [M.name]'s chest.", "You begin to place [src] on [M.name]'s chest.") busy = 1 update_icon() - if(do_after(user, 30, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process + if(do_after(user, 30 * toolspeed, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process user.visible_message("[user] places [src] on [M.name]'s chest.", "You place [src] on [M.name]'s chest.") playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0) var/mob/dead/observer/ghost = H.get_ghost() @@ -511,7 +513,7 @@ var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting var/total_burn = 0 var/total_brute = 0 - if(do_after(user, 20, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total + if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total if(H.stat == 2) var/health = H.health M.visible_message("[M]'s body convulses a bit.") diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 3269aefde0e..bd6a18b73c1 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -7,6 +7,7 @@ det_time = 10 display_timer = 0 origin_tech = "syndicate=2" + toolspeed = 1 var/atom/target = null var/image_overlay = null var/obj/item/device/assembly_holder/nadeassembly = null @@ -36,7 +37,7 @@ update_icon() return if(nadeassembly && istype(I, /obj/item/weapon/wirecutters)) - playsound(src, 'sound/items/Wirecutter.ogg', 20, 1) + playsound(src, I.usesound, 20, 1) nadeassembly.loc = get_turf(src) nadeassembly.master = null nadeassembly = null @@ -73,7 +74,7 @@ return to_chat(user, "You start planting the [src]. The timer is set to [det_time]...") - if(do_after(user, 50, target = AM)) + if(do_after(user, 50 * toolspeed, target = AM)) if(!user.unEquip(src)) return src.target = AM diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index c49b2341f29..6ca1d53e5db 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -11,6 +11,7 @@ var/payload_name = null // used for spawned grenades w_class = 2 force = 2 + var/prime_sound = 'sound/items/Screwdriver2.ogg' var/stage = EMPTY var/list/beakers = list() var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle) @@ -124,7 +125,7 @@ if(stage == WIRED) if(beakers.len) to_chat(user, "You lock the assembly.") - playsound(loc, 'sound/items/Screwdriver.ogg', 25, -3) + playsound(loc, prime_sound, 25, -3) stage = READY update_icon() var/contained = "" @@ -265,7 +266,7 @@ has_reagents = 1 if(!has_reagents) - playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1) + playsound(loc, usesound, 50, 1) return if(nadeassembly) @@ -347,7 +348,7 @@ if(E.reagents.total_volume) has_reagents = 1 if(!has_reagents) - playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1) + playsound(loc, prime_sound, 50, 1) return playsound(loc, 'sound/effects/bamf.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 7b1187bcc50..723920e7a5c 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -130,7 +130,7 @@ to_chat(user, "You need at least six metal sheets to make good enough weights!") return to_chat(user, "You begin to apply [I] to [src]...") - if(do_after(user, 35, target = src)) + if(do_after(user, 35 * M.toolspeed, target = src)) var/obj/item/weapon/restraints/legcuffs/bola/S = new /obj/item/weapon/restraints/legcuffs/bola M.use(6) user.put_in_hands(S) diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 6d5efda18b7..8209de8da80 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -9,6 +9,7 @@ w_class = 2 origin_tech = "materials=1;biotech=3;programming=2" materials = list(MAT_METAL=600, MAT_GLASS=200) + toolspeed = 1 var/obj/item/weapon/implant/imp = null @@ -29,7 +30,7 @@ M.visible_message("[user] is attemping to implant [M].") var/turf/T = get_turf(M) - if(T && (M == user || do_after(user, 50, target = M))) + if(T && (M == user || do_after(user, 50 * toolspeed, target = M))) if(user && M && (get_turf(M) == T) && src && imp) if(imp.implant(M, user)) if(M == user) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 5e262ce4afa..b40f81bef60 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -8,6 +8,8 @@ var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") no_embed = 1 // Physically impossible for energy weapons to embed themselves into people, this should fix that. -- Dave hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave + usesound = 'sound/weapons/blade1.ogg' + toolspeed = 1 /obj/item/weapon/melee/energy/suicide_act(mob/user) user.visible_message(pick("[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.", \ diff --git a/code/game/objects/items/weapons/powerfist.dm b/code/game/objects/items/weapons/powerfist.dm index 0167ab589be..99bf305df42 100644 --- a/code/game/objects/items/weapons/powerfist.dm +++ b/code/game/objects/items/weapons/powerfist.dm @@ -46,7 +46,7 @@ fisto_setting = 3 if(3) fisto_setting = 1 - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You tweak \the [src]'s piston valve to [fisto_setting].") else if(istype(W, /obj/item/weapon/screwdriver)) if(tank) diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm index 00b85d8ebe1..6cfb677bd21 100644 --- a/code/game/objects/items/weapons/scissors.dm +++ b/code/game/objects/items/weapons/scissors.dm @@ -9,6 +9,7 @@ w_class = 2 hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("slices", "cuts", "stabs", "jabs") + toolspeed = 1 /obj/item/weapon/scissors/barber name = "Barber's Scissors" @@ -16,6 +17,7 @@ icon_state = "bscissor" item_state = "scissor" attack_verb = list("beautifully sliced", "artistically cut", "smoothly stabbed", "quickly jabbed") + toolspeed = 0.75 /obj/item/weapon/scissors/attack(mob/living/carbon/M as mob, mob/user as mob) if(user.a_intent != "help") @@ -79,7 +81,7 @@ var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair user.visible_message("[user] starts cutting [M]'s hair!", "You start cutting [M]'s hair!") //arguments for this are: 1. what others see 2. what the user sees. --Fixed grammar, (TGameCo) playsound(loc, 'sound/goonstation/misc/Scissor.ogg', 100, 1) - if(do_after(user, 50, target = H)) //this is the part that adds a delay. delay is in deciseconds. --Made it 5 seconds, because hair isn't cut in one second in real life, and I want at least a little bit longer time, (TGameCo) + if(do_after(user, 50 * toolspeed, target = H)) //this is the part that adds a delay. delay is in deciseconds. --Made it 5 seconds, because hair isn't cut in one second in real life, and I want at least a little bit longer time, (TGameCo) if(!(M in view(1))) //Adjacency test user.visible_message("[user] stops cutting [M]'s hair.", "You stop cutting [M]'s hair.") return @@ -112,7 +114,7 @@ is_cutting = 1 user.visible_message("[user] starts cutting [M]'s hair!", "You start cutting [M]'s hair!") playsound(loc, 'sound/goonstation/misc/Scissor.ogg', 100, 1) - if(do_after(user, 50, target = H)) + if(do_after(user, 50 * toolspeed, target = H)) playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) user.visible_message("[user] abruptly stops cutting [M]'s hair and slices their throat!", "You stop cutting [M]'s hair and slice their throat!") //Just a little off the top. H.AdjustLoseBreath(10) //30 Oxy damage over time diff --git a/code/game/objects/items/weapons/stock_parts.dm b/code/game/objects/items/weapons/stock_parts.dm index e6e58196108..74fc3a5be6c 100644 --- a/code/game/objects/items/weapons/stock_parts.dm +++ b/code/game/objects/items/weapons/stock_parts.dm @@ -6,7 +6,7 @@ icon_state = "RPED" item_state = "RPED" w_class = 5 - can_hold = list("/obj/item/weapon/stock_parts") + can_hold = list(/obj/item/weapon/stock_parts) storage_slots = 50 use_to_pickup = 1 allow_quick_gather = 1 @@ -18,6 +18,8 @@ var/works_from_distance = 0 var/primary_sound = 'sound/items/rped.ogg' var/alt_sound = null + toolspeed = 1 + usesound = 'sound/items/rped.ogg' /obj/item/weapon/storage/part_replacer/afterattack(obj/machinery/T as obj, mob/living/carbon/human/user as mob, flag, params) if(flag) @@ -41,6 +43,8 @@ works_from_distance = 1 primary_sound = 'sound/items/PSHOOM.ogg' alt_sound = 'sound/items/PSHOOM_2.ogg' + usesound = 'sound/items/PSHOOM.ogg' + toolspeed = 0.5 /obj/item/weapon/storage/part_replacer/proc/play_rped_sound() //Plays the sound for RPED exchanging or installing parts. @@ -61,9 +65,12 @@ icon = 'icons/obj/stock_parts.dmi' w_class = 2 var/rating = 1 - New() - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' + +/obj/item/weapon/stock_parts/New() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) //Rank 1 diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 1a426026291..d0dee297cd7 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -51,7 +51,7 @@ var/response = alert(user, "Are you sure you want to put the bag of holding inside another bag of holding?","Are you sure you want to die?","Yes","No") if(response == "Yes") user.visible_message("[user] grins as \he begins to put a Bag of Holding into a Bag of Holding!", "You begin to put the Bag of Holding into the Bag of Holding!") - if(do_after(user,30,target=src)) + if(do_after(user, 30, target=src)) investigate_log("has become a singularity. Caused by [user.key]","singulo") user.visible_message("[user] erupts in evil laughter as \he puts the Bag of Holding into another Bag of Holding!", "You can't help but laugh wildly as you put the Bag of Holding into another Bag of Holding, complete darkness surrounding you."," You hear the sound of scientific evil brewing! ") qdel(W) diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index b2430e28e40..b90d11a543e 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -37,7 +37,7 @@ max_w_class = 2 storage_slots = 30 can_hold = list() // any - cant_hold = list("/obj/item/weapon/disk/nuclear") + cant_hold = list(/obj/item/weapon/disk/nuclear) /obj/item/weapon/storage/bag/trash/suicide_act(mob/user) user.visible_message("[user] puts the [src.name] over their head and starts chomping at the insides! Disgusting!") @@ -93,7 +93,7 @@ storage_slots = 7 display_contents_with_number = 0 //or else this will lead to stupid behavior. can_hold = list() // any - cant_hold = list("/obj/item/weapon/disk/nuclear") + cant_hold = list(/obj/item/weapon/disk/nuclear) /obj/item/weapon/storage/bag/plasticbag/mob_can_equip(M as mob, slot) @@ -136,7 +136,7 @@ storage_slots = 50 max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class max_w_class = 3 - can_hold = list("/obj/item/weapon/ore") + can_hold = list(/obj/item/weapon/ore) /obj/item/weapon/storage/bag/ore/cyborg name = "cyborg mining satchel" @@ -166,7 +166,7 @@ max_combined_w_class = 100 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class max_w_class = 3 w_class = 1 - can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown","/obj/item/weapon/reagent_containers/food/snacks/ash_flora") + can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown,/obj/item/weapon/reagent_containers/food/snacks/ash_flora) burn_state = FLAMMABLE /obj/item/weapon/storage/bag/plants/portaseeder @@ -345,8 +345,7 @@ max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class max_w_class = 3 w_class = 1 - - can_hold = list("/obj/item/weapon/coin","/obj/item/stack/spacecash") + can_hold = list(/obj/item/weapon/coin,/obj/item/stack/spacecash) // ----------------------------- // Book bag @@ -362,7 +361,7 @@ max_combined_w_class = 21 max_w_class = 3 w_class = 4 //Bigger than a book because physics - can_hold = list("/obj/item/weapon/book", "/obj/item/weapon/storage/bible", "/obj/item/weapon/tome", "/obj/item/weapon/spellbook") + can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/bible, /obj/item/weapon/tome, /obj/item/weapon/spellbook) burn_state = FLAMMABLE /* @@ -471,7 +470,7 @@ storage_slots = 50 max_combined_w_class = 200 w_class = 1 - can_hold = list("/obj/item/weapon/reagent_containers/food/pill","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle") + can_hold = list(/obj/item/weapon/reagent_containers/food/pill,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/glass/bottle) burn_state = FLAMMABLE /* * Biowaste bag (mostly for xenobiologists) @@ -485,5 +484,5 @@ storage_slots = 25 max_combined_w_class = 200 w_class = 1 - can_hold = list("/obj/item/slime_extract","/obj/item/weapon/reagent_containers/food/snacks/monkeycube","/obj/item/weapon/reagent_containers/syringe","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle","/obj/item/weapon/reagent_containers/blood","/obj/item/weapon/reagent_containers/hypospray/autoinjector") + can_hold = list(/obj/item/slime_extract,/obj/item/weapon/reagent_containers/food/snacks/monkeycube,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/blood,/obj/item/weapon/reagent_containers/hypospray/autoinjector) burn_state = FLAMMABLE diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index fc68431df2e..609edd2961f 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -48,19 +48,18 @@ item_state = "utility" use_item_overlays = 1 can_hold = list( - "/obj/item/weapon/crowbar", - "/obj/item/weapon/screwdriver", - "/obj/item/weapon/weldingtool", - "/obj/item/weapon/wirecutters", - "/obj/item/weapon/wrench", - "/obj/item/device/multitool", - "/obj/item/device/flashlight", - "/obj/item/stack/cable_coil", - "/obj/item/device/t_scanner", - "/obj/item/device/analyzer", - "/obj/item/taperoll/engineering", - "/obj/item/weapon/extinguisher/mini") - + /obj/item/weapon/crowbar, + /obj/item/weapon/screwdriver, + /obj/item/weapon/weldingtool, + /obj/item/weapon/wirecutters, + /obj/item/weapon/wrench, + /obj/item/device/multitool, + /obj/item/device/flashlight, + /obj/item/stack/cable_coil, + /obj/item/device/t_scanner, + /obj/item/device/analyzer, + /obj/item/taperoll/engineering, + /obj/item/weapon/extinguisher/mini) /obj/item/weapon/storage/belt/utility/full/New() ..() @@ -69,7 +68,7 @@ new /obj/item/weapon/weldingtool(src) new /obj/item/weapon/crowbar(src) new /obj/item/weapon/wirecutters(src) - new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange")) + new /obj/item/stack/cable_coil(src, 30, pick(COLOR_RED, COLOR_YELLOW, COLOR_ORANGE)) update_icon() /obj/item/weapon/storage/belt/utility/full/multitool/New() @@ -88,7 +87,23 @@ new /obj/item/weapon/extinguisher/mini(src) update_icon() +/obj/item/weapon/storage/belt/utility/chief + name = "Chief Engineer's toolbelt" + desc = "Holds tools, looks snazzy" + icon_state = "utilitybelt_ce" + item_state = "utility_ce" +/obj/item/weapon/storage/belt/utility/chief/full/New() + ..() + new /obj/item/weapon/screwdriver/power(src) + new /obj/item/weapon/crowbar/power(src) + new /obj/item/weapon/weldingtool/experimental(src)//This can be changed if this is too much + new /obj/item/device/multitool(src) + new /obj/item/stack/cable_coil(src, 30, pick(COLOR_RED, COLOR_YELLOW, COLOR_ORANGE)) + new /obj/item/weapon/extinguisher/mini(src) + new /obj/item/device/analyzer(src) + update_icon() + //much roomier now that we've managed to remove two tools /obj/item/weapon/storage/belt/medical use_to_pickup = 1 //Allow medical belt to pick up medicine @@ -98,24 +113,24 @@ item_state = "medical" use_item_overlays = 1 can_hold = list( - "/obj/item/device/healthanalyzer", - "/obj/item/weapon/dnainjector", - "/obj/item/weapon/reagent_containers/dropper", - "/obj/item/weapon/reagent_containers/glass/beaker", - "/obj/item/weapon/reagent_containers/glass/bottle", - "/obj/item/weapon/reagent_containers/food/pill", - "/obj/item/weapon/reagent_containers/syringe", - "/obj/item/weapon/reagent_containers/glass/dispenser", - "/obj/item/weapon/lighter/zippo", - "/obj/item/weapon/storage/fancy/cigarettes", - "/obj/item/weapon/storage/pill_bottle", - "/obj/item/stack/medical", - "/obj/item/device/flashlight/pen", - "/obj/item/clothing/mask/surgical", - "/obj/item/clothing/gloves/color/latex", - "/obj/item/weapon/reagent_containers/hypospray/autoinjector", - "/obj/item/device/rad_laser", - "/obj/item/device/sensor_device" + /obj/item/device/healthanalyzer, + /obj/item/weapon/dnainjector, + /obj/item/weapon/reagent_containers/dropper, + /obj/item/weapon/reagent_containers/glass/beaker, + /obj/item/weapon/reagent_containers/glass/bottle, + /obj/item/weapon/reagent_containers/food/pill, + /obj/item/weapon/reagent_containers/syringe, + /obj/item/weapon/lighter/zippo, + /obj/item/weapon/storage/fancy/cigarettes, + /obj/item/weapon/storage/pill_bottle, + /obj/item/stack/medical, + /obj/item/device/flashlight/pen, + /obj/item/clothing/mask/surgical, + /obj/item/clothing/gloves/color/latex, + /obj/item/weapon/reagent_containers/hypospray/autoinjector, + /obj/item/device/rad_laser, + /obj/item/device/sensor_device, + /obj/item/weapon/wrench/medical, ) /obj/item/weapon/storage/belt/medical/response_team @@ -139,22 +154,19 @@ item_state = "botany" use_item_overlays = 1 can_hold = list( - "/obj/item/device/plant_analyzer", - "/obj/item/weapon/cultivator", - "/obj/item/weapon/hatchet", - "/obj/item/weapon/reagent_containers/glass/bottle", - "/obj/item/weapon/plantspray", -// "/obj/item/weapon/reagent_containers/syringe", -// "/obj/item/weapon/reagent_containers/glass/beaker", - "/obj/item/weapon/lighter/zippo", - "/obj/item/weapon/storage/fancy/cigarettes", - "obj/item/weapon/rollingpaperpack", - "/obj/item/weapon/shovel/spade", - "/obj/item/device/flashlight/pen", - "/obj/item/seeds", - "/obj/item/weapon/wirecutters", - "/obj/item/weapon/wrench", - "/obj/item/weapon/disk/botany", + /obj/item/device/plant_analyzer, + /obj/item/weapon/cultivator, + /obj/item/weapon/hatchet, + /obj/item/weapon/reagent_containers/glass/bottle, +// /obj/item/weapon/reagent_containers/syringe, +// /obj/item/weapon/reagent_containers/glass/beaker, + /obj/item/weapon/lighter/zippo, + /obj/item/weapon/storage/fancy/cigarettes, + /obj/item/weapon/shovel/spade, + /obj/item/device/flashlight/pen, + /obj/item/seeds, + /obj/item/weapon/wirecutters, + /obj/item/weapon/wrench, ) @@ -167,22 +179,22 @@ max_w_class = 3 use_item_overlays = 1 can_hold = list( - "/obj/item/weapon/grenade/flashbang", - "/obj/item/weapon/grenade/chem_grenade/teargas", - "/obj/item/weapon/reagent_containers/spray/pepper", - "/obj/item/weapon/restraints/handcuffs", - "/obj/item/device/flash", - "/obj/item/clothing/glasses", - "/obj/item/ammo_casing/shotgun", - "/obj/item/ammo_box", - "/obj/item/weapon/reagent_containers/food/snacks/donut", - "/obj/item/weapon/kitchen/knife/combat", - "/obj/item/weapon/melee/baton", - "/obj/item/weapon/melee/classic_baton", - "/obj/item/device/flashlight/seclite", - "/obj/item/taperoll/police", - "/obj/item/weapon/melee/classic_baton/telescopic", - "/obj/item/weapon/restraints/legcuffs/bola") + /obj/item/weapon/grenade/flashbang, + /obj/item/weapon/grenade/chem_grenade/teargas, + /obj/item/weapon/reagent_containers/spray/pepper, + /obj/item/weapon/restraints/handcuffs, + /obj/item/device/flash, + /obj/item/clothing/glasses, + /obj/item/ammo_casing/shotgun, + /obj/item/ammo_box, + /obj/item/weapon/reagent_containers/food/snacks/donut, + /obj/item/weapon/kitchen/knife/combat, + /obj/item/weapon/melee/baton, + /obj/item/weapon/melee/classic_baton, + /obj/item/device/flashlight/seclite, + /obj/item/taperoll/police, + /obj/item/weapon/melee/classic_baton/telescopic, + /obj/item/weapon/restraints/legcuffs/bola) /obj/item/weapon/storage/belt/security/sec/New() ..() @@ -236,6 +248,24 @@ desc = "A syndicate belt designed to be used by boarding parties. Its style is modelled after the hardsuits they wear." icon_state = "militarybelt" item_state = "military" + max_w_class = WEIGHT_CLASS_SMALL + +/obj/item/weapon/storage/belt/military/abductor + name = "agent belt" + desc = "A belt used by abductor agents." + icon = 'icons/obj/abductor.dmi' + icon_state = "belt" + item_state = "security" + +/obj/item/weapon/storage/belt/military/abductor/full/New() + ..() + new /obj/item/weapon/screwdriver/abductor(src) + new /obj/item/weapon/wrench/abductor(src) + new /obj/item/weapon/weldingtool/abductor(src) + new /obj/item/weapon/crowbar/abductor(src) + new /obj/item/weapon/wirecutters/abductor(src) + new /obj/item/device/multitool/abductor(src) + new /obj/item/stack/cable_coil(src, 30, COLOR_WHITE) /obj/item/weapon/storage/belt/military/assault name = "assault belt" @@ -253,12 +283,12 @@ max_w_class = 4 // Set to this so the light replacer can fit. use_item_overlays = 1 can_hold = list( - "/obj/item/weapon/grenade/chem_grenade/cleaner", - "/obj/item/device/lightreplacer", - "/obj/item/device/flashlight", - "/obj/item/weapon/reagent_containers/spray", - "/obj/item/weapon/soap", - "/obj/item/weapon/holosign_creator" + /obj/item/weapon/grenade/chem_grenade/cleaner, + /obj/item/device/lightreplacer, + /obj/item/device/flashlight, + /obj/item/weapon/reagent_containers/spray, + /obj/item/weapon/soap, + /obj/item/weapon/holosign_creator ) /obj/item/weapon/storage/belt/janitor/full/New() @@ -280,7 +310,7 @@ max_w_class = 1 max_combined_w_class = 6 storage_slots = 6 - can_hold = list("/obj/item/device/mobcapsule") + can_hold = list(/obj/item/device/mobcapsule) /obj/item/weapon/storage/belt/lazarus/New() ..() @@ -309,7 +339,7 @@ item_state = "bandolier" storage_slots = 8 can_hold = list( - "/obj/item/ammo_casing/shotgun" + /obj/item/ammo_casing/shotgun ) /obj/item/weapon/storage/belt/bandolier/New() @@ -351,8 +381,8 @@ storage_slots = 1 max_w_class = 3 can_hold = list( - "/obj/item/weapon/gun/projectile/automatic/pistol", - "/obj/item/weapon/gun/projectile/revolver/detective" + /obj/item/weapon/gun/projectile/automatic/pistol, + /obj/item/weapon/gun/projectile/revolver/detective ) /obj/item/weapon/storage/belt/wands @@ -363,7 +393,7 @@ storage_slots = 6 use_item_overlays = 1 can_hold = list( - "/obj/item/weapon/gun/magic/wand" + /obj/item/weapon/gun/magic/wand ) /obj/item/weapon/storage/belt/wands/full/New() @@ -447,7 +477,7 @@ storage_slots = 1 w_class = 4 max_w_class = 4 - can_hold = list("/obj/item/weapon/melee/rapier") + can_hold = list(/obj/item/weapon/melee/rapier) /obj/item/weapon/storage/belt/rapier/update_icon() icon_state = "[initial(icon_state)]" @@ -505,8 +535,8 @@ origin_tech = "bluespace=4;syndicate=2" allow_quick_empty = 1 can_hold = list( - "/obj/item/weapon/grenade/smokebomb", - "/obj/item/weapon/restraints/legcuffs/bola" + /obj/item/weapon/grenade/smokebomb, + /obj/item/weapon/restraints/legcuffs/bola ) flags = NODROP @@ -554,48 +584,6 @@ if(H.s_active && H.s_active == src) H.s_active.show_to(H) - -/* DEPRECATED DUE TO SUPERHERO CODE AND NODROP - // As a last resort, the belt can be used as a plastic explosive with a fixed timer (15 seconds). Naturally, you'll lose all your gear... - // Of course, it could be worse. It could spawn a singularity! -/obj/item/weapon/storage/belt/bluespace/owlman/afterattack(atom/target as obj|turf, mob/user as mob, flag) - if(!flag) - return - if(istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/structure/table) || istype(target, /obj/structure/closet)) - return - to_chat(user, "Planting explosives...") - user.visible_message("[user.name] is fiddling with their toolbelt.") - if(ismob(target)) - user.create_attack_log(" [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])") - log_attack(" [user.real_name] ([user.ckey]) tried planting [name] on [target:real_name] ([target:ckey])") - user.visible_message("[user.name] is trying to strap a belt to [target.name]!") - - - if(do_after(user, 50, target = target) && in_range(user, target)) - user.drop_item() - target = target - loc = null - var/location - if(isturf(target)) location = target - if(ismob(target)) - target:create_attack_log(" Had the [name] planted on them by [user.real_name] ([user.ckey])") - user.visible_message("[user.name] finished planting an explosive on [target.name]!") - target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2") - to_chat(user, "You sacrifice your belt for the sake of justice. Timer counting down from 15.") - spawn(150) - if(target) - if(ismob(target) || isobj(target)) - location = target.loc // These things can move - explosion(location, -1, -1, 2, 3) - if(istype(target, /turf/simulated/wall)) target:dismantle_wall(1) - else target.ex_act(1) - if(isobj(target)) - if(target) - qdel(target) - if(src) - qdel(src) -*/ - /obj/item/weapon/storage/belt/bluespace/attack(mob/M as mob, mob/user as mob, def_zone) return diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 88820290a48..793e5761b26 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -390,7 +390,7 @@ icon = 'icons/obj/food/food.dmi' icon_state = "monkeycubebox" storage_slots = 7 - can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube") + can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube) var/monkey_cube_type = /obj/item/weapon/reagent_containers/food/snacks/monkeycube /obj/item/weapon/storage/box/monkeycubes/New() @@ -561,7 +561,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "spbox" storage_slots = 8 - can_hold = list("/obj/item/toy/snappop") + can_hold = list(/obj/item/toy/snappop) New() ..() for(var/i=1; i <= storage_slots; i++) @@ -621,7 +621,7 @@ item_state = "syringe_kit" foldable = /obj/item/stack/sheet/cardboard //BubbleWrap storage_slots=21 - can_hold = list("/obj/item/weapon/light/tube", "/obj/item/weapon/light/bulb") + can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb) max_combined_w_class = 21 use_to_pickup = 1 // for picking up broken bulbs, not that most people will try diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 168196f0480..c20cec521c6 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -48,7 +48,7 @@ icon_type = "donut" name = "donut box" storage_slots = 6 - can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut") + can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut) /obj/item/weapon/storage/fancy/donut_box/New() @@ -66,7 +66,7 @@ icon_type = "egg" name = "egg box" storage_slots = 12 - can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg") + can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg) /obj/item/weapon/storage/fancy/egg_box/New() ..() @@ -119,7 +119,7 @@ storage_slots = 6 icon_type = "crayon" can_hold = list( - "/obj/item/toy/crayon" + /obj/item/toy/crayon ) /obj/item/weapon/storage/fancy/crayons/New() @@ -163,12 +163,12 @@ slot_flags = SLOT_BELT storage_slots = 6 max_combined_w_class = 6 - can_hold = list("/obj/item/clothing/mask/cigarette", - "/obj/item/weapon/lighter", - "/obj/item/weapon/match") - cant_hold = list("/obj/item/clothing/mask/cigarette/cigar", - "/obj/item/clothing/mask/cigarette/pipe", - "/obj/item/weapon/lighter/zippo") + can_hold = list(/obj/item/clothing/mask/cigarette, + /obj/item/weapon/lighter, + /obj/item/weapon/match) + cant_hold = list(/obj/item/clothing/mask/cigarette/cigar, + /obj/item/clothing/mask/cigarette/pipe, + /obj/item/weapon/lighter/zippo) icon_type = "cigarette" var/list/unlaced_cigarettes = list() // Cigarettes that haven't received reagents yet var/default_reagents = list("nicotine" = 15) // List of reagents to pre-generate for each cigarette @@ -323,7 +323,7 @@ icon_state = "cig_paper_pack" storage_slots = 10 icon_type = "rolling paper" - can_hold = list("/obj/item/weapon/rollingpaper") + can_hold = list(/obj/item/weapon/rollingpaper) /obj/item/weapon/storage/fancy/rollingpapers/New() ..() @@ -345,7 +345,7 @@ icon_type = "vial" name = "vial storage box" storage_slots = 6 - can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial") + can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial) /obj/item/weapon/storage/fancy/vials/New() @@ -361,7 +361,7 @@ icon_state = "vialbox0" item_state = "syringe_kit" max_w_class = 3 - can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial") + can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial) max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item. storage_slots = 6 req_access = list(access_virology) diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 67d44c53b2d..5ab8713a49a 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -184,8 +184,8 @@ max_w_class = 4 max_combined_w_class = 21 storage_slots = 10 - can_hold = list("/obj/item/roller","/obj/item/weapon/bonesetter","/obj/item/weapon/bonegel", "/obj/item/weapon/scalpel", "/obj/item/weapon/hemostat", - "/obj/item/weapon/cautery", "/obj/item/weapon/retractor", "/obj/item/weapon/FixOVein", "/obj/item/weapon/surgicaldrill", "/obj/item/weapon/circular_saw") + can_hold = list(/obj/item/roller,/obj/item/weapon/bonesetter,/obj/item/weapon/bonegel, /obj/item/weapon/scalpel, /obj/item/weapon/hemostat, + /obj/item/weapon/cautery, /obj/item/weapon/retractor, /obj/item/weapon/FixOVein, /obj/item/weapon/surgicaldrill, /obj/item/weapon/circular_saw) /obj/item/weapon/storage/firstaid/surgery/New() ..() @@ -210,7 +210,7 @@ icon = 'icons/obj/chemical.dmi' item_state = "contsolid" w_class = 2 - can_hold = list("/obj/item/weapon/reagent_containers/food/pill","/obj/item/weapon/dice","/obj/item/weapon/paper") + can_hold = list(/obj/item/weapon/reagent_containers/food/pill, /obj/item/weapon/dice, /obj/item/weapon/paper) allow_quick_gather = 1 use_to_pickup = 1 storage_slots = 14 diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index cef6de9268a..e06cbb91255 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -37,7 +37,7 @@ emag_act(user, W) if(istype(W, /obj/item/weapon/screwdriver)) - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) open = !open user.show_message("You [open ? "open" : "close"] the service panel.", 1) return @@ -45,11 +45,11 @@ if((istype(W, /obj/item/device/multitool)) && (open == 1) && (!l_hacking)) user.show_message("Now attempting to reset internal memory, please hold.", 1) l_hacking = 1 - if(do_after(usr, 100, target = src)) + if(do_after(usr, 100 * W.toolspeed, target = src)) if(prob(40)) l_setshort = 1 l_set = 0 - user.show_message("Internal memory reset. Please give it a few seconds to reinitialize.", 1) + user.show_message("Internal memory reset. Please give it a few seconds to reinitialize.", 1) sleep(80) l_setshort = 0 l_hacking = 0 @@ -232,7 +232,7 @@ max_w_class = 8 anchored = 1 density = 0 - cant_hold = list("/obj/item/weapon/storage/secure/briefcase") + cant_hold = list(/obj/item/weapon/storage/secure/briefcase) /obj/item/weapon/storage/secure/safe/New() ..() diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index cf049e33fca..e7f2fb29938 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -242,23 +242,15 @@ return 0 //Storage item is full if(can_hold.len) - var/ok = 0 - for(var/A in can_hold) - if(istype(W, text2path(A) )) - ok = 1 - break - if(!ok) + if(!is_type_in_typecache(W, can_hold)) if(!stop_messages) - if(istype(W, /obj/item/weapon/hand_labeler)) - return 0 to_chat(usr, "[src] cannot hold [W].") return 0 - for(var/A in cant_hold) //Check for specific items which this container can't hold. - if(istype(W, text2path(A) )) - if(!stop_messages) - to_chat(usr, "[src] cannot hold [W].") - return 0 + if(is_type_in_typecache(W, cant_hold)) //Check for specific items which this container can't hold. + if(!stop_messages) + to_chat(usr, "[src] cannot hold [W].") + return 0 if(W.w_class > max_w_class) if(!stop_messages) @@ -432,6 +424,8 @@ remove_from_storage(I, T) /obj/item/weapon/storage/New() + can_hold = typecacheof(can_hold) + cant_hold = typecacheof(cant_hold) if(allow_quick_empty) verbs += /obj/item/weapon/storage/verb/quick_empty @@ -455,7 +449,6 @@ src.closer.layer = 20 src.closer.plane = HUD_PLANE orient2hud() - return /obj/item/weapon/storage/Destroy() for(var/obj/O in contents) diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 74d4093beb5..a6ecd3d45ac 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -15,41 +15,35 @@ attack_verb = list("robusted") hitsound = 'sound/weapons/smash.ogg' - New() - ..() - if(src.type == /obj/item/weapon/storage/toolbox) - to_chat(world, "BAD: [src] ([src.type]) spawned at [src.x] [src.y] [src.z]") - qdel(src) - /obj/item/weapon/storage/toolbox/emergency name = "emergency toolbox" icon_state = "red" item_state = "toolbox_red" - New() - ..() - new /obj/item/weapon/crowbar/red(src) - new /obj/item/weapon/weldingtool/mini(src) - new /obj/item/weapon/extinguisher/mini(src) - if(prob(50)) - new /obj/item/device/flashlight(src) - else - new /obj/item/device/flashlight/flare(src) - new /obj/item/device/radio(src) +/obj/item/weapon/storage/toolbox/emergency/New() + ..() + new /obj/item/weapon/crowbar/red(src) + new /obj/item/weapon/weldingtool/mini(src) + new /obj/item/weapon/extinguisher/mini(src) + if(prob(50)) + new /obj/item/device/flashlight(src) + else + new /obj/item/device/flashlight/flare(src) + new /obj/item/device/radio(src) /obj/item/weapon/storage/toolbox/mechanical name = "mechanical toolbox" icon_state = "blue" item_state = "toolbox_blue" - New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/device/analyzer(src) - new /obj/item/weapon/wirecutters(src) +/obj/item/weapon/storage/toolbox/mechanical/New() + ..() + new /obj/item/weapon/screwdriver(src) + new /obj/item/weapon/wrench(src) + new /obj/item/weapon/weldingtool(src) + new /obj/item/weapon/crowbar(src) + new /obj/item/device/analyzer(src) + new /obj/item/weapon/wirecutters(src) /obj/item/weapon/storage/toolbox/mechanical/greytide flags = NODROP @@ -59,19 +53,19 @@ icon_state = "yellow" item_state = "toolbox_yellow" - New() - ..() - var/color = pick("red","yellow","green","blue","pink","orange","cyan","white") - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/device/t_scanner(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/stack/cable_coil(src,30,color) - new /obj/item/stack/cable_coil(src,30,color) - if(prob(5)) - new /obj/item/clothing/gloves/color/yellow(src) - else - new /obj/item/stack/cable_coil(src,30,color) +/obj/item/weapon/storage/toolbox/electrical/New() + ..() + var/pickedcolor = pick(COLOR_RED, COLOR_YELLOW, COLOR_GREEN, COLOR_BLUE, COLOR_PINK, COLOR_ORANGE, COLOR_CYAN, COLOR_WHITE) + new /obj/item/weapon/screwdriver(src) + new /obj/item/weapon/wirecutters(src) + new /obj/item/device/t_scanner(src) + new /obj/item/weapon/crowbar(src) + new /obj/item/stack/cable_coil(src, 30, pickedcolor) + new /obj/item/stack/cable_coil(src, 30, pickedcolor) + if(prob(5)) + new /obj/item/clothing/gloves/color/yellow(src) + else + new /obj/item/stack/cable_coil(src, 30, pickedcolor) /obj/item/weapon/storage/toolbox/syndicate name = "suspicious looking toolbox" @@ -82,12 +76,47 @@ force = 15.0 throwforce = 18.0 - New() - ..() - new /obj/item/weapon/screwdriver(src, "red") - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool/largetank(src) - new /obj/item/weapon/crowbar/red(src) - new /obj/item/weapon/wirecutters(src, "red") - new /obj/item/device/multitool(src) - new /obj/item/clothing/gloves/combat(src) \ No newline at end of file +/obj/item/weapon/storage/toolbox/syndicate/New() + ..() + new /obj/item/weapon/screwdriver(src, "red") + new /obj/item/weapon/wrench(src) + new /obj/item/weapon/weldingtool/largetank(src) + new /obj/item/weapon/crowbar/red(src) + new /obj/item/weapon/wirecutters(src, "red") + new /obj/item/device/multitool(src) + new /obj/item/clothing/gloves/combat(src) + +/obj/item/weapon/storage/toolbox/drone + name = "mechanical toolbox" + icon_state = "blue" + item_state = "toolbox_blue" + +/obj/item/weapon/storage/toolbox/drone/New() + ..() + var/pickedcolor = pick(pick(COLOR_RED, COLOR_YELLOW, COLOR_GREEN, COLOR_BLUE, COLOR_PINK, COLOR_ORANGE, COLOR_CYAN, COLOR_WHITE)) + new /obj/item/weapon/screwdriver(src) + new /obj/item/weapon/wrench(src) + new /obj/item/weapon/weldingtool(src) + new /obj/item/weapon/crowbar(src) + new /obj/item/stack/cable_coil(src, 30, pickedcolor) + new /obj/item/weapon/wirecutters(src) + new /obj/item/device/multitool(src) + +/obj/item/weapon/storage/toolbox/brass + name = "brass box" + desc = "A huge brass box with several indentations in its surface." + icon_state = "brassbox" + item_state = null + w_class = WEIGHT_CLASS_HUGE + max_w_class = WEIGHT_CLASS_NORMAL + max_combined_w_class = 28 + storage_slots = 28 + attack_verb = list("robusted", "crushed", "smashed") + +/obj/item/weapon/storage/toolbox/brass/prefilled/New() + ..() + new /obj/item/weapon/screwdriver/brass(src) + new /obj/item/weapon/wirecutters/brass(src) + new /obj/item/weapon/wrench/brass(src) + new /obj/item/weapon/crowbar/brass(src) + new /obj/item/weapon/weldingtool/experimental/brass(src) \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 0415899d586..b7d87710064 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -88,7 +88,7 @@ /obj/item/weapon/storage/box/syndie_kit/space name = "Boxed Space Suit and Helmet" - can_hold = list("/obj/item/clothing/suit/space/syndicate/black/red", "/obj/item/clothing/head/helmet/space/syndicate/black/red") + can_hold = list(/obj/item/clothing/suit/space/syndicate/black/red, /obj/item/clothing/head/helmet/space/syndicate/black/red) max_w_class = 3 /obj/item/weapon/storage/box/syndie_kit/space/New() @@ -99,7 +99,7 @@ /obj/item/weapon/storage/box/syndie_kit/hardsuit name = "Boxed Blood Red Suit and Helmet" - can_hold = list("/obj/item/clothing/suit/space/hardsuit/syndi", "/obj/item/clothing/head/helmet/space/hardsuit/syndi") + can_hold = list(/obj/item/clothing/suit/space/hardsuit/syndi, /obj/item/clothing/head/helmet/space/hardsuit/syndi) max_w_class = 3 /obj/item/weapon/storage/box/syndie_kit/hardsuit/New() @@ -110,7 +110,7 @@ /obj/item/weapon/storage/box/syndie_kit/elite_hardsuit name = "Boxed Elite Syndicate Hardsuit and Helmet" - can_hold = list("/obj/item/clothing/suit/space/hardsuit/syndi/elite", "/obj/item/clothing/head/helmet/space/hardsuit/syndi/elite") + can_hold = list(/obj/item/clothing/suit/space/hardsuit/syndi/elite, /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite) max_w_class = 3 /obj/item/weapon/storage/box/syndie_kit/elite_hardsuit/New() @@ -120,7 +120,7 @@ /obj/item/weapon/storage/box/syndie_kit/shielded_hardsuit name = "Boxed Shielded Syndicate Hardsuit and Helmet" - can_hold = list("/obj/item/clothing/suit/space/hardsuit/shielded/syndi", "/obj/item/clothing/head/helmet/space/hardsuit/shielded/syndi") + can_hold = list(/obj/item/clothing/suit/space/hardsuit/shielded/syndi, /obj/item/clothing/head/helmet/space/hardsuit/shielded/syndi) max_w_class = 4 /obj/item/weapon/storage/box/syndie_kit/shielded_hardsuit/New() diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 904f8df6a9c..0d9712ed43f 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -7,25 +7,25 @@ w_class = 2 burn_state = FLAMMABLE can_hold = list( - "/obj/item/stack/spacecash", - "/obj/item/weapon/card", - "/obj/item/clothing/mask/cigarette", - "/obj/item/device/flashlight/pen", - "/obj/item/seeds", - "/obj/item/stack/medical", - "/obj/item/toy/crayon", - "/obj/item/weapon/coin", - "/obj/item/weapon/dice", - "/obj/item/weapon/disk", - "/obj/item/weapon/implanter", - "/obj/item/weapon/lighter", - "/obj/item/weapon/match", - "/obj/item/weapon/paper", - "/obj/item/weapon/pen", - "/obj/item/weapon/photo", - "/obj/item/weapon/reagent_containers/dropper", - "/obj/item/weapon/screwdriver", - "/obj/item/weapon/stamp") + /obj/item/stack/spacecash, + /obj/item/weapon/card, + /obj/item/clothing/mask/cigarette, + /obj/item/device/flashlight/pen, + /obj/item/seeds, + /obj/item/stack/medical, + /obj/item/toy/crayon, + /obj/item/weapon/coin, + /obj/item/weapon/dice, + /obj/item/weapon/disk, + /obj/item/weapon/implanter, + /obj/item/weapon/lighter, + /obj/item/weapon/match, + /obj/item/weapon/paper, + /obj/item/weapon/pen, + /obj/item/weapon/photo, + /obj/item/weapon/reagent_containers/dropper, + /obj/item/weapon/screwdriver, + /obj/item/weapon/stamp) slot_flags = SLOT_ID var/obj/item/weapon/card/id/front_id = null diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 4e59dfb6f10..c007f23118b 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -22,60 +22,137 @@ slot_flags = SLOT_BELT force = 5 throwforce = 7 - w_class = 2 + usesound = 'sound/items/Ratchet.ogg' + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=150) origin_tech = "materials=1;engineering=1" attack_verb = list("bashed", "battered", "bludgeoned", "whacked") + toolspeed = 1 + +/obj/item/weapon/wrench/suicide_act(mob/user) + user.visible_message("[user] is beating themself to death with [src]! It looks like they're trying to commit suicide!") + playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1) + return (BRUTELOSS) + +/obj/item/weapon/wrench/cyborg + name = "automatic wrench" + desc = "An advanced robotic wrench. Can be found in construction cyborgs." + toolspeed = 0.5 + +/obj/item/weapon/wrench/brass + name = "brass wrench" + desc = "A brass wrench. It's faintly warm to the touch." + icon_state = "wrench_brass" + toolspeed = 0.5 + +/obj/item/weapon/wrench/abductor + name = "alien wrench" + desc = "A polarized wrench. It causes anything placed between the jaws to turn." + icon = 'icons/obj/abductor.dmi' + icon_state = "wrench" + usesound = 'sound/effects/EMPulse.ogg' + toolspeed = 0.1 + origin_tech = "materials=5;engineering=5;abductor=3" + +/obj/item/weapon/wrench/power + name = "Hand Drill" + desc = "A simple powered drill with a bolt bit." + icon_state = "drill_bolt" + item_state = "drill" + usesound = 'sound/items/drill_use.ogg' + materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_GOLD=25) + origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get + force = 8 //might or might not be too high, subject to change + throwforce = 8 + attack_verb = list("drilled", "screwed", "jabbed") + toolspeed = 0.25 + +/obj/item/weapon/wrench/power/attack_self(mob/user) + playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1) + var/obj/item/weapon/wirecutters/power/s_drill = new /obj/item/weapon/screwdriver/power + to_chat(user, "You attach the screwdriver bit to [src].") + qdel(src) + user.put_in_active_hand(s_drill) + +/obj/item/weapon/wrench/power/suicide_act(mob/user) + user.visible_message("[user] is pressing [src] against their head! It looks like they're trying to commit suicide!") + return (BRUTELOSS) + +/obj/item/weapon/wrench/medical + name = "medical wrench" + desc = "A medical wrench with common (medical?) uses. Can be found in your hand." + icon_state = "wrench_medical" + force = 2 //MEDICAL + throwforce = 4 + origin_tech = "materials=1;engineering=1;biotech=3" + attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked") + +/obj/item/weapon/wrench/medical/suicide_act(mob/user) + user.visible_message("[user] is praying to the medical wrench to take their soul. It looks like they're trying to commit suicide!") + // TODO Make them glow with the power of the M E D I C A L W R E N C H + // during their ascension + + // Stun stops them from wandering off + user.Stun(5) + playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1) + + // Let the sound effect finish playing + sleep(20) + + if(!user) + return + + for(var/obj/item/W in user) + user.unEquip(W) + + var/obj/item/weapon/wrench/medical/W = new /obj/item/weapon/wrench/medical(loc) + W.add_fingerprint(user) + W.desc += " For some reason, it reminds you of [user.name]." + + if(!user) + return + + user.dust() + return OXYLOSS //Screwdriver /obj/item/weapon/screwdriver name = "screwdriver" desc = "You can be totally screwy with this." icon = 'icons/obj/tools.dmi' - icon_state = "screwdriver" + icon_state = null flags = CONDUCT slot_flags = SLOT_BELT force = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 5 throw_speed = 3 throw_range = 5 materials = list(MAT_METAL=75) attack_verb = list("stabbed") hitsound = 'sound/weapons/bladeslice.ogg' + usesound = 'sound/items/Screwdriver.ogg' + toolspeed = 1 + +/obj/item/weapon/screwdriver/nuke + name = "screwdriver" + desc = "A screwdriver with an ultra thin tip." + icon_state = "screwdriver_nuke" + toolspeed = 0.5 /obj/item/weapon/screwdriver/suicide_act(mob/user) - to_chat(viewers(user), pick("[user] is stabbing the [name] into \his temple! It looks like \he's trying to commit suicide.", \ - "[user] is stabbing the [name] into \his heart! It looks like \he's trying to commit suicide.")) + user.visible_message("[user] is stabbing [src] into their [pick("temple", "heart")]! It looks like they're trying to commit suicide!") return(BRUTELOSS) -/obj/item/weapon/screwdriver/New() - switch(pick("red","blue","purple","brown","green","cyan","yellow")) - if("red") - icon_state = "screwdriver2" - item_state = "screwdriver" - if("blue") - icon_state = "screwdriver" - item_state = "screwdriver_blue" - if("purple") - icon_state = "screwdriver3" - item_state = "screwdriver_purple" - if("brown") - icon_state = "screwdriver4" - item_state = "screwdriver_brown" - if("green") - icon_state = "screwdriver5" - item_state = "screwdriver_green" - if("cyan") - icon_state = "screwdriver6" - item_state = "screwdriver_cyan" - if("yellow") - icon_state = "screwdriver7" - item_state = "screwdriver_yellow" +/obj/item/weapon/screwdriver/New(loc, var/param_color = null) + ..() + if(!icon_state) + if(!param_color) + param_color = pick("red","blue","pink","brown","green","cyan","yellow") + icon_state = "screwdriver_[param_color]" - if(prob(75)) + if (prob(75)) src.pixel_y = rand(0, 16) - return /obj/item/weapon/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user) if(!istype(M) || user.a_intent == I_HELP) @@ -85,49 +162,150 @@ if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M,user) + +/obj/item/weapon/screwdriver/brass + name = "brass screwdriver" + desc = "A screwdriver made of brass. The handle feels freezing cold." + icon_state = "screwdriver_brass" + toolspeed = 0.5 + +/obj/item/weapon/screwdriver/abductor + name = "alien screwdriver" + desc = "An ultrasonic screwdriver." + icon = 'icons/obj/abductor.dmi' + icon_state = "screwdriver" + usesound = 'sound/items/PSHOOM.ogg' + toolspeed = 0.1 + +/obj/item/weapon/screwdriver/power + name = "Hand Drill" + desc = "A simple hand drill with a screwdriver bit attached." + icon_state = "drill_screw" + item_state = "drill" + materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_GOLD=25) + origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get + force = 8 //might or might not be too high, subject to change + throwforce = 8 + throw_speed = 2 + throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far + attack_verb = list("drilled", "screwed", "jabbed","whacked") + hitsound = 'sound/items/drill_hit.ogg' + usesound = 'sound/items/drill_use.ogg' + toolspeed = 0.25 + +/obj/item/weapon/screwdriver/power/suicide_act(mob/user) + user.visible_message("[user] is putting [src] to their temple. It looks like they're trying to commit suicide!") + return(BRUTELOSS) + +/obj/item/weapon/screwdriver/power/attack_self(mob/user) + playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1) + var/obj/item/weapon/wrench/power/b_drill = new /obj/item/weapon/wrench/power + to_chat(user, "You attach the bolt driver bit to [src].") + qdel(src) + user.put_in_active_hand(b_drill) + +/obj/item/weapon/screwdriver/cyborg + name = "powered screwdriver" + desc = "An electrical screwdriver, designed to be both precise and quick." + usesound = 'sound/items/drill_use.ogg' + toolspeed = 0.5 //Wirecutters /obj/item/weapon/wirecutters name = "wirecutters" desc = "This cuts wires." icon = 'icons/obj/tools.dmi' - icon_state = "cutters" + icon_state = null flags = CONDUCT slot_flags = SLOT_BELT force = 6 throw_speed = 3 throw_range = 7 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=80) origin_tech = "materials=1;engineering=1" attack_verb = list("pinched", "nipped") hitsound = 'sound/items/Wirecutter.ogg' + usesound = 'sound/items/Wirecutter.ogg' sharp = 1 edge = 1 + toolspeed = 1 /obj/item/weapon/wirecutters/New(loc, param_color = null) ..() - if((!param_color && prob(50)) || param_color == "yellow") - icon_state = "cutters-y" - item_state = "cutters_yellow" + if(!icon_state) + if(!param_color) + param_color = pick("yellow", "red") + icon_state = "cutters_[param_color]" -/obj/item/weapon/wirecutters/attack(mob/living/carbon/human/H, mob/user) - if(istype(H) && H.handcuffed) - if(istype(H.handcuffed, /obj/item/weapon/restraints/handcuffs/cable)) - usr.visible_message("\The [usr] cuts \the [H]'s restraints with \the [src]!",\ - "You cut \the [H]'s restraints with \the [src]!",\ - "You hear cable being cut.") - H.handcuffed = null - if(H.buckled && H.buckled.buckle_requires_restraints) - H.buckled.unbuckle_mob() - H.update_handcuffed() - return +/obj/item/weapon/wirecutters/attack(mob/living/carbon/C, mob/user) + if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable)) + user.visible_message("[user] cuts [C]'s restraints with [src]!") + qdel(C.handcuffed) + C.handcuffed = null + if(C.buckled && C.buckled.buckle_requires_restraints) + C.buckled.unbuckle_mob(C) + C.update_handcuffed() + return else ..() + +/obj/item/weapon/wirecutters/suicide_act(mob/user) + user.visible_message("[user] is cutting at their arteries with [src]! It looks like they're trying to commit suicide!") + playsound(loc, usesound, 50, 1, -1) + return (BRUTELOSS) + +/obj/item/weapon/wirecutters/brass + name = "brass wirecutters" + desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch." + icon_state = "cutters_brass" + toolspeed = 0.5 + +/obj/item/weapon/wirecutters/abductor + name = "alien wirecutters" + desc = "Extremely sharp wirecutters, made out of a silvery-green metal." + icon = 'icons/obj/abductor.dmi' + icon_state = "cutters" + toolspeed = 0.1 + origin_tech = "materials=5;engineering=4;abductor=3" + +/obj/item/weapon/wirecutters/cyborg + name = "wirecutters" + desc = "This cuts wires." + toolspeed = 0.5 + +/obj/item/weapon/wirecutters/power + name = "Jaws of Life" + desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head." + icon_state = "jaws_cutter" + item_state = "jawsoflife" + origin_tech = "materials=2;engineering=2" + materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) + usesound = 'sound/items/jaws_cut.ogg' + toolspeed = 0.25 + +/obj/item/weapon/wirecutters/power/suicide_act(mob/user) + user.visible_message("[user] is wrapping \the [src] around their neck. It looks like they're trying to rip their head off!") + playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1) + if(ishuman(user)) + var/mob/living/carbon/human/H = user + var/obj/item/organ/external/head/head = H.organs_by_name["head"] + if(head) + head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE) + playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1) + return (BRUTELOSS) + +/obj/item/weapon/wirecutters/power/attack_self(mob/user) + playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) + var/obj/item/weapon/crowbar/power/pryjaws = new /obj/item/weapon/crowbar/power + to_chat(user, "You attach the pry jaws to [src].") + qdel(src) + user.put_in_active_hand(pryjaws) //Welding Tool /obj/item/weapon/weldingtool name = "welding tool" + desc = "A standard edition welder provided by Nanotrasen." icon = 'icons/obj/tools.dmi' icon_state = "welder" item_state = "welder" @@ -137,15 +315,21 @@ throwforce = 5 throw_speed = 3 throw_range = 5 - w_class = 2 + hitsound = "swing_hit" + usesound = 'sound/items/Welder.ogg' + var/acti_sound = 'sound/items/WelderActivate.ogg' + var/deac_sound = 'sound/items/WelderDeactivate.ogg' + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=70, MAT_GLASS=30) - origin_tech = "engineering=1" + origin_tech = "engineering=1;plasmatech=1" + toolspeed = 1 var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) var/max_fuel = 20 //The max amount of fuel the welder can hold var/change_icons = 1 var/can_off_process = 0 var/light_intensity = 2 //how powerful the emitted light is when used. + var/nextrefueltick = 0 /obj/item/weapon/weldingtool/New() ..() @@ -158,7 +342,7 @@ to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].") /obj/item/weapon/weldingtool/suicide_act(mob/user) - user.visible_message("[user] welds \his every orifice closed! It looks like \he's trying to commit suicide..") + user.visible_message("[user] welds their every orifice closed! It looks like they're trying to commit suicide!") return (FIRELOSS) /obj/item/weapon/weldingtool/proc/update_torch() @@ -179,13 +363,6 @@ icon_state = "[initial(icon_state)][ratio]" update_torch() -/obj/item/weapon/weldingtool/attackby(obj/item/I, mob/user, params) - if(isscrewdriver(I)) - flamethrower_screwdriver(I, user) - if(istype(I, /obj/item/stack/rods)) - flamethrower_rods(I, user) - ..() - /obj/item/weapon/weldingtool/process() switch(welding) if(0) @@ -211,6 +388,14 @@ location = get_turf(M) if(isturf(location)) location.hotspot_expose(700, 5) + +/obj/item/weapon/weldingtool/attackby(obj/item/I, mob/user, params) + if(isscrewdriver(I)) + flamethrower_screwdriver(I, user) + else if(istype(I, /obj/item/stack/rods)) + flamethrower_rods(I, user) + else + ..() /obj/item/weapon/weldingtool/attack(mob/M, mob/user) if(ishuman(M)) @@ -233,7 +418,7 @@ if(!do_mob(user, H, 10)) return 1 if(remove_fuel(1,null)) - playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) + playsound(src.loc, usesound, 50, 1) S.heal_damage(15,0,0,1) user.visible_message("\The [user] patches some dents on \the [M]'s [S.name] with \the [src].") else if(S.open != 2) @@ -250,10 +435,13 @@ /obj/item/weapon/weldingtool/afterattack(atom/O, mob/user, proximity) if(!proximity) return + if(welding) remove_fuel(1) var/turf/location = get_turf(user) location.hotspot_expose(700, 50, 1) + if(get_fuel() <= 0) + set_light(0) if(isliving(O)) var/mob/living/L = O @@ -262,7 +450,10 @@ log_game("[key_name(user)] set [key_name(L)] on fire") /obj/item/weapon/weldingtool/attack_self(mob/user) - toggle(user) + switched_on(user) + if(welding) + set_light(light_intensity) + update_icon() //Returns the amount of fuel in the welder @@ -272,17 +463,17 @@ //Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use() /obj/item/weapon/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null) if(!welding || !check_fuel()) - return 0 + return FALSE if(get_fuel() >= amount) reagents.remove_reagent("fuel", amount) check_fuel() if(M) M.flash_eyes(light_intensity) - return 1 + return TRUE else if(M) to_chat(M, "You need more welding fuel to complete this task.") - return 0 + return FALSE //Returns whether or not the welding tool is currently on. /obj/item/weapon/weldingtool/proc/isOn() @@ -291,43 +482,48 @@ //Turns off the welder if there is no more fuel (does this really need to be its own proc?) /obj/item/weapon/weldingtool/proc/check_fuel(mob/user) if(get_fuel() <= 0 && welding) - toggle(user, 1) + switched_on(user) update_icon() //mob icon update if(ismob(loc)) var/mob/M = loc M.update_inv_r_hand(0) M.update_inv_l_hand(0) - return 0 return 1 -//Toggles the welder off and on -/obj/item/weapon/weldingtool/proc/toggle(mob/user, message = 0) +//Switches the welder on +/obj/item/weapon/weldingtool/proc/switched_on(mob/user) if(!status) - to_chat(user, "[src] can't be turned on while unsecured!") + to_chat(user, "span class='warning'>[src] can't be turned on while unsecured!") return welding = !welding if(welding) if(get_fuel() >= 1) to_chat(user, "You switch [src] on.") + playsound(loc, acti_sound, 50, 1) force = 15 damtype = "fire" hitsound = 'sound/items/welder.ogg' update_icon() - processing_objects |= src + processing_objects.Add(src) else to_chat(user, "You need more fuel!") - welding = 0 + switched_off(user) else - if(!message) - to_chat(user, "You switch [src] off.") - else - visible_message("[src] shuts off!") - force = 3 - damtype = "brute" - hitsound = "swing_hit" - update_icon() + to_chat(user, "You switch [src] off.") + playsound(loc, deac_sound, 50, 1) + switched_off(user) + +//Switches the welder off +/obj/item/weapon/weldingtool/proc/switched_off(mob/user) + welding = 0 + set_light(0) + + force = 3 + damtype = "brute" + hitsound = "swing_hit" + update_icon() /obj/item/weapon/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user) if(welding) @@ -354,7 +550,6 @@ user.put_in_hands(F) else to_chat(user, "You need one rod to start building a flamethrower!") - return /obj/item/weapon/weldingtool/largetank name = "Industrial Welding Tool" @@ -362,9 +557,12 @@ icon_state = "indwelder" max_fuel = 40 materials = list(MAT_METAL=70, MAT_GLASS=60) - origin_tech = "engineering=2" + origin_tech = "engineering=2;plasmatech=2" /obj/item/weapon/weldingtool/largetank/cyborg + name = "integrated welding tool" + desc = "An advanced welder designed to be used in robotic systems." + toolspeed = 0.5 /obj/item/weapon/weldingtool/largetank/flamethrower_screwdriver() return @@ -374,12 +572,28 @@ desc = "A miniature welder used during emergencies." icon_state = "miniwelder" max_fuel = 10 - w_class = 1 + w_class = WEIGHT_CLASS_TINY materials = list(MAT_METAL=30, MAT_GLASS=10) change_icons = 0 /obj/item/weapon/weldingtool/mini/flamethrower_screwdriver() return + +/obj/item/weapon/weldingtool/abductor + name = "alien welding tool" + desc = "An alien welding tool. Whatever fuel it uses, it never runs out." + icon = 'icons/obj/abductor.dmi' + icon_state = "welder" + toolspeed = 0.1 + light_intensity = 0 + change_icons = 0 + origin_tech = "plasmatech=5;engineering=5;abductor=3" + can_off_process = 1 + +/obj/item/weapon/weldingtool/abductor/process() + if(get_fuel() <= max_fuel) + reagents.add_reagent("fuel", 1) + ..() /obj/item/weapon/weldingtool/hugetank name = "Upgraded Welding Tool" @@ -387,9 +601,8 @@ icon_state = "upindwelder" item_state = "upindwelder" max_fuel = 80 - w_class = 3 materials = list(MAT_METAL=70, MAT_GLASS=120) - origin_tech = "engineering=3" + origin_tech = "engineering=3;plasmatech=2" /obj/item/weapon/weldingtool/experimental name = "Experimental Welding Tool" @@ -397,25 +610,25 @@ icon_state = "exwelder" item_state = "exwelder" max_fuel = 40 - w_class = 3 materials = list(MAT_METAL=70, MAT_GLASS=120) - origin_tech = "engineering=4;plasmatech=3" + origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4" change_icons = 0 can_off_process = 1 light_intensity = 1 + toolspeed = 0.5 var/last_gen = 0 + +/obj/item/weapon/weldingtool/experimental/brass + name = "brass welding tool" + desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch." + icon_state = "brasswelder" + item_state = "brasswelder" -/obj/item/weapon/weldingtool/experimental/proc/fuel_gen() - if(!welding && !last_gen) - last_gen = 1 - reagents.add_reagent("fuel",1) - spawn(10) - last_gen = 0 - -/obj/item/weapon/weldingtool/experimental/process() +obj/item/weapon/weldingtool/experimental/process() ..() - if(reagents.total_volume < max_fuel) - fuel_gen() + if(get_fuel() < max_fuel && nextrefueltick < world.time) + nextrefueltick = world.time + 10 + reagents.add_reagent("fuel", 1) //Crowbar /obj/item/weapon/crowbar @@ -423,37 +636,89 @@ desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors." icon = 'icons/obj/tools.dmi' icon_state = "crowbar" + item_state = "crowbar" + usesound = 'sound/items/Crowbar.ogg' flags = CONDUCT slot_flags = SLOT_BELT force = 5 throwforce = 7 item_state = "crowbar" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50) - origin_tech = "engineering=1" + origin_tech = "engineering=1;combat=1" attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") + toolspeed = 1 /obj/item/weapon/crowbar/red - icon_state = "red_crowbar" - item_state = "crowbar_red" + icon_state = "crowbar_red" + force = 8 + +/obj/item/weapon/crowbar/brass + name = "brass crowbar" + desc = "A brass crowbar. It feels faintly warm to the touch." + icon_state = "crowbar_brass" + toolspeed = 0.5 + +/obj/item/weapon/crowbar/abductor + name = "alien crowbar" + desc = "A hard-light crowbar. It appears to pry by itself, without any effort required." + icon = 'icons/obj/abductor.dmi' + usesound = 'sound/weapons/sonic_jackhammer.ogg' + icon_state = "crowbar" + toolspeed = 0.1 + origin_tech = "combat=4;engineering=4;abductor=3" /obj/item/weapon/crowbar/large name = "crowbar" desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big." force = 12 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throw_speed = 3 throw_range = 3 materials = list(MAT_METAL=70) icon_state = "crowbar_large" + item_state = "crowbar" + toolspeed = 0.5 + +/obj/item/weapon/crowbar/cyborg + name = "hydraulic crowbar" + desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs." + usesound = 'sound/items/jaws_pry.ogg' + force = 10 + toolspeed = 0.5 +/obj/item/weapon/crowbar/power + name = "Jaws of Life" + desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head" + icon_state = "jaws_pry" + item_state = "jawsoflife" + materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) + origin_tech = "materials=2;engineering=2" + usesound = 'sound/items/jaws_pry.ogg' + force = 15 + toolspeed = 0.25 + var/airlock_open_time = 100 // Time required to open powered airlocks + +/obj/item/weapon/crowbar/power/suicide_act(mob/user) + user.visible_message("[user] is putting their head in [src], it looks like they're trying to commit suicide!") + playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1) + return (BRUTELOSS) + +/obj/item/weapon/crowbar/power/attack_self(mob/user) + playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) + var/obj/item/weapon/wirecutters/power/cutjaws = new /obj/item/weapon/wirecutters/power + to_chat(user, "You attach the cutting jaws to [src].") + qdel(src) + user.put_in_active_hand(cutjaws) + +// Conversion kit /obj/item/weapon/conversion_kit name = "\improper Revolver Conversion Kit" desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure" icon = 'icons/obj/weapons.dmi' icon_state = "kit" flags = CONDUCT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL origin_tech = "combat=2" var/open = 0 diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index f16783a5636..ce2b5965c6c 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -169,6 +169,7 @@ force_wielded = 24 attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") hitsound = 'sound/weapons/bladeslice.ogg' + usesound = 'sound/items/Crowbar.ogg' /obj/item/weapon/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "fireaxe[wielded]" diff --git a/code/game/objects/items/weapons/whetstone.dm b/code/game/objects/items/weapons/whetstone.dm index d19c411899f..d498d4c75e8 100644 --- a/code/game/objects/items/weapons/whetstone.dm +++ b/code/game/objects/items/weapons/whetstone.dm @@ -4,6 +4,7 @@ icon_state = "whetstone" desc = "A block of stone used to sharpen things." w_class = 2 + usesound = 'sound/items/Screwdriver.ogg' var/used = 0 var/increment = 4 var/max = 30 @@ -43,7 +44,7 @@ I.force = Clamp(I.force + increment, 0, max) I.throwforce = Clamp(I.throwforce + increment, 0, max) I.name = "[prefix] [I.name]" - playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1) + playsound(get_turf(src), usesound, 50, 1) name = "worn out [name]" desc = "[desc] At least, it used to." used = 1 @@ -54,7 +55,7 @@ var/datum/unarmed_attack/attack = H.species.unarmed if(istype(attack, /datum/unarmed_attack/claws)) H.visible_message("[H] sharpens \his claws on the [src]!", "You sharpen your claws on the [src].") - playsound(get_turf(H), 'sound/items/Screwdriver.ogg', 50, 1) + playsound(get_turf(H), usesound, 50, 1) /obj/item/weapon/whetstone/super name = "super whetstone block" diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index ceeb08fd863..91b232c051a 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -85,7 +85,7 @@ usr.visible_message("[user] starts climbing onto \the [src]!") climber = user - if(!do_after(user,50, target = src)) + if(!do_after(user, 50, target = src)) climber = null return diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index e86b7d2d890..b6902dd18ea 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -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, "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, "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, "You begin cutting \the [src] apart...") - 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("[user] slices apart \the [src].", "You cut \the [src] apart with \the [WT].", "You hear welding.") diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index fdabf2de4cf..aeb8101fc75 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -25,7 +25,7 @@ if(istype(O, /obj/item/device/multitool)) to_chat(user, "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, " You disable the locking modules.") update_icon() @@ -89,7 +89,7 @@ src.locked = 1 to_chat(user, "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, " You re-enable the locking modules.") return diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 99f2a4aaa4b..07a738a8c94 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -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, "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, "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, "You cut away the wiring.") - playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) + playsound(loc, W.usesound, 100, 1) rigged = 0 return else return attack_hand(user) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 30e7031db2f..2ced72cbcfe 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -33,14 +33,14 @@ var/global/list/captain_display_cases = list() circuit.forceMove(src) state++ to_chat(user, "You add the airlock electronics to the frame.") - 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, "You pry the glass out of the frame.") - 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, "You pry the electronics out of the frame.") - 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, "You add the proximity sensor to the frame.") - 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) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 170eaa168bc..b07fbf5363c 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "You finish the airlock!") var/path diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index 7719f9b547d..2995bda23c3 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -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 diff --git a/code/game/objects/structures/engicart.dm b/code/game/objects/structures/engicart.dm index 742664b68b0..594139f8d70 100644 --- a/code/game/objects/structures/engicart.dm +++ b/code/game/objects/structures/engicart.dm @@ -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.", \ " You have tightened \the [src]'s casters.", \ "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.", \ " You have loosened \the [src]'s casters.", \ diff --git a/code/game/objects/structures/foodcart.dm b/code/game/objects/structures/foodcart.dm index de103cc5d57..614f4dc27aa 100644 --- a/code/game/objects/structures/foodcart.dm +++ b/code/game/objects/structures/foodcart.dm @@ -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.", \ " You have tightened \the [src]'s casters.", \ "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.", \ " You have loosened \the [src]'s casters.", \ diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 17d7179c931..793398a9c07 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -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, "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, "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, "Now securing the girder") - if(do_after(user, 40, target = src)) + if(do_after(user, 40 * W.toolspeed, target = src)) to_chat(user, "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, "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, "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, "You Disintegrate the girder!") 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, "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, "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, "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, "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, "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, "You dislodged the girder!") new/obj/structure/girder/displaced( src.loc ) @@ -107,7 +108,7 @@ else if(S.amount < 2) return ..() to_chat(user, "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, "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, "Now disassembling the girder") - if(do_after(user,40, target = src)) + if(do_after(user, 40 * W.toolspeed, target = src)) to_chat(user, "You dissasembled the girder!") dismantle() else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) to_chat(user, "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, "You slice apart the girder!") dismantle() diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 4cb2b20f99e..3d88b9ecc8f 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -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("[user] [anchored ? "fastens" : "unfastens"] the grille.", \ "You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.") @@ -180,7 +180,7 @@ to_chat(user, "There is already a window facing this way there.") return to_chat(user, "You start placing the window.") - 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. diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index c5abbad1c96..614af2d4ff4 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -85,20 +85,20 @@ to_chat(user, "[src] can't hold any more signs.") else if(istype(I, /obj/item/weapon/crowbar)) user.visible_message("[user] begins to empty the contents of [src].") - if(do_after(user, 30, target = src)) + if(do_after(user, 30 * I.toolspeed, target = src)) to_chat(usr, "You empty the contents of [src]'s bucket onto the floor.") 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.", \ " You have tightened \the [src]'s casters.", \ "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.", \ " You have loosened \the [src]'s casters.", \ diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 31ab9c94ca2..043177551ff 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -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, "You pry the spikes out of the frame.") new /obj/item/stack/rods(loc, 4) new /obj/structure/kitchenspike_frame(loc) diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 824759b35cb..7c32823ec17 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -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? diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index bed1c66f997..7b250e5d292 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -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 diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 9b4059f1d1d..b2a4dfd3299 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -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, " You begin to tighten \the [src] to the floor...") - 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.", \ " You have tightened \the [src]'s casters. Now it can be played again.", \ "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, " You begin to loosen \the [src]'s casters...") - 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.", \ " You have loosened \the [src]. Now it can be pulled somewhere else.", \ diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index f62ae7ed342..e1c42feb07c 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -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.", \ "You are loosening the [name]'s bolts...") - 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("A floor must be present to secure the [name]!") 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...", \ "You are securing the [name]'s bolts...") - 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]...", \ "You are slicing apart the [name]...") - 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].", \ "You are slicing apart the [name]...") - 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].", \ "You slice apart the [name]!") Dismantle(TRUE) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 301cf1c2053..b2581112ea7 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -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) diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index da69c025bb8..09b92f00ac4 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -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) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 004f73fdd6a..a091afc5675 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -227,9 +227,9 @@ if(istype(W, /obj/item/weapon/wrench)) user.visible_message("[user] is disassembling \a [src].", "You start disassembling \the [src].") - 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("The [src] was sliced apart by [user]!", 1, "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, "You start to add the glass to \the [src].") - if(do_after(user, 10, target = src)) + if(do_after(user, 10 * G.toolspeed, target = src)) G.use(2) to_chat(user, "You add the glass to \the [src].") - 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, "You start to deconstruct \the [src].") - 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, "You dismantle \the [src].") 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, "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, "Table weakened") src.status = 1 else to_chat(user, "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, "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)) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index bbbecf6695d..26d97a52671 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -52,7 +52,7 @@ if(istype(I, /obj/item/weapon/crowbar)) to_chat(user, "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...") 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"]!", "You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!", "You hear grinding porcelain.") cistern = !cistern update_icon() diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 4e41daef289..5aa14e66adf 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -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("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.") - 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, "You dissasembled the windoor assembly!") 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, "There is already a windoor in that location.") 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, "You've unsecured the windoor assembly!") @@ -138,9 +138,10 @@ obj/structure/windoor_assembly/Destroy() return to_chat(user, "You start to reinforce the windoor with plasteel.") - 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, "You reinforce the windoor.") @@ -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, "You wire the windoor!") + 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, "You've removed the airlock electronics!") @@ -239,10 +241,10 @@ obj/structure/windoor_assembly/Destroy() to_chat(usr, "The assembly is missing electronics.") 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) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 0212d2be2a8..4d428682b7f 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -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 ? "You have unfastened the window from the frame." : "You have fastened the window to the frame.")) 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 ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor.")) 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 ? "You have fastened the window to the floor." : "You have unfastened the window.")) 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 ? "You have pried the window into the frame." : "You have pried the window out of the frame.")) 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;iYou unscrew the planks.") new floor_tile(src) make_plating() - playsound(src, 'sound/items/Screwdriver.ogg', 80, 1) + playsound(src, C.usesound, 80, 1) return /turf/simulated/floor/grass diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index e9770536b73..c5dc58f4f26 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -35,10 +35,10 @@ return 1 else to_chat(user, "You begin reinforcing the floor...") - if(do_after(user, 30, target = src)) + if(do_after(user, 30 * C.toolspeed, target = src)) if(R.get_amount() >= 2 && !istype(src, /turf/simulated/floor/engine)) ChangeTurf(/turf/simulated/floor/engine) - playsound(src, 'sound/items/Deconstruct.ogg', 80, 1) + playsound(src, C.usesound, 80, 1) R.use(2) to_chat(user, "You reinforce the floor.") return 1 @@ -59,7 +59,7 @@ if( welder.isOn() && (broken || burnt) ) if(welder.remove_fuel(0,user)) to_chat(user, "You fix some dents on the broken plating.") - playsound(src, 'sound/items/Welder.ogg', 80, 1) + playsound(src, welder.usesound, 80, 1) icon_state = icon_plating burnt = 0 broken = 0 @@ -99,8 +99,8 @@ return if(istype(C, /obj/item/weapon/wrench)) to_chat(user, "You begin removing rods...") - playsound(src, 'sound/items/Ratchet.ogg', 80, 1) - if(do_after(user, 30, target = src)) + playsound(src, C.usesound, 80, 1) + if(do_after(user, 30 * C.toolspeed, target = src)) if(!istype(src, /turf/simulated/floor/engine)) return new /obj/item/stack/rods(src, 2) @@ -236,7 +236,7 @@ if(istype(T, /turf/simulated/floor/plating/airless/catwalk)) var/turf/simulated/floor/plating/airless/catwalk/CW=T CW.update_icon(0) - playsound(src, 'sound/items/Screwdriver.ogg', 80, 1) + playsound(src, C.usesound, 80, 1) /turf/simulated/floor/plating/metalfoam name = "foamed metal plating" diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index da98083ec1a..c9b4695357e 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -272,7 +272,7 @@ var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) to_chat(user, "You burn away the fungi with \the [WT].") - playsound(src, 'sound/items/Welder.ogg', 10, 1) + playsound(src, WT.usesound, 10, 1) for(var/obj/effect/overlay/wall_rot/WR in src) qdel(WR) rotting = 0 @@ -300,7 +300,7 @@ EB.spark_system.start() to_chat(user, "You slash \the [src] with \the [EB]; the thermite ignites!") playsound(src, "sparks", 50, 1) - playsound(src, 'sound/weapons/blade1.ogg', 50, 1) + playsound(src, EB.usesound, 50, 1) thermitemelt(user) return @@ -317,16 +317,16 @@ if(WT.remove_fuel(0,user)) if(response == "Repair") to_chat(user, "You start repairing the damage to [src].") - playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, max(5, damage / 5), target = src) && WT && WT.isOn()) + playsound(src, WT.usesound, 100, 1) + if(do_after(user, max(5, damage / 5) * WT.toolspeed, target = src) && WT && WT.isOn()) to_chat(user, "You finish repairing the damage to [src].") take_damage(-damage) else if(response == "Dismantle") to_chat(user, "You begin slicing through the outer plating.") - playsound(src, 'sound/items/Welder.ogg', 100, 1) + playsound(src, WT.usesound, 100, 1) - if(do_after(user, 100, target = src) && WT && WT.isOn()) + if(do_after(user, 100 * WT.toolspeed, target = src) && WT && WT.isOn()) to_chat(user, "You remove the outer plating.") dismantle_wall() @@ -341,9 +341,9 @@ else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) to_chat(user, "You begin slicing through the outer plating.") - playsound(src, 'sound/items/Welder.ogg', 100, 1) + playsound(src, W.usesound, 100, 1) - if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 120 : 60, target = src)) + if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 120 * W.toolspeed : 60 * W.toolspeed, target = src)) to_chat(user, "You remove the outer plating.") dismantle_wall() visible_message("[user] slices apart \the [src]!","You hear metal being sliced apart.") @@ -353,7 +353,7 @@ to_chat(user, "You begin to drill though the wall.") - if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 120 : 60, target = src)) + if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 480 * W.toolspeed : 240 * W.toolspeed, target = src)) // Diamond pickaxe has 0.25 toolspeed, so 120/60 to_chat(user, "Your drill tears though the last of the reinforced plating.") dismantle_wall() visible_message("[user] drills through \the [src]!","You hear the grinding of metal.") @@ -362,8 +362,8 @@ to_chat(user, "You begin to disintegrates the wall.") - if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 60 : 30, target = src)) - to_chat(user, "Your jackhammer disintegrate the reinforced plating.") + if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 600 * W.toolspeed : 300 * W.toolspeed, target = src)) // Jackhammer has 0.1 toolspeed, so 60/30 + to_chat(user, "Your sonic jackhammer disintegrate the reinforced plating.") dismantle_wall() visible_message("[user] disintegrates \the [src]!","You hear the grinding of metal.") @@ -374,10 +374,10 @@ to_chat(user, "You stab \the [EB] into the wall and begin to slice it apart.") playsound(src, "sparks", 50, 1) - if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 140 : 70, target = src)) + if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 140 * EB.toolspeed : 70 * EB.toolspeed, target = src)) EB.spark_system.start() playsound(src, "sparks", 50, 1) - playsound(src, 'sound/weapons/blade1.ogg', 50, 1) + playsound(src, EB.usesound, 50, 1) dismantle_wall(1) visible_message("[user] slices apart \the [src]!","You hear metal being sliced apart and sparks flying.") @@ -400,7 +400,7 @@ "[user] starts drilling a hole in \the [src].", \ "You start drilling a hole in \the [src].", \ "You hear ratchet.") - if(do_after(user, 80, target = src)) + if(do_after(user, 80 * W.toolspeed, target = src)) user.visible_message( \ "[user] drills a hole in \the [src] and pushes \a [P] into the void", \ "You have finished drilling in \the [src] and push the [P] into the void.", \ diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index bdb0279509e..60f6f1cc3b5 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -28,7 +28,7 @@ var/obj/item/weapon/weldingtool/WT = W if( WT.remove_fuel(0,user) ) to_chat(user, "You burn away the fungi with \the [WT].") - playsound(src, 'sound/items/Welder.ogg', 10, 1) + playsound(src, WT.usesound, 10, 1) for(var/obj/effect/overlay/wall_rot/WR in src) qdel(WR) rotting = 0 @@ -56,7 +56,7 @@ EB.spark_system.start() to_chat(user, "You slash \the [src] with \the [EB]; the thermite ignites!") playsound(src, "sparks", 50, 1) - playsound(src, 'sound/weapons/blade1.ogg', 50, 1) + playsound(src, EB.usesound, 50, 1) thermitemelt(user) return @@ -69,8 +69,8 @@ var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) to_chat(user, "You start repairing the damage to [src].") - playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, max(5, damage / 5), target = src) && WT && WT.isOn()) + playsound(src, WT.usesound, 100, 1) + if(do_after(user, max(5, damage / 5) * WT.toolspeed, target = src) && WT && WT.isOn()) to_chat(user, "You finish repairing the damage to [src].") take_damage(-damage) return @@ -83,7 +83,7 @@ switch(d_state) if(0) if(istype(W, /obj/item/weapon/wirecutters)) - playsound(src, 'sound/items/Wirecutter.ogg', 100, 1) + playsound(src, W.usesound, 100, 1) d_state = 1 update_icon() new /obj/item/stack/rods(src) @@ -93,9 +93,9 @@ if(1) if(istype(W, /obj/item/weapon/screwdriver)) to_chat(user, "You begin removing the support lines.") - playsound(src, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(src, W.usesound, 100, 1) - if(do_after(user, 40, target = src) && d_state == 1) + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == 1) d_state = 2 update_icon() to_chat(user, "You remove the support lines.") @@ -117,9 +117,9 @@ var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) to_chat(user, "You begin slicing through the metal cover.") - playsound(src, 'sound/items/Welder.ogg', 100, 1) + playsound(src, WT.usesound, 100, 1) - if(do_after(user, 60, target = src) && d_state == 2) + if(do_after(user, 60 * WT.toolspeed, target = src) && d_state == 2) d_state = 3 update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") @@ -130,9 +130,9 @@ if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) to_chat(user, "You begin slicing through the metal cover.") - playsound(src, 'sound/items/Welder.ogg', 100, 1) + playsound(src, W.usesound, 100, 1) - if(do_after(user, 40, target = src) && d_state == 2) + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == 2) d_state = 3 update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") @@ -141,9 +141,9 @@ if(3) if(istype(W, /obj/item/weapon/crowbar)) to_chat(user, "You struggle to pry off the cover.") - playsound(src, 'sound/items/Crowbar.ogg', 100, 1) + playsound(src, W.usesound, 100, 1) - if(do_after(user, 100, target = src) && d_state == 3) + if(do_after(user, 100 * W.toolspeed, target = src) && d_state == 3) d_state = 4 update_icon() to_chat(user, "You pry off the cover.") @@ -152,9 +152,9 @@ if(4) if(istype(W, /obj/item/weapon/wrench)) to_chat(user, "You start loosening the anchoring bolts which secure the support rods to their frame.") - playsound(src, 'sound/items/Ratchet.ogg', 100, 1) + playsound(src, W.usesound, 100, 1) - if(do_after(user, 40, target = src) && d_state == 4) + if(do_after(user, 40 * W.toolspeed, target = src) && d_state == 4) d_state = 5 update_icon() to_chat(user, "You remove the bolts anchoring the support rods.") @@ -165,9 +165,9 @@ var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) to_chat(user, "You begin slicing through the support rods.") - playsound(src, 'sound/items/Welder.ogg', 100, 1) + playsound(src, WT.usesound, 100, 1) - if(do_after(user, 100, target = src) && d_state == 5) + if(do_after(user, 100 * WT.toolspeed, target = src) && d_state == 5) d_state = 6 update_icon() new /obj/item/stack/rods(src) @@ -178,9 +178,9 @@ if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) to_chat(user, "You begin slicing through the support rods.") - playsound(src, 'sound/items/Welder.ogg', 100, 1) + playsound(src, W.usesound, 100, 1) - if(do_after(user, 70, target = src) && d_state == 5) + if(do_after(user, 70 * W.toolspeed, target = src) && d_state == 5) d_state = 6 update_icon() new /obj/item/stack/rods( src ) @@ -190,9 +190,9 @@ if(6) if(istype(W, /obj/item/weapon/crowbar)) to_chat(user, "You struggle to pry off the outer sheath.") - playsound(src, 'sound/items/Crowbar.ogg', 100, 1) + playsound(src, W.usesound, 100, 1) - if(do_after(user, 100, target = src) && d_state == 6) + if(do_after(user, 100 * W.toolspeed, target = src) && d_state == 6) to_chat(user, "You pry off the outer sheath.") dismantle_wall() return @@ -203,14 +203,14 @@ if(istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill)) to_chat(user, "You begin to drill though the wall.") - if(do_after(user, 200, target = src)) + if(do_after(user, 800 * W.toolspeed, target = src)) // Diamond drill has 0.25 toolspeed, so 200 to_chat(user, "Your drill tears through the last of the reinforced plating.") dismantle_wall() if(istype(W,/obj/item/weapon/pickaxe/drill/jackhammer)) to_chat(user, "You begin to disintegrate the wall.") - if(do_after(user, 100, target = src)) + if(do_after(user, 1000 * W.toolspeed, target = src)) // Jackhammer has 0.1 toolspeed, so 100 to_chat(user, "Your sonic jackhammer disintegrates the reinforced plating.") dismantle_wall() @@ -220,7 +220,7 @@ to_chat(user, "You begin patching-up the wall with \a [MS].") - if(do_after(user, max(20 * d_state, 100), target = src) && d_state) + if(do_after(user, max(20 * d_state, 100) * MS.toolspeed, target = src) && d_state) if(!MS.use(1)) to_chat(user, "You don't have enough metal for that!") return @@ -238,7 +238,7 @@ return to_chat(user, "You begin adding an additional layer of coating to the wall with \a [MS].") - if(do_after(user, 40, target = src) && !d_state) + if(do_after(user, 40 * MS.toolspeed, target = src) && !d_state) if(!MS.use(2)) to_chat(user, "You don't have enough plasteel for that!") return @@ -269,7 +269,7 @@ "[user] starts drilling a hole in \the [src].", \ "You start drilling a hole in \the [src]. This is going to take a while.", \ "You hear ratchet.") - if(do_after(user, 160, target = src)) + if(do_after(user, 160 * V.toolspeed, target = src)) user.visible_message( \ "[user] drills a hole in \the [src] and pushes \a [P] into the void", \ "You have finished drilling in \the [src] and push the [P] into the void.", \ diff --git a/code/modules/arcade/arcade_base.dm b/code/modules/arcade/arcade_base.dm index 1783239cc4c..b043eb934c9 100644 --- a/code/modules/arcade/arcade_base.dm +++ b/code/modules/arcade/arcade_base.dm @@ -61,7 +61,7 @@ /obj/machinery/arcade/attackby(var/obj/item/O as obj, var/mob/user as mob, params) if(istype(O, /obj/item/weapon/screwdriver) && anchored) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, O.usesound, 50, 1) panel_open = !panel_open to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") update_icon() diff --git a/code/modules/arcade/mob_hunt/mob_cards.dm b/code/modules/arcade/mob_hunt/mob_cards.dm index 16aea7ba55f..0479644ad85 100644 --- a/code/modules/arcade/mob_hunt/mob_cards.dm +++ b/code/modules/arcade/mob_hunt/mob_cards.dm @@ -35,7 +35,7 @@ /obj/item/weapon/storage/box/nanomob_booster_pack name = "Nano-Mob Hunter Trading Card Booster Pack" desc = "Contains 6 random Nano-Mob Hunter Trading Cards. May contain a holographic card!" - can_hold = list("/obj/item/weapon/nanomob_card") + can_hold = list(/obj/item/weapon/nanomob_card) /obj/item/weapon/storage/box/nanomob_booster_pack/New() ..() diff --git a/code/modules/arcade/prize_counter.dm b/code/modules/arcade/prize_counter.dm index e1636fa4e33..93ffbe7e419 100644 --- a/code/modules/arcade/prize_counter.dm +++ b/code/modules/arcade/prize_counter.dm @@ -41,7 +41,7 @@ to_chat(user, "\The [T] seems stuck to your hand!") return if(istype(O, /obj/item/weapon/screwdriver) && anchored) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, O.usesound, 50, 1) panel_open = !panel_open to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") update_icon() diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index d42e30453cd..bd981e99076 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -10,6 +10,8 @@ throw_speed = 3 throw_range = 10 origin_tech = "magnets=1" + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' var/bomb_name = "bomb" // used for naming bombs / mines diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 98ec1a660dd..0a5941f686c 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -201,7 +201,7 @@ BLIND // can't see anything /obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/wirecutters)) if(!clipped) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) + playsound(src.loc, W>usesound, 100, 1) user.visible_message("[user] snips the fingertips off [src].","You snip the fingertips off [src].") clipped = 1 name = "mangled [name]" @@ -399,7 +399,7 @@ BLIND // can't see anything if(istype(I, /obj/item/weapon/wirecutters)) if(can_cut_open) if(!cut_open) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) + playsound(src.loc, I.usesound, 100, 1) user.visible_message("[user] cuts open the toes of [src].","You cut open the toes of [src].") cut_open = 1 icon_state = "[icon_state]_opentoe" diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 11503b40278..a3a38e3af58 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -78,7 +78,7 @@ if(istype(W, /obj/item/weapon/wirecutters)) if(can_be_cut && icon_state == initial(icon_state))//only if not dyed to_chat(user, "You snip the fingertips off of [src].") - playsound(user.loc,'sound/items/Wirecutter.ogg', rand(10,50), 1) + playsound(user.loc, W.usesound, rand(10,50), 1) var/obj/item/clothing/gloves/fingerless/F = new/obj/item/clothing/gloves/fingerless(user.loc) if(pickpocket) F.pickpocket = 1 diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index e64084a0beb..b527a615c5d 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -13,6 +13,8 @@ desc = "It looks pretty sciency." icon = 'icons/obj/rig_modules.dmi' icon_state = "module" + + toolspeed = 1 var/damage = 0 var/obj/item/weapon/rig/holder @@ -73,7 +75,7 @@ to_chat(user, "You start mending the damaged portions of \the [src]...") - if(!do_after(user,30, target = src) || !W || !src) + if(!do_after(user, 30 * W.toolspeed, target = src) || !W || !src) return var/obj/item/stack/nanopaste/paste = W @@ -98,7 +100,7 @@ return to_chat(user, "You start mending the damaged portions of \the [src]...") - if(!do_after(user, 30, target = src) || !W || !src) + if(!do_after(user, 30 * W.toolspeed, target = src) || !W || !src) return damage = 1 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index fbdf5609cae..bf40cf7127e 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -1025,7 +1025,7 @@ if(!can_touch(user, wearer) || !has_emergency_release) return can_touch(user,wearer) usr.visible_message("[user] starts activating \the [src] emergency seals release!") - if(!do_after(user,240, target = wearer)) + if(!do_after(user, 240, target = wearer)) to_chat(user, "You need to focus on activating the emergency release.") return 0 usr.visible_message("[user] activated \the [src] emergency seals release!") diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index a57c2258b04..01793ef360d 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -80,7 +80,7 @@ var/obj/item/rig_module/mod = W to_chat(user, "You begin installing \the [mod] into \the [src].") - if(!do_after(user,40, target = src)) + if(!do_after(user, 40 * W.toolspeed, target = src)) return if(!user || !W) return diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 392e6fac466..adf2e62e5b3 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -65,7 +65,7 @@ var/obj/item/clothing/under/U = H.w_uniform if(istype(U)) user.visible_message("[user] is putting a [src.name] on [H]'s [U.name]!", "You begin to put a [src.name] on [H]'s [U.name]...") - if(do_after(user,40,target=H) && H.w_uniform == U) + if(do_after(user, 40, target=H) && H.w_uniform == U) user.visible_message("[user] puts a [src.name] on [H]'s [U.name]!", "You finish putting a [src.name] on [H]'s [U.name].") U.attackby(src, user) else diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm index aea6cf139f3..72fbdbc9b92 100644 --- a/code/modules/clothing/under/accessories/storage.dm +++ b/code/modules/clothing/under/accessories/storage.dm @@ -103,8 +103,7 @@ /obj/item/clothing/accessory/storage/knifeharness/New() ..() hold.max_combined_w_class = 4 - hold.can_hold = list("/obj/item/weapon/hatchet/unathiknife",\ - "/obj/item/weapon/kitchen/knife") + hold.can_hold = list(/obj/item/weapon/hatchet/unathiknife, /obj/item/weapon/kitchen/knife) new /obj/item/weapon/hatchet/unathiknife(hold) new /obj/item/weapon/hatchet/unathiknife(hold) \ No newline at end of file diff --git a/code/modules/computer3/buildandrepair.dm b/code/modules/computer3/buildandrepair.dm index 173a306158b..0521176f48e 100644 --- a/code/modules/computer3/buildandrepair.dm +++ b/code/modules/computer3/buildandrepair.dm @@ -18,6 +18,8 @@ var/frame_desc = null var/datum/file/program/OS = new/datum/file/program/ntos + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/machinery/computer3/proc/disassemble(mob/user as mob) // todo return @@ -30,6 +32,8 @@ icon = 'icons/obj/stock_parts.dmi' icon_state = "0" var/state = 0 + + var/remove_sound = 'sound/items/Crowbar.ogg' var/obj/item/part/computer/circuitboard/circuit = null var/completed = /obj/machinery/computer @@ -80,8 +84,8 @@ switch(state) if(0) if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) to_chat(user, "You wrench the frame into place.") src.anchored = 1 src.state = 1 @@ -90,23 +94,23 @@ if(!WT.remove_fuel(0, user)) to_chat(user, "The welding tool must be on to complete this task.") return - playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, WT.usesound, 50, 1) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return to_chat(user, "You deconstruct the frame.") new /obj/item/stack/sheet/metal( src.loc, 5 ) qdel(src) if(1) if(istype(P, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) to_chat(user, "You unfasten the frame.") src.anchored = 0 src.state = 0 if(istype(P, /obj/item/weapon/circuitboard) && !circuit) var/obj/item/weapon/circuitboard/B = P if(B.board_type == "computer") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, B.usesound, 50, 1) to_chat(user, "You place the circuit board inside the frame.") src.icon_state = "1" src.circuit = P @@ -115,12 +119,12 @@ else to_chat(user, "This frame does not accept circuit boards of this type!") if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You screw the circuit board into place.") src.state = 2 src.icon_state = "2" if(istype(P, /obj/item/weapon/crowbar) && circuit) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the circuit board.") src.state = 1 src.icon_state = "0" @@ -128,15 +132,15 @@ src.circuit = null if(2) if(istype(P, /obj/item/weapon/screwdriver) && circuit) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You unfasten the circuit board.") src.state = 1 src.icon_state = "1" if(istype(P, /obj/item/weapon/crowbar)) if(battery) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - if(do_after(10, target = src)) + playsound(src.loc, P.usesound, 50, 1) + if(do_after(10 * P.toolspeed, target = src)) battery.loc = loc to_chat(user, "You remove [battery].") battery = null @@ -145,8 +149,8 @@ if(istype(P, /obj/item/weapon/stock_parts/cell)) if(!battery) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(5, target = src)) + playsound(src.loc, P.usesound, 50, 1) + if(do_after(5 * P.toolspeed, target = src)) battery = P P.loc = src to_chat(user, "You insert [battery].") @@ -156,8 +160,8 @@ if(istype(P, /obj/item/stack/cable_coil)) if(P:amount >= 5) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) if(P) P:amount -= 5 if(!P:amount) qdel(P) @@ -169,7 +173,7 @@ if(components.len) to_chat(user, "There are parts in the way!") return - playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the cables.") src.state = 2 src.icon_state = "2" @@ -181,8 +185,8 @@ if(istype(P, /obj/item/stack/sheet/glass)) if(P:amount >= 2) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, P.usesound, 50, 1) + if(do_after(user, 20 * P.toolspeed, target = src)) if(P) P:use(2) to_chat(user, "You put in the glass panel.") @@ -190,13 +194,13 @@ src.icon_state = "4" if(4) if(istype(P, /obj/item/weapon/crowbar)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the glass panel.") src.state = 3 src.icon_state = "3" new /obj/item/stack/sheet/glass( src.loc, 2 ) if(istype(P, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You connect the monitor.") var/obj/machinery/computer3/B = new src.circuit.build_path ( src.loc, built=1 ) /*if(circuit.powernet) B:powernet = circuit.powernet @@ -226,8 +230,8 @@ I = input(usr, "Remove which component?","Remove component", null) as null|obj in components if(I) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - if(do_after(usr,25, target = src)) + playsound(src.loc, remove_sound, 50, 1) + if(do_after(usr, 25, target = src)) if(I==hdd) components -= hdd hdd.loc = loc diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 98c658c9856..6f51d07ca04 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -26,6 +26,8 @@ var/tattoo_r = 1 // RGB values for the body markings var/tattoo_g = 1 var/tattoo_b = 1 + toolspeed = 1 + usesound = 'sound/items/Welder2.ogg' /obj/item/device/fluff/tattoo_gun/attack(mob/living/carbon/M as mob, mob/user as mob) if(user.a_intent == "harm") @@ -61,7 +63,7 @@ else user.visible_message("[user] begins to apply a [tattoo_name] [target] with the [src].", "You begin to tattoo [target] with the [src]!") - if(!do_after(user,30, target = M)) + if(!do_after(user, 30 * toolspeed, target = M)) return user.visible_message("[user] finishes the [tattoo_name] on [target].", "You finish the [tattoo_name].") @@ -69,7 +71,7 @@ target.change_markings(tattoo_icon, "body") target.change_marking_color(rgb(tattoo_r, tattoo_g, tattoo_b), "body") - playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1) + playsound(src.loc, usesound, 20, 1) used = 1 update_icon() diff --git a/code/modules/detective_work/footprints_and_rag.dm b/code/modules/detective_work/footprints_and_rag.dm index 64ade59adee..cc93863cc95 100644 --- a/code/modules/detective_work/footprints_and_rag.dm +++ b/code/modules/detective_work/footprints_and_rag.dm @@ -25,6 +25,7 @@ volume = 5 can_be_placed_into = null flags = OPENCONTAINER | NOBLUDGEON + var/wipespeed = 30 /obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag) if(ismob(target) && target.reagents && reagents.total_volume) @@ -39,7 +40,7 @@ if(!proximity) return if(istype(A) && src in user) user.visible_message("[user] starts to wipe down [A] with [src]!") - if(do_after(user,30, target = A)) + if(do_after(user, wipespeed, target = A)) user.visible_message("[user] finishes wiping off the [A]!") A.clean_blood() return diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 005fce56df0..6dc1c6870b2 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -606,6 +606,7 @@ if(user.a_intent == I_HELP) if(W.isOn()) if(cur_health < max_health) + playsound(loc, W.usesound, 50, 1) to_chat(usr, "You repair some of the cracks on \the [src].") cur_health += 20 check_health() @@ -613,7 +614,7 @@ to_chat(usr, "There is no damage to fix!") else if(cur_health < max_health) - to_chat(usr, "[W.name] must on to repair this damage.") + to_chat(usr, "[W.name] must be on to repair this damage.") else user.changeNext_move(CLICK_CD_MELEE) hit(W.force) @@ -672,8 +673,8 @@ if(istype(O, /obj/item/weapon/wrench)) if(water_level == 0) to_chat(usr, "Now disassembling [src].") - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user,50, target = src)) + playsound(src.loc, O.usesound, 50, 1) + if(do_after(user, 50 * O.toolspeed, target = src)) destroy(1) else to_chat(usr, "[src] must be empty before you disassemble it!") diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index 81974b39c0e..75270faf0e0 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -41,7 +41,7 @@ /obj/machinery/bottler/attackby(obj/item/O, mob/user, params) if(iswrench(O)) //This being before the canUnequip check allows borgs to (un)wrench bottlers in case they need move them to fix stuff - playsound(src, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src, O.usesound, 50, 1) if(anchored) anchored = 0 to_chat(user, "[src] can now be moved.") diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index baf5e8e98ee..a69b0a718ef 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -65,7 +65,7 @@ if(exchange_parts(user, O)) return if(!broken && istype(O, /obj/item/weapon/wrench)) - playsound(src, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src, O.usesound, 50, 1) if(anchored) anchored = 0 to_chat(user, "\The [src] can now be moved.") @@ -83,7 +83,7 @@ "[user] starts to fix part of \the [src].", \ "You start to fix part of \the [src]." \ ) - if(do_after(user,20, target = src)) + if(do_after(user, 20 * O.toolspeed, target = src)) user.visible_message( \ "[user] fixes part of \the [src].", \ "You have fixed part of \the [src]." \ @@ -94,7 +94,7 @@ "[user] starts to fix part of \the [src].", \ "You start to fix part of \the [src]." \ ) - if(do_after(user,20, target = src)) + if(do_after(user, 20 * O.toolspeed, target = src)) user.visible_message( \ "[user] fixes \the [src].", \ "You have fixed \the [src]." \ @@ -112,7 +112,7 @@ "[user] starts to clean \the [src].", \ "You start to clean \the [src]." \ ) - if(do_after(user,20, target = src)) + if(do_after(user, 20 * O.toolspeed, target = src)) user.visible_message( \ "[user] has cleaned \the [src].", \ "You have cleaned \the [src]." \ diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 8cbca85a521..27ae9684f5b 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -874,8 +874,8 @@ if(!anchored && !isinspace()) user.visible_message("[user] begins to wrench [src] into place.", "You begin to wrench [src] in place...") - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if (do_after(user, 20, target = src)) + playsound(loc, O.usesound, 50, 1) + if (do_after(user, 20 * O.toolspeed, target = src)) if(anchored) return anchored = 1 @@ -884,8 +884,8 @@ else if(anchored) user.visible_message("[user] begins to unwrench [src].", \ "You begin to unwrench [src]...") - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - if (do_after(user, 20, target = src)) + playsound(loc, O.usesound, 50, 1) + if (do_after(user, 20 * O.toolspeed, target = src)) if(!anchored) return anchored = 0 @@ -894,7 +894,7 @@ else if(iswirecutter(O) && wrenchable) using_irrigation = !using_irrigation - playsound(src, 'sound/items/Wirecutter.ogg', 50, 1) + playsound(src, O.usesound, 50, 1) user.visible_message("[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses.", \ "You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.") for(var/obj/machinery/hydroponics/h in range(1,src)) @@ -905,11 +905,11 @@ to_chat(user, "[src] doesn't have any plants or weeds!") return user.visible_message("[user] starts digging out [src]'s plants...", "You start digging out [src]'s plants...") - playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) - if(!do_after(user, 50, target = src) || (!myseed && !weedlevel)) + playsound(src, O.usesound, 50, 1) + if(!do_after(user, 25 * O.toolspeed, target = src) || (!myseed && !weedlevel)) return user.visible_message("[user] digs out the plants in [src]!", "You dig out all of [src]'s plants!") - playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) + playsound(src, O.usesound, 50, 1) if(myseed) //Could be that they're just using it as a de-weeder age = 0 plant_health = 0 diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index f2272c97e96..a32b31611cc 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -31,7 +31,7 @@ I.forceMove(src) update_icon() -/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob, params) +/obj/structure/bookcase/attackby(obj/item/O as obj, mob/user as mob, params) if(busy) //So that you can't mess with it while deconstructing return 1 if(is_type_in_list(O, allowed_books)) @@ -51,11 +51,11 @@ else if(istype(O, /obj/item/weapon/wrench)) user.visible_message("[user] starts disassembling \the [src].", \ "You start disassembling \the [src].") - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) + playsound(get_turf(src), O.usesound, 50, 1) busy = 1 - if(do_after(user,50, target = src)) - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 75, 1) + if(do_after(user, 50 * O.toolspeed, target = src)) + playsound(get_turf(src), O.usesound, 75, 1) user.visible_message("[user] disassembles \the [src].", \ "You disassemble \the [src].") busy = 0 @@ -276,7 +276,7 @@ if(carved) return 1 to_chat(user, "You begin to carve out [title].") - if(do_after(user, 30, target = src)) + if(do_after(user, 30 * W.toolspeed, target = src)) to_chat(user, "You carve out the pages from [title]! You didn't want to read it anyway.") carved = 1 return 1 diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 7b735306ea8..f5176827095 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -720,7 +720,7 @@ icon_state = "implant" max_w_class = 3 storage_slots = 2 - can_hold = list("/obj/item/weapon/mining_drone_cube","/obj/item/weapon/weldingtool/hugetank") + can_hold = list(/obj/item/weapon/mining_drone_cube, /obj/item/weapon/weldingtool/hugetank) /obj/item/weapon/storage/box/drone_kit/New() ..() diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index defa8a930ff..395f6842a1f 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -89,6 +89,8 @@ sharp = 1 edge = 1 var/excavation_amount = 100 + usesound = 'sound/effects/picaxe1.ogg' + toolspeed = 1 /obj/item/weapon/pickaxe/proc/playDigSound() playsound(src, pick(digsound),20,1) @@ -100,6 +102,16 @@ digspeed = 30 //mines faster than a normal pickaxe, bought from mining vendor origin_tech = "materials=3;engineering=2" desc = "A silver-plated pickaxe that mines slightly faster than standard-issue." + toolspeed = 0.75 + +/obj/item/weapon/pickaxe/gold + name = "golden pickaxe" + icon_state = "gpickaxe" + item_state = "gpickaxe" + digspeed = 20 + origin_tech = "materials=4;engineering=2" + desc = "A gold-plated pickaxe that mines faster than standard-issue." + toolspeed = 0.6 /obj/item/weapon/pickaxe/diamond name = "diamond-tipped pickaxe" @@ -108,6 +120,7 @@ digspeed = 20 //mines twice as fast as a normal pickaxe, bought from mining vendor origin_tech = "materials=4;engineering=3" desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt." + toolspeed = 0.5 /obj/item/weapon/pickaxe/drill name = "mining drill" @@ -116,8 +129,10 @@ digspeed = 25 //available from roundstart, faster than a pickaxe. digsound = list('sound/weapons/drill.ogg') hitsound = 'sound/weapons/drill.ogg' + usesound = 'sound/weapons/drill.ogg' origin_tech = "materials=2;powerstorage=3;engineering=2" desc = "An electric mining drill for the especially scrawny." + toolspeed = 0.5 /obj/item/weapon/pickaxe/drill/cyborg name = "cyborg mining drill" @@ -130,6 +145,7 @@ digspeed = 10 origin_tech = "materials=6;powerstorage=4;engineering=5" desc = "Yours is the drill that will pierce the heavens!" + toolspeed = 0.25 /obj/item/weapon/pickaxe/diamonddrill/traitor //Pocket-sized traitor diamond drill. name = "supermatter drill" @@ -142,6 +158,7 @@ name = "diamond-tipped cyborg mining drill" //To inherit the NODROP flag, and easier to change borg specific drill mechanics. icon_state = "diamonddrill" digspeed = 10 + toolspeed = 0.25 /obj/item/weapon/pickaxe/drill/jackhammer name = "sonic jackhammer" @@ -151,23 +168,10 @@ origin_tech = "materials=3;powerstorage=2;engineering=2" digsound = list('sound/weapons/sonic_jackhammer.ogg') hitsound = 'sound/weapons/sonic_jackhammer.ogg' + usesound = 'sound/weapons/sonic_jackhammer.ogg' desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls." + toolspeed = 0.1 -/obj/item/weapon/pickaxe/silver - name = "silver pickaxe" - icon_state = "spickaxe" - item_state = "spickaxe" - digspeed = 30 - origin_tech = "materials=3" - desc = "This makes no metallurgic sense." - -/obj/item/weapon/pickaxe/gold - name = "golden pickaxe" - icon_state = "gpickaxe" - item_state = "gpickaxe" - digspeed = 20 - origin_tech = "materials=4" - desc = "This makes no metallurgic sense." /*****************************Shovel********************************/ /obj/item/weapon/shovel @@ -184,6 +188,8 @@ materials = list(MAT_METAL=50) origin_tech = "materials=1;engineering=1" attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") + usesound = 'sound/effects/shovel_dig.ogg' + toolspeed = 1 /obj/item/weapon/shovel/spade name = "spade" @@ -193,6 +199,7 @@ force = 5.0 throwforce = 7.0 w_class = 2 + toolspeed = 2 /**********************Mining car (Crate like thing, not the rail car)**************************/ @@ -393,10 +400,10 @@ /obj/item/device/gps/computer/attackby(obj/item/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) user.visible_message("[user] disassembles the gps.", \ "You start to disassemble the gps...", "You hear clanking and banging noises.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) new /obj/item/device/gps(loc) qdel(src) return ..() @@ -471,10 +478,10 @@ /obj/structure/fans/attackby(obj/item/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) user.visible_message("[user] disassembles the fan.", \ "You start to disassemble the fan...", "You hear clanking and banging noises.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) deconstruct() return ..() @@ -522,10 +529,10 @@ /obj/structure/tubes/attackby(obj/item/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) user.visible_message("[user] disassembles [src].", \ "You start to disassemble [src]...", "You hear clanking and banging noises.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) new /obj/item/stack/rods(loc) qdel(src) return ..() diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 623192ff820..d57f509e13e 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -470,14 +470,14 @@ var/global/list/rockTurfEdgeCache = list( src.gets_dug() return -/turf/simulated/floor/plating/airless/asteroid/attackby(obj/item/weapon/W as obj, mob/user as mob, params) +/turf/simulated/floor/plating/airless/asteroid/attackby(obj/item/weapon/W, mob/user, params) //note that this proc does not call ..() if(!W || !user) return 0 if((istype(W, /obj/item/weapon/shovel))) - var/turf/T = user.loc - if(!( istype(T, /turf) )) + var/turf/T = get_turf(user) + if(!istype(T)) return if(dug) @@ -485,17 +485,15 @@ var/global/list/rockTurfEdgeCache = list( return to_chat(user, "You start digging...") - - sleep(20) - if((user.loc == T && user.get_active_hand() == W)) + if(do_after(user, 20 * W.toolspeed, target = src)) to_chat(user, "You dig a hole.") gets_dug() return if((istype(W, /obj/item/weapon/pickaxe))) var/obj/item/weapon/pickaxe/P = W - var/turf/T = user.loc - if(!( istype(T, /turf) )) + var/turf/T = get_turf(user) + if(!istype(T)) return if(dug) @@ -504,8 +502,7 @@ var/global/list/rockTurfEdgeCache = list( to_chat(user, "You start digging...") - sleep(P.digspeed) - if((user.loc == T && user.get_active_hand() == W)) + if(do_after(user, P.digspeed, target = src)) to_chat(user, "You dig a hole.") gets_dug() return diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 9e4d268281c..2b671317b64 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -192,8 +192,12 @@ quality = 1 return ..() + +/obj/item/weapon/twohanded/required/gibtonite/attack_ghost(mob/user) + if(wires) + wires.Interact(user) -/obj/item/weapon/twohanded/required/gibtonite/attack_self(user) +/obj/item/weapon/twohanded/required/gibtonite/attack_self(mob/user) if(wires) wires.Interact(user) else diff --git a/code/modules/mob/living/carbon/human/interactive/functions.dm b/code/modules/mob/living/carbon/human/interactive/functions.dm index 272b95d3577..ad4d8226c4a 100644 --- a/code/modules/mob/living/carbon/human/interactive/functions.dm +++ b/code/modules/mob/living/carbon/human/interactive/functions.dm @@ -86,7 +86,7 @@ custom_emote(1, "[src]'s chest opens up, revealing a large mass of explosives and tangled wires!") if(inactivity_period <= 0) inactivity_period = 9999 // technically infinite - if(do_after(src, 60, target=traitorTarget)) + if(do_after(src, 60, target = traitorTarget)) custom_emote(1, "A fire bursts from [src]'s eyes, igniting white hot and consuming their body in a flaming explosion!") explosion(src, 6, 6, 6) else diff --git a/code/modules/mob/living/carbon/human/species/apollo.dm b/code/modules/mob/living/carbon/human/species/apollo.dm index 23706657f57..4fcedc1844a 100644 --- a/code/modules/mob/living/carbon/human/species/apollo.dm +++ b/code/modules/mob/living/carbon/human/species/apollo.dm @@ -66,21 +66,21 @@ M.visible_message("[M] begins to violently pull off [H]'s antennae.") to_chat(H, "[M] grips your antennae and starts violently pulling!") - do_after(H, 250, target = src) - if(p_loc == M.loc && p_loc_m == H.loc) - var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode - H.remove_language("Wryn Hivemind") - node.remove(H) - node.loc = M.loc - to_chat(M, "You hear a loud crunch as you mercilessly pull off [H]'s antennae.") - to_chat(H, "You hear a loud crunch as your antennae is ripped off your head by [M].") - to_chat(H, "It's so quiet...") - head_organ.h_style = "Bald" - H.update_hair() + if(do_after(H, 250, target = src)) + if(p_loc == M.loc && p_loc_m == H.loc) + var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode + H.remove_language("Wryn Hivemind") + node.remove(H) + node.loc = M.loc + to_chat(M, "You hear a loud crunch as you mercilessly pull off [H]'s antennae.") + to_chat(H, "You hear a loud crunch as your antennae is ripped off your head by [M].") + to_chat(H, "It's so quiet...") + head_organ.h_style = "Bald" + H.update_hair() - M.create_attack_log("removed antennae [H.name] ([H.ckey])") - H.create_attack_log("Has had their antennae removed by [M.name] ([M.ckey])") - msg_admin_attack("[key_name(M)] removed [key_name(H)]'s antennae") + M.create_attack_log("removed antennae [H.name] ([H.ckey])") + H.create_attack_log("Has had their antennae removed by [M.name] ([M.ckey])") + msg_admin_attack("[key_name(M)] removed [key_name(H)]'s antennae") return 0 /datum/species/nucleation diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index dc8624db9d1..239f0e6330a 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1062,7 +1062,7 @@ var/list/ai_verbs_default = list( if(istype(W, /obj/item/weapon/wrench)) if(anchored) user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") - if(!do_after(user,40, target = src)) + if(!do_after(user, 40 * W.toolspeed, target = src)) user.visible_message("\The [user] decides not to unbolt \the [src].") return user.visible_message("\The [user] finishes unfastening \the [src]!") @@ -1070,7 +1070,7 @@ var/list/ai_verbs_default = list( return else user.visible_message("\The [user] starts to bolt \the [src] to the plating...") - if(!do_after(user,40, target = src)) + if(!do_after(user, 40 * W.toolspeed, target = src)) user.visible_message("\The [user] decides not to bolt \the [src].") return user.visible_message("\The [user] finishes fastening down \the [src]!") diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 3df660dc117..cea257d1234 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -44,6 +44,10 @@ // /obj/item/weapon/paper_bundle, /obj/item/weapon/card/id ) + +/obj/item/weapon/gripper/New() + ..() + can_hold = typecacheof(can_hold) /obj/item/weapon/gripper/attack_self(mob/user as mob) if(wrapped) @@ -118,10 +122,9 @@ //Check if the item is blacklisted. var/grab = 0 - for(var/typepath in can_hold) - if(istype(I,typepath)) + if(can_hold.len) + if(is_type_in_typecache(I, can_hold)) grab = 1 - break //We can grab the item, finally. if(grab) @@ -200,7 +203,7 @@ to_chat(D, "You begin decompiling the other drone.") - if(!do_after(D,50, target = target)) + if(!do_after(D, 50, target = target)) to_chat(D, "You need to remain still while decompiling such a large object.") return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index d456297127b..0c44545e72f 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -617,7 +617,7 @@ var/list/robot_verbs_default = list( var/obj/item/weapon/weldingtool/WT = W user.changeNext_move(CLICK_CD_MELEE) if(WT.remove_fuel(0)) - playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) adjustBruteLoss(-30) updatehealth() add_fingerprint(user) @@ -651,7 +651,7 @@ var/list/robot_verbs_default = list( return to_chat(user, "You jam the crowbar into the robot and begin levering [mmi].") - if(do_after(user,3 SECONDS, target = src)) + if(do_after(user, 30 * W.toolspeed, target = src)) to_chat(user, "You damage some parts of the chassis, but eventually manage to rip out [mmi]!") var/obj/item/robot_parts/robot_suit/C = new/obj/item/robot_parts/robot_suit(loc) C.l_leg = new/obj/item/robot_parts/l_leg(C) @@ -945,9 +945,11 @@ var/list/robot_verbs_default = list( adjustStaminaLoss(damage) updatehealth() +/mob/living/silicon/robot/attack_ghost(mob/user) + if(wiresexposed) + wires.Interact(user) /mob/living/silicon/robot/attack_hand(mob/user) - add_fingerprint(user) if(opened && !wiresexposed && (!istype(user, /mob/living/silicon))) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 152ed03fec8..55c3a8fba0f 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -115,8 +115,8 @@ ..() modules += new /obj/item/weapon/melee/baton/loaded(src) modules += new /obj/item/weapon/extinguisher(src) - modules += new /obj/item/weapon/wrench(src) - modules += new /obj/item/weapon/crowbar(src) + modules += new /obj/item/weapon/wrench/cyborg(src) + modules += new /obj/item/weapon/crowbar/cyborg(src) modules += new /obj/item/device/healthanalyzer(src) emag = new /obj/item/weapon/melee/energy/sword/cyborg(src) @@ -193,11 +193,11 @@ modules += new /obj/item/weapon/rcd/borg(src) modules += new /obj/item/weapon/extinguisher(src) modules += new /obj/item/weapon/weldingtool/largetank/cyborg(src) - modules += new /obj/item/weapon/screwdriver(src) - modules += new /obj/item/weapon/wrench(src) - modules += new /obj/item/weapon/crowbar(src) - modules += new /obj/item/weapon/wirecutters(src) - modules += new /obj/item/device/multitool(src) + modules += new /obj/item/weapon/screwdriver/cyborg(src) + modules += new /obj/item/weapon/wrench/cyborg(src) + modules += new /obj/item/weapon/crowbar/cyborg(src) + modules += new /obj/item/weapon/wirecutters/cyborg(src) + modules += new /obj/item/device/multitool/cyborg(src) modules += new /obj/item/device/t_scanner(src) modules += new /obj/item/device/analyzer(src) modules += new /obj/item/taperoll/engineering(src) @@ -353,7 +353,7 @@ modules += new /obj/item/weapon/gun/energy/printer(src) modules += new /obj/item/weapon/gun/projectile/revolver/grenadelauncher/multi/cyborg(src) modules += new /obj/item/weapon/card/emag(src) - modules += new /obj/item/weapon/crowbar(src) + modules += new /obj/item/weapon/crowbar/cyborg(src) modules += new /obj/item/weapon/pinpointer/operative(src) emag = null @@ -391,7 +391,7 @@ modules += new /obj/item/weapon/surgicaldrill(src) modules += new /obj/item/weapon/melee/energy/sword/cyborg/saw(src) //Energy saw -- primary weapon modules += new /obj/item/weapon/card/emag(src) - modules += new /obj/item/weapon/crowbar(src) + modules += new /obj/item/weapon/crowbar/cyborg(src) modules += new /obj/item/weapon/pinpointer/operative(src) emag = null @@ -411,7 +411,7 @@ modules += new /obj/item/weapon/pickaxe/drill/jackhammer(src) modules += new /obj/item/borg/combat/shield(src) modules += new /obj/item/borg/combat/mobility(src) - modules += new /obj/item/weapon/wrench(src) + modules += new /obj/item/weapon/wrench/cyborg(src) emag = new /obj/item/weapon/gun/energy/lasercannon/cyborg(src) fix_modules() @@ -427,7 +427,7 @@ modules += new /obj/item/weapon/pickaxe/drill/jackhammer(src) modules += new /obj/item/borg/combat/shield(src) modules += new /obj/item/borg/combat/mobility(src) - modules += new /obj/item/weapon/wrench(src) + modules += new /obj/item/weapon/wrench/cyborg(src) emag = new /obj/item/weapon/gun/energy/lasercannon/cyborg(src) fix_modules() @@ -474,11 +474,11 @@ /obj/item/weapon/robot_module/drone/New() modules += new /obj/item/weapon/weldingtool/largetank/cyborg(src) - modules += new /obj/item/weapon/screwdriver(src) - modules += new /obj/item/weapon/wrench(src) - modules += new /obj/item/weapon/crowbar(src) - modules += new /obj/item/weapon/wirecutters(src) - modules += new /obj/item/device/multitool(src) + modules += new /obj/item/weapon/screwdriver/cyborg(src) + modules += new /obj/item/weapon/wrench/cyborg(src) + modules += new /obj/item/weapon/crowbar/cyborg(src) + modules += new /obj/item/weapon/wirecutters/cyborg(src) + modules += new /obj/item/device/multitool/cyborg(src) modules += new /obj/item/device/lightreplacer(src) modules += new /obj/item/weapon/gripper(src) modules += new /obj/item/weapon/matter_decompiler(src) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 50a7afc64b5..23466c3e7b4 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -326,7 +326,7 @@ to_chat(user, "Close the access panel before manipulating the personality slot!") else to_chat(user, "You attempt to pull [paicard] free...") - if(do_after(user, 30, target = src)) + if(do_after(user, 30 * W.toolspeed, target = src)) if(paicard) user.visible_message("[user] uses [W] to pull [paicard] out of [bot_name]!","You pull [paicard] out of [bot_name] with [W].") ejectpai(user) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 27bfe821502..d524ffd8e06 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -139,10 +139,11 @@ to_chat(user, "You need one length of cable to wire the ED-209!") return to_chat(user, "You start to wire [src]...") - if(do_after(user, 40, target = src)) + if(do_after(user, 40 * W.toolspeed, target = src)) if(coil.get_amount() >= 1 && build_step == 6) coil.use(1) build_step = 7 + playsound(loc, W.usesound, 50, 1) to_chat(user, "You wire the ED-209 assembly.") name = "wired ED-209 assembly" @@ -174,9 +175,9 @@ if(8) if(istype(W, /obj/item/weapon/screwdriver)) - playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(loc, W.usesound, 100, 1) to_chat(user, "You start attaching the gun to the frame...") - if(do_after(user, 40, target = src)) + if(do_after(user, 40 * W.toolspeed, target = src)) build_step++ name = "armed [name]" to_chat(user, "Taser gun attached.") diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index ef0be0f4568..871c8694725 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -311,7 +311,7 @@ else dat += "Removed
" - wires.ui_interact(user) + wires.Interact(user) else dat += "
The bot is in maintenance mode and cannot be controlled.

" diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 5ad9eec3d48..86beb8f6bda 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -87,9 +87,9 @@ to_chat(user, "You can't shave this corgi, it's already been shaved!") return user.visible_message("[user] starts to shave [src] using \the [O].", "You start to shave [src] using \the [O]...") - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * O.toolspeed, target = src)) user.visible_message("[user] shaves [src]'s hair using \the [O].") - playsound(loc, 'sound/items/Welder2.ogg', 20, 1) + playsound(loc, O.usesound, 20, 1) shaved = 1 icon_living = "[initial(icon_living)]_shaved" icon_dead = "[initial(icon_living)]_shaved_dead" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index b54b9276b62..d7d008a0476 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1056,7 +1056,7 @@ var/list/slot_equipment_priority = list( \ visible_implants += O return visible_implants -mob/proc/yank_out_object() +/mob/proc/yank_out_object() set category = "Object" set name = "Yank out object" set desc = "Remove an embedded item at the cost of bleeding and pain." diff --git a/code/modules/ninja/suit/suit_attackby.dm b/code/modules/ninja/suit/suit_attackby.dm index ad4c64decca..0229dbf1e99 100644 --- a/code/modules/ninja/suit/suit_attackby.dm +++ b/code/modules/ninja/suit/suit_attackby.dm @@ -6,7 +6,7 @@ var/obj/item/weapon/stock_parts/cell/CELL if(CELL.maxcharge > cell.maxcharge && suitGloves) to_chat(U, "Higher maximum capacity detected.\nUpgrading...") - if(n_gloves && n_gloves.candrain && do_after(U,s_delay, target = U)) + if(n_gloves && n_gloves.candrain && do_after(U, s_delay, target = U)) U.drop_item() CELL.loc = src CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge) diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index c7be9890a4f..a759ab2c850 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -43,7 +43,7 @@ icon_state = initial(icon_state) updateUsrDialog() else if(istype(P, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, P.usesound, 50, 1) anchored = !anchored to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") else diff --git a/code/modules/paperwork/frames.dm b/code/modules/paperwork/frames.dm index 46f4e12d97e..6a2e7d2d8b9 100644 --- a/code/modules/paperwork/frames.dm +++ b/code/modules/paperwork/frames.dm @@ -3,6 +3,8 @@ desc = "Its patented design allows it to be folded larger or smaller to accommodate standard paper, photo, and poster, and canvas sizes." icon = 'icons/obj/bureaucracy.dmi' + usesound = 'sound/items/Deconstruct.ogg' + var/icon_base var/obj/displayed @@ -58,7 +60,7 @@ /obj/item/weapon/picture_frame/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/screwdriver)) if(displayed) - playsound(src, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(src, I.usesound, 100, 1) user.visible_message("[user] unfastens \the [displayed] out of \the [src].", "You unfasten \the [displayed] out of \the [src].") if(istype(displayed, /obj/structure/sign/poster)) @@ -72,7 +74,7 @@ else to_chat(user, "There is nothing to remove from \the [src].") else if(istype(I, /obj/item/weapon/crowbar)) - playsound(src, 'sound/items/Crowbar.ogg', 100, 1) + playsound(src, I.usesound, 100, 1) user.visible_message("[user] breaks down \the [src].", "You break down \the [src].") for(var/A in contents) if(istype(A, /obj/structure/sign/poster)) @@ -135,7 +137,7 @@ PF.pixel_x = px PF.pixel_y = py - playsound(PF.loc, 'sound/items/Deconstruct.ogg', 100, 1) + playsound(PF.loc, usesound, 100, 1) /obj/item/weapon/picture_frame/examine(mob/user, var/distance = -1, var/infix = "", var/suffix = "") ..() @@ -213,10 +215,10 @@ /obj/structure/sign/picture_frame/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(src, I.usesound, 100, 1) user.visible_message("[user] begins to unfasten \the [src] from the wall.", "You begin to unfasten \the [src] from the wall.") - if(do_after(user, 100, target = src)) - playsound(src, 'sound/items/Deconstruct.ogg', 100, 1) + if(do_after(user, 100 * I.toolspeed, target = src)) + playsound(src, I.usesound, 100, 1) user.visible_message("[user] unfastens \the [src] from the wall.", "You unfasten \the [src] from the wall.") frame.forceMove(user.loc) frame = null diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index f2f25d58a2d..a438d98afdc 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -150,7 +150,7 @@ else to_chat(user, "This cartridge is not yet ready for replacement! Use up the rest of the toner.") else if(istype(O, /obj/item/weapon/wrench)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, O.usesound, 50, 1) anchored = !anchored to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") else if(istype(O, /obj/item/weapon/grab)) //For ass-copying. diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 4a51070629e..11faf20a703 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -109,7 +109,7 @@ icon = 'icons/obj/items.dmi' icon_state = "album" item_state = "briefcase" - can_hold = list("/obj/item/weapon/photo") + can_hold = list(/obj/item/weapon/photo) burn_state = FLAMMABLE /obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 0c6965c0e06..9e1618aa280 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -126,6 +126,8 @@ w_class = 2 item_state = "electronic" flags = CONDUCT + usesound = 'sound/items/Deconstruct.ogg' + toolspeed = 1 /obj/machinery/power/apc/connect_to_network() //Override because the APC does not directly connect to the network; it goes through a terminal. @@ -431,10 +433,10 @@ if(terminal) to_chat(user, "Disconnect wires first.") return - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) to_chat(user, "You are trying to remove the power control board...")//lpeters - fixed grammar issues - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * W.toolspeed, target = src)) if(has_electronics==1) has_electronics = 0 if((stat & BROKEN) || malfhack) @@ -472,6 +474,7 @@ user.visible_message(\ "[user.name] has inserted the power cell to [src.name]!",\ "You insert the power cell.") + playsound(loc, W.usesound, 50, 1) chargecount = 0 update_icon() else if(istype(W, /obj/item/weapon/screwdriver)) // haxing @@ -484,12 +487,12 @@ if(has_electronics==1 && terminal) has_electronics = 2 stat &= ~MAINT - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) to_chat(user, "You screw the circuit electronics into place.") else if(has_electronics==2) has_electronics = 1 stat |= MAINT - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) to_chat(user, "You unfasten the electronics.") else /* has_electronics==0 */ to_chat(user, "There is nothing to secure.") @@ -527,8 +530,8 @@ to_chat(user, "You need more wires.") return to_chat(user, "You start adding cables to the APC frame...") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, C.usesound, 50, 1) + if(do_after(user, 20 * C.toolspeed, target = src)) if(C.amount >= 10 && !terminal && opened && has_electronics != 2) var/turf/T = get_turf(src) var/obj/structure/cable/N = T.get_cable_node() @@ -548,8 +551,8 @@ to_chat(user, "You must remove the floor plating in front of the APC first.") return to_chat(user, "You begin to cut the cables...") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 50, target = src)) + playsound(src.loc, W.usesound, 50, 1) + if(do_after(user, 50 * W.toolspeed, target = src)) if(terminal && opened && has_electronics!=2) if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread @@ -561,8 +564,8 @@ qdel(terminal) // qdel else if(istype(W, /obj/item/weapon/apc_electronics) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack)) to_chat(user, "You trying to insert the power control board into the frame...") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(do_after(user, 10, target = src)) + playsound(src.loc, W.usesound, 50, 1) + if(do_after(user, 10 * W.toolspeed, target = src)) if(has_electronics==0) has_electronics = 1 to_chat(user, "You place the power control board inside the frame.") @@ -578,8 +581,8 @@ user.visible_message("[user.name] welds [src].", \ "You start welding the APC frame...", \ "You hear welding.") - 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.remove_fuel(3, user)) return if(emagged || malfhack || (stat & BROKEN) || opened==2) new /obj/item/stack/sheet/metal(loc) @@ -609,7 +612,7 @@ to_chat(user, "You cannot repair this APC until you remove the electronics still inside.") return to_chat(user, "You begin to replace the damaged APC frame...") - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * W.toolspeed, target = src)) user.visible_message(\ "[user.name] has replaced the damaged APC frame with new one.",\ "You replace the damaged APC frame with new one.") @@ -718,16 +721,16 @@ beenhit += 1 return -/obj/machinery/power/apc/attack_ghost(user as mob) - if(stat & (BROKEN|MAINT)) - return +/obj/machinery/power/apc/attack_ghost(mob/user) + if(wiresexposed) + wires.Interact(user) return ui_interact(user) /obj/machinery/power/apc/interact(mob/user) if(!user) return - if(wiresexposed /*&& (!istype(user, /mob/living/silicon))*/) //Commented out the typecheck to allow engiborgs to repair damaged apcs. + if(wiresexposed) wires.Interact(user) return ui_interact(user) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index e46e0797b1e..8b941444e5d 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -480,21 +480,21 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( slot_flags = SLOT_BELT item_state = "coil" attack_verb = list("whipped", "lashed", "disciplined", "flogged") + usesound = 'sound/items/Deconstruct.ogg' + toolspeed = 1 /obj/item/stack/cable_coil/suicide_act(mob/user) if(locate(/obj/structure/stool) in user.loc) - user.visible_message("[user] is making a noose with the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is making a noose with the [name]! It looks like \he's trying to commit suicide.") else - user.visible_message("[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is strangling \himself with the [name]! It looks like \he's trying to commit suicide.") return(OXYLOSS) /obj/item/stack/cable_coil/New(loc, length = MAXCOIL, var/paramcolor = null) ..() - src.amount = length + amount = length if(paramcolor) color = paramcolor - else - color = color pixel_x = rand(-2,2) pixel_y = rand(-2,2) update_icon() @@ -543,7 +543,6 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( /obj/item/stack/cable_coil/update_icon() if(!color) color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) - color = color if(amount == 1) icon_state = "coil1" name = "cable piece" diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index a61aca5661c..ed3146d4be7 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -166,7 +166,7 @@ power_change() else connect() - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.") else if(ismultitool(W)) if(cold_dir == WEST) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index e3be67f7aca..5b015fcf58d 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -184,14 +184,14 @@ var/const/GRAV_NEEDS_WRENCH = 3 if(GRAV_NEEDS_SCREWDRIVER) if(istype(I, /obj/item/weapon/screwdriver)) to_chat(user, "You secure the screws of the framework.") - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) broken_state++ if(GRAV_NEEDS_WELDING) if(istype(I, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = I if(WT.remove_fuel(1, user)) to_chat(user, "You mend the damaged framework.") - playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) + playsound(src.loc, WT.usesound, 50, 1) broken_state++ if(GRAV_NEEDS_PLASTEEL) if(istype(I, /obj/item/stack/sheet/plasteel)) @@ -199,14 +199,14 @@ var/const/GRAV_NEEDS_WRENCH = 3 if(PS.amount >= 10) PS.use(10) to_chat(user, "You add the plating to the framework.") - playsound(src.loc, 'sound/machines/click.ogg', 75, 1) + playsound(src.loc, PS.usesound, 75, 1) broken_state++ else to_chat(user, "You need 10 sheets of plasteel.") if(GRAV_NEEDS_WRENCH) if(istype(I, /obj/item/weapon/wrench)) to_chat(user, "You secure the plating to the framework.") - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, I.usesound, 75, 1) set_fix() else ..() diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index e6b37b9cfc9..5544a5c027c 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -40,14 +40,14 @@ src.add_fingerprint(user) if(istype(W, /obj/item/weapon/wrench)) if(src.stage == 1) - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) to_chat(usr, "You begin deconstructing [src].") - if(!do_after(usr, 30, target = src)) + if(!do_after(usr, 30 * W.toolspeed, target = src)) return new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded ) user.visible_message("[user.name] deconstructs [src].", \ "You deconstruct [src].", "You hear a noise.") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) qdel(src) if(src.stage == 2) to_chat(usr, "You have to remove the wires first.") @@ -65,10 +65,10 @@ src.icon_state = "tube-construct-stage1" if("bulb") src.icon_state = "bulb-construct-stage1" - new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red") + new /obj/item/stack/cable_coil(get_turf(src.loc), 1, COLOR_RED) user.visible_message("[user.name] removes the wiring from [src].", \ "You remove the wiring from [src].", "You hear a noise.") - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) + playsound(loc, W.usesound, 100, 1) return if(istype(W, /obj/item/stack/cable_coil)) @@ -81,6 +81,7 @@ if("bulb") src.icon_state = "bulb-construct-stage2" src.stage = 2 + playsound(loc, coil.usesound, 50, 1) user.visible_message("[user.name] adds wires to [src].", \ "You add wires to [src].") return @@ -95,7 +96,7 @@ src.stage = 3 user.visible_message("[user.name] closes [src]'s casing.", \ "You close [src]'s casing.", "You hear a noise.") - playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) switch(fixture_type) @@ -348,7 +349,7 @@ // attempt to stick weapon into light socket else if(status == LIGHT_EMPTY) if(istype(W, /obj/item/weapon/screwdriver)) //If it's a screwdriver open it. - playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) user.visible_message("[user.name] opens [src]'s casing.", \ "You open [src]'s casing.", "You hear a noise.") var/obj/machinery/light_construct/newlight = null diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 0abb033e3e8..70be5b747c1 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -288,12 +288,12 @@ disconnect_from_network() to_chat(user, "You unsecure the generator from the floor.") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, O.usesound, 50, 1) anchored = !anchored else if(istype(O, /obj/item/weapon/screwdriver)) panel_open = !panel_open - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, O.usesound, 50, 1) if(panel_open) to_chat(user, "You open the access panel.") else diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index bab046450a3..278b4513d2f 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -317,12 +317,16 @@ //source is an object caused electrocuting (airlock, grille, etc) //No animations will be performed by this proc. /proc/electrocute_mob(mob/living/carbon/M as mob, var/power_source, var/obj/source, var/siemens_coeff = 1.0) - if(istype(M.loc,/obj/mecha)) return 0 //feckin mechs are dumb + if(!istype(M)) + return 0 + if(istype(M.loc,/obj/mecha)) + return 0 //feckin mechs are dumb if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(H.gloves) var/obj/item/clothing/gloves/G = H.gloves - if(G.siemens_coefficient == 0) return 0 //to avoid spamming with insulated glvoes on + if(G.siemens_coefficient == 0) + return 0 //to avoid spamming with insulated glvoes on var/area/source_area if(istype(power_source,/area)) diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 543112bfc59..11c83313737 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -74,7 +74,7 @@ var/global/list/rad_collectors = list() if(P) to_chat(user, "Remove the plasma tank first.") return 1 - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) src.anchored = !src.anchored user.visible_message("[user.name] [anchored? "secures":"unsecures"] the [src.name].", \ "You [anchored? "secure":"undo"] the external bolts.", \ diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index f44dbb30466..7ee9ea5edf1 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -236,14 +236,14 @@ switch(state) if(0) state = 1 - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) user.visible_message("[user.name] secures [src.name] to the floor.", \ "You secure the external reinforcing bolts to the floor.", \ "You hear a ratchet") src.anchored = 1 if(1) state = 0 - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc,W.usesound, 75, 1) user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \ "You undo the external reinforcing bolts.", \ "You hear a ratchet") @@ -262,11 +262,11 @@ to_chat(user, "The [src.name] needs to be wrenched to the floor.") if(1) if(WT.remove_fuel(0,user)) - playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) + playsound(src.loc, WT.usesound, 50, 1) user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \ "You start to weld the [src] to the floor.", \ "You hear welding") - if(do_after(user,20, target = src)) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return state = 2 to_chat(user, "You weld the [src] to the floor.") @@ -275,11 +275,11 @@ to_chat(user, "You need more welding fuel to complete this task.") if(2) if(WT.remove_fuel(0,user)) - playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) + playsound(src.loc, WT.usesound, 50, 1) user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \ "You start to cut the [src] free from the floor.", \ "You hear welding") - if(do_after(user,20, target = src)) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return state = 1 to_chat(user, "You cut the [src] free from the floor.") diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 89c3c8b61e1..aebee058c18 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -87,14 +87,14 @@ field_generator power level display if(FG_UNSECURED) if(isinspace()) return state = FG_SECURED - playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(loc, W.usesound, 75, 1) user.visible_message("[user.name] secures [name] to the floor.", \ "You secure the external reinforcing bolts to the floor.", \ "You hear ratchet.") anchored = 1 if(FG_SECURED) state = FG_UNSECURED - playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(loc, W.usesound, 75, 1) user.visible_message("[user.name] unsecures [name] reinforcing bolts from the floor.", \ "You undo the external reinforcing bolts.", \ "You hear ratchet.") @@ -110,11 +110,11 @@ field_generator power level display if(FG_SECURED) if(WT.remove_fuel(0,user)) - playsound(loc, 'sound/items/Welder2.ogg', 50, 1) + playsound(loc, WT.usesound, 50, 1) user.visible_message("[user.name] starts to weld the [name] to the floor.", \ "You start to weld \the [src] to the floor...", \ "You hear welding.") - if(do_after(user,20, target = src)) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return state = FG_WELDED @@ -122,11 +122,11 @@ field_generator power level display if(FG_WELDED) if(WT.remove_fuel(0,user)) - playsound(loc, 'sound/items/Welder2.ogg', 50, 1) + playsound(loc, WT.usesound, 50, 1) user.visible_message("[user.name] starts to cut the [name] free from the floor.", \ "You start to cut \the [src] free from the floor...", \ "You hear welding.") - if(do_after(user,20, target = src)) + if(do_after(user, 20 * WT.toolspeed, target = src)) if(!src || !WT.isOn()) return state = FG_SECURED diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 11ffbf5a3f6..276d3fe80b8 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -23,7 +23,7 @@ /obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/wrench)) anchored = !anchored - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, W.usesound, 75, 1) if(anchored) user.visible_message("[user.name] secures [src.name] to the floor.", \ "You secure the [src.name] to the floor.", \ diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 7fba50784b8..0ce1159743e 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -214,7 +214,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return 0 -/obj/structure/particle_accelerator/proc/process_tool_hit(var/obj/O, var/mob/user) +/obj/structure/particle_accelerator/proc/process_tool_hit(var/obj/item/O, var/mob/user) if(!(O) || !(user)) return 0 if(!ismob(user) || !isobj(O)) @@ -224,14 +224,14 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin switch(construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) if(iswrench(O) && !isinspace()) - playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(loc, O.usesound, 50, 1) anchored = 1 user.visible_message("[user.name] secures the [name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) if(iswrench(O)) - playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(loc, O.usesound, 50, 1) anchored = 0 user.visible_message("[user.name] detaches the [name] from the floor.", \ "You remove the external bolts.") @@ -239,6 +239,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin else if(iscoil(O)) var/obj/item/stack/cable_coil/C = O if(C.use(1)) + playsound(loc, O.usesound, 50, 1) user.visible_message("[user.name] adds wires to the [name].", \ "You add some wires.") temp_state++ @@ -247,15 +248,18 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return if(2) if(iswirecutter(O))//TODO:Shock user if its on? + playsound(loc, O.usesound, 50, 1) user.visible_message("[user.name] removes some wires from the [name].", \ "You remove some wires.") temp_state-- else if(isscrewdriver(O)) + playsound(loc, O.usesound, 50, 1) user.visible_message("[user.name] closes the [name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) if(isscrewdriver(O)) + playsound(loc, O.usesound, 50, 1) user.visible_message("[user.name] opens the [name]'s access panel.", \ "You open the access panel.") temp_state-- @@ -352,7 +356,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return 0 -/obj/machinery/particle_accelerator/proc/process_tool_hit(var/obj/O, var/mob/user) +/obj/machinery/particle_accelerator/proc/process_tool_hit(var/obj/item/O, var/mob/user) if(!(O) || !(user)) return 0 if(!ismob(user) || !isobj(O)) @@ -361,7 +365,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin switch(construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) if(iswrench(O)) - playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(loc, O.usesound, 50, 1) anchored = 1 user.visible_message("[user.name] secures the [name] to the floor.", \ "You secure the external bolts.") @@ -369,7 +373,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin power_change() if(1) if(iswrench(O)) - playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(loc, O.usesound, 50, 1) anchored = 0 user.visible_message("[user.name] detaches the [name] from the floor.", \ "You remove the external bolts.") @@ -377,20 +381,24 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin power_change() else if(iscoil(O)) if(O:use(1)) + playsound(loc, O.usesound, 50, 1) user.visible_message("[user.name] adds wires to the [name].", \ "You add some wires.") temp_state++ if(2) if(iswirecutter(O))//TODO:Shock user if its on? + playsound(loc, O.usesound, 50, 1) user.visible_message("[user.name] removes some wires from the [name].", \ "You remove some wires.") temp_state-- else if(isscrewdriver(O)) + playsound(loc, O.usesound, 50, 1) user.visible_message("[user.name] closes the [name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) if(isscrewdriver(O)) + playsound(loc, O.usesound, 50, 1) user.visible_message("[user.name] opens the [name]'s access panel.", \ "You open the access panel.") temp_state-- diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 08f0901f291..f73d306d15b 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -180,9 +180,9 @@ return to_chat(user, "You begin to dismantle the power terminal...") - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * I.toolspeed, target = src)) if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) //animate the electrocution if uncautious and unlucky var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread s.set_up(5, 1, src) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 5f137f4cb74..dea4c4797e8 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -60,12 +60,12 @@ if(istype(W, /obj/item/weapon/crowbar)) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar panel.", "You begin to take the glass off the solar panel...") - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * W.toolspeed, target = src)) var/obj/item/solar_assembly/S = locate() in src if(S) S.loc = src.loc S.give_glass() - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) user.visible_message("[user] takes the glass off the solar panel.", "You take the glass off the solar panel.") qdel(src) return @@ -227,20 +227,20 @@ if(istype(W, /obj/item/weapon/wrench)) anchored = 1 user.visible_message("[user] wrenches the solar assembly into place.", "You wrench the solar assembly into place.") - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, W.usesound, 50, 1) return 1 else if(istype(W, /obj/item/weapon/wrench)) anchored = 0 user.visible_message("[user] unwrenches the solar assembly from its place.", "You unwrench the solar assembly from its place.") - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, W.usesound, 50, 1) return 1 if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass)) var/obj/item/stack/sheet/S = W if(S.use(2)) glass_type = W.type - playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + playsound(loc, S.usesound, 50, 1) user.visible_message("[user] places the glass on the solar assembly.", "You place the glass on the solar assembly.") if(tracker) new /obj/machinery/power/tracker(get_turf(src), src) @@ -263,6 +263,7 @@ if(istype(W, /obj/item/weapon/crowbar)) new /obj/item/weapon/tracker_electronics(src.loc) tracker = 0 + playsound(loc, W.usesound, 50, 1) user.visible_message("[user] takes out the electronics from the solar assembly.", "You take out the electronics from the solar assembly.") return 1 ..() @@ -411,10 +412,10 @@ return data -/obj/machinery/power/solar_control/attackby(I as obj, user as mob, params) +/obj/machinery/power/solar_control/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(src.loc, I.usesound, 50, 1) + if(do_after(user, 20 * I.toolspeed, target = src)) if(src.stat & BROKEN) to_chat(user, "The broken glass falls out.") var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index 63653eab9d1..7b4b7a0d02e 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -63,12 +63,12 @@ if(istype(W, /obj/item/weapon/crowbar)) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar tracker.") - if(do_after(user, 50, target = src)) + if(do_after(user, 50 * W.toolspeed, target = src)) var/obj/item/solar_assembly/S = locate() in src if(S) S.loc = src.loc S.give_glass() - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, W.usesound, 50, 1) user.visible_message("[user] takes the glass off the tracker.") qdel(src) // qdel return diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 9a4445d111d..fb811c19d78 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -34,7 +34,7 @@ if(istype(A, /obj/item/weapon/crowbar)) if(modkits.len) to_chat(user, "You pry the modifications out.") - playsound(loc, 'sound/items/Crowbar.ogg', 100, 1) + playsound(loc, A.usesound, 100, 1) for(var/obj/item/borg/upgrade/modkit/M in modkits) M.uninstall(src) else @@ -230,6 +230,7 @@ origin_tech = "programming=2;materials=2;magnets=4" require_module = 1 module_type = /obj/item/weapon/robot_module/miner + usesound = 'sound/items/Screwdriver.ogg' var/denied_type = null var/maximum_of_type = 1 var/cost = 30 @@ -266,7 +267,7 @@ if(KA.get_remaining_mod_capacity() >= cost) if(.) to_chat(user, "You install the modkit.") - playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) + playsound(loc, usesound, 100, 1) user.unEquip(src) forceMove(KA) KA.modkits += src diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 12eb34e8c54..3131e49c4f2 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -139,6 +139,8 @@ origin_tech = "combat=1;materials=3;magnets=2;plasmatech=2;engineering=1" ammo_type = list(/obj/item/ammo_casing/energy/plasma) fire_sound = 'sound/weapons/laser.ogg' + usesound = 'sound/items/Welder.ogg' + toolspeed = 1 flags = CONDUCT | OPENCONTAINER attack_verb = list("attacked", "slashed", "cut", "sliced") force = 12 diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 884b97c8ffb..80192a3091d 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -121,7 +121,7 @@ afterattack(user, user) //you know the drill user.visible_message("[src] goes off!", "[src] goes off in your face!") return - if(do_after(user, 30, target = src)) + if(do_after(user, 30 * A.toolspeed, target = src)) if(magazine.ammo_count()) to_chat(user, "You can't modify it!") return @@ -134,7 +134,7 @@ afterattack(user, user) //and again user.visible_message("[src] goes off!", "[src] goes off in your face!") return - if(do_after(user, 30, target = src)) + if(do_after(user, 30 * A.toolspeed, target = src)) if(magazine.ammo_count()) to_chat(user, "You can't modify it!") return diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 9a3ecffedb6..3904e923886 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -358,7 +358,7 @@ return if(istype(I, /obj/item/weapon/wrench)) - playsound(src, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src, I.usesound, 50, 1) if(anchored) anchored = 0 to_chat(user, "[src] can now be moved.") diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 2430ed122dd..1127271c17e 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -129,12 +129,13 @@ var/obj/item/conveyor_construct/C = new/obj/item/conveyor_construct(src.loc) C.id = id transfer_fingerprints_to(C) + playsound(loc, I.usesound, 50, 1) to_chat(usr,"You remove the conveyor belt.") qdel(src) else if(istype(I, /obj/item/weapon/wrench)) if(!(stat & BROKEN)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + playsound(loc, I.usesound, 50, 1) dir = turn(dir,-45) update_move_direction() to_chat(user, "You rotate [src].") diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 4e720f39c00..fd915caa4a8 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -212,16 +212,16 @@ else density = 1 // We don't want disposal bins or outlets to go density 0 to_chat(user, "You attach the [nicetype] to the underfloor.") - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + playsound(src.loc, I.usesound, 100, 1) update() else if(istype(I, /obj/item/weapon/weldingtool)) if(anchored) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) - playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) + playsound(src.loc, W.usesound, 100, 1) to_chat(user, "Welding the [nicetype] in place.") - if(do_after(user, 20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) if(!src || !W.isOn()) return to_chat(user, "The [nicetype] has been welded in place!") update() // TODO: Make this neat diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index c8da1c296e4..86acd1d66f2 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -74,12 +74,12 @@ return if(mode==0) // It's off but still not unscrewed mode=-1 // Set it to doubleoff l0l - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) to_chat(user, "You remove the screws around the power connection.") return else if(mode==-1) mode=0 - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) to_chat(user, "You attach the screws around the power connection.") return else if(istype(I,/obj/item/weapon/weldingtool) && mode==-1) @@ -88,10 +88,10 @@ return var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) - playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) + playsound(src.loc, W.usesound, 100, 1) to_chat(user, "You start slicing the floorweld off the disposal unit.") - if(do_after(user,20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) if(!src || !W.isOn()) return to_chat(user, "You sliced the floorweld off the disposal unit.") var/obj/structure/disposalconstruct/C = new (src.loc) @@ -882,8 +882,8 @@ var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0, user)) to_chat(user, "You begin slicing \the [src].") - playsound(loc, 'sound/items/Welder2.ogg', 100, 1) - if(do_after(user, 30, target = src)) + playsound(loc, W.usesound, 100, 1) + if(do_after(user, 30 * W.toolspeed, target = src)) to_chat(user, "You finish slicing \the [src].") welded() else @@ -1190,19 +1190,14 @@ var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) - playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) - // check if anything changed over 2 seconds - var/turf/uloc = user.loc - var/atom/wloc = W.loc - to_chat(user, "Slicing the disposal pipe.") - sleep(30) - if(!W.isOn()) return - if(user.loc == uloc && wloc == W.loc) + playsound(loc, W.usesound, 100, 1) + to_chat(user, "Slicing the disposal pipe.") + if(do_after(user, 30 * W.toolspeed, target = src)) + if(!W.isOn()) + return welded() - else - to_chat(user, "You must stay still while welding the pipe.") else - to_chat(user, "You need more welding fuel to cut the pipe.") + to_chat(user, "You need more welding fuel to cut the pipe.") return // would transfer to next pipe segment, but we are in a trunk @@ -1308,20 +1303,20 @@ if(istype(I, /obj/item/weapon/screwdriver)) if(mode==0) mode=1 - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) to_chat(user, "You remove the screws around the power connection.") return else if(mode==1) mode=0 - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) to_chat(user, "You attach the screws around the power connection.") return else if(istype(I,/obj/item/weapon/weldingtool) && mode==1) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) - playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) + playsound(src.loc, W.usesound, 100, 1) to_chat(user, "You start slicing the floorweld off the disposal outlet.") - if(do_after(user,20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) if(!src || !W.isOn()) return to_chat(user, "You sliced the floorweld off the disposal outlet.") var/obj/structure/disposalconstruct/C = new (src.loc) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index a0e9d59a803..104036d5c0a 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -331,20 +331,20 @@ if(istype(I, /obj/item/weapon/screwdriver)) if(c_mode==0) c_mode=1 - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) to_chat(user, "You remove the screws around the power connection.") return else if(c_mode==1) c_mode=0 - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, I.usesound, 50, 1) to_chat(user, "You attach the screws around the power connection.") return else if(istype(I,/obj/item/weapon/weldingtool) && c_mode==1) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) - playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) + playsound(src.loc, W.usesound, 100, 1) to_chat(user, "You start slicing the floorweld off the delivery chute.") - if(do_after(user,20, target = src)) + if(do_after(user, 20 * W.toolspeed, target = src)) if(!src || !W.isOn()) return to_chat(user, "You sliced the floorweld off the delivery chute.") var/obj/structure/disposalconstruct/C = new (src.loc) diff --git a/code/modules/research/designs/equipment_designs.dm b/code/modules/research/designs/equipment_designs.dm index 0f23b2a6532..e63211dc35b 100644 --- a/code/modules/research/designs/equipment_designs.dm +++ b/code/modules/research/designs/equipment_designs.dm @@ -189,4 +189,84 @@ build_type = PROTOLATHE materials = list("$metal" = 200, "$glass" = 200, "$uranium" = 1000, "$plasma" = 200) build_path = /obj/item/clothing/glasses/hud/hydroponic/night + category = list("Equipment") + +/datum/design/handdrill + name = "Hand Drill" + desc = "A small electric hand drill with an interchangable screwdriver and bolt bit" + id = "handdrill" + req_tech = list("materials" = 4, "engineering" = 6) + build_type = PROTOLATHE + materials = list(MAT_METAL = 3500, MAT_SILVER = 1500, MAT_GOLD = 1000) + build_path = /obj/item/weapon/screwdriver/power + category = list("Equipment") + +/datum/design/jawsoflife + name = "Jaws of Life" + desc = "A small, compact Jaws of Life with an interchangable pry jaws and cutting jaws" + id = "jawsoflife" + req_tech = list("materials" = 4, "engineering" = 6, "magnets" = 6) // added one more requirment since the Jaws of Life are a bit OP + build_path = /obj/item/weapon/crowbar/power + build_type = PROTOLATHE + materials = list(MAT_METAL = 4500, MAT_SILVER = 2500, MAT_DIAMOND = 1000) + category = list("Equipment") + +/datum/design/alienwrench + name = "Alien Wrench" + desc = "An advanced wrench obtained through Abductor technology." + id = "alien_wrench" + req_tech = list("engineering" = 5, "materials" = 5, "abductor" = 4) + build_path = /obj/item/weapon/wrench/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_DIAMOND = 2000) + category = list("Equipment") + +/datum/design/alienwirecutters + name = "Alien Wirecutters" + desc = "Advanced wirecutters obtained through Abductor technology." + id = "alien_wirecutters" + req_tech = list("engineering" = 5, "materials" = 5, "abductor" = 4) + build_path = /obj/item/weapon/wirecutters/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_DIAMOND = 2000) + category = list("Equipment") + +/datum/design/alienscrewdriver + name = "Alien Screwdriver" + desc = "An advanced screwdriver obtained through Abductor technology." + id = "alien_screwdriver" + req_tech = list("engineering" = 5, "materials" = 5, "abductor" = 4) + build_path = /obj/item/weapon/screwdriver/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_DIAMOND = 2000) + category = list("Equipment") + +/datum/design/aliencrowbar + name = "Alien Crowbar" + desc = "An advanced crowbar obtained through Abductor technology." + id = "alien_crowbar" + req_tech = list("engineering" = 5, "materials" = 5, "abductor" = 4) + build_path = /obj/item/weapon/crowbar/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 1000, MAT_DIAMOND = 2000) + category = list("Equipment") + +/datum/design/alienwelder + name = "Alien Welding Tool" + desc = "An advanced welding tool obtained through Abductor technology." + id = "alien_welder" + req_tech = list("engineering" = 5, "plasmatech" = 5, "abductor" = 4) + build_path = /obj/item/weapon/weldingtool/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_DIAMOND = 2000) + category = list("Equipment") + +/datum/design/alienmultitool + name = "Alien Multitool" + desc = "An advanced multitool obtained through Abductor technology." + id = "alien_multitool" + req_tech = list("engineering" = 5, "programming" = 5, "abductor" = 4) + build_path = /obj/item/device/multitool/abductor + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_SILVER = 2500, MAT_PLASMA = 5000, MAT_DIAMOND = 2000) category = list("Equipment") \ No newline at end of file diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 7bcc42e4979..4163b36f573 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -198,6 +198,65 @@ build_path = /obj/item/weapon/scalpel/manager category = list("Medical") +/datum/design/alienscalpel + name = "Alien Scalpel" + desc = "An advanced scalpel obtained through Abductor technology." + id = "alien_scalpel" + req_tech = list("biotech" = 4, "materials" = 4, "abductor" = 3) + build_path = /obj/item/weapon/scalpel/alien + build_type = PROTOLATHE + materials = list(MAT_METAL = 2000, MAT_SILVER = 1500, MAT_GOLD = 500, MAT_PLASMA = 500) + category = list("Medical") + +/datum/design/alienhemostat + name = "Alien Hemostat" + desc = "An advanced hemostat obtained through Abductor technology." + id = "alien_hemostat" + req_tech = list("biotech" = 4, "materials" = 4, "abductor" = 3) + build_path = /obj/item/weapon/hemostat/alien + build_type = PROTOLATHE + materials = list(MAT_METAL = 2000, MAT_SILVER = 1500, MAT_GOLD = 500, MAT_PLASMA = 500) + category = list("Medical") + +/datum/design/alienretractor + name = "Alien Retractor" + desc = "An advanced retractor obtained through Abductor technology." + id = "alien_retractor" + req_tech = list("biotech" = 4, "materials" = 4, "abductor" = 3) + build_path = /obj/item/weapon/retractor/alien + build_type = PROTOLATHE + materials = list(MAT_METAL = 2000, MAT_SILVER = 1500, MAT_GOLD = 500, MAT_PLASMA = 500) + category = list("Medical") + +/datum/design/aliensaw + name = "Alien Circular Saw" + desc = "An advanced surgical saw obtained through Abductor technology." + id = "alien_saw" + req_tech = list("biotech" = 4, "materials" = 4, "abductor" = 3) + build_path = /obj/item/weapon/circular_saw/alien + build_type = PROTOLATHE + materials = list(MAT_METAL = 10000, MAT_SILVER = 2500, MAT_GOLD = 1000, MAT_PLASMA = 1000) + category = list("Medical") + +/datum/design/aliendrill + name = "Alien Drill" + desc = "An advanced drill obtained through Abductor technology." + id = "alien_drill" + req_tech = list("biotech" = 4, "materials" = 4, "abductor" = 3) + build_path = /obj/item/weapon/surgicaldrill/alien + build_type = PROTOLATHE + materials = list(MAT_METAL = 10000, MAT_SILVER = 2500, MAT_GOLD = 1000, MAT_PLASMA = 1000) + category = list("Medical") + +/datum/design/aliencautery + name = "Alien Cautery" + desc = "An advanced cautery obtained through Abductor technology." + id = "alien_cautery" + req_tech = list("biotech" = 4, "materials" = 4, "abductor" = 3) + build_path = /obj/item/weapon/cautery/alien + build_type = PROTOLATHE + materials = list(MAT_METAL = 2000, MAT_SILVER = 1500, MAT_GOLD = 500, MAT_PLASMA = 500) + category = list("Medical") ///////////////////////////////////////// //////////Cybernetic Implants//////////// diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index d7ca9ef883d..8386c79377d 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -220,7 +220,7 @@ datum/tech/engineering name = "Engineering Research" desc = "Development of new and improved engineering parts and methods." id = "engineering" - max_level = 5 + max_level = 6 datum/tech/plasmatech name = "Plasma Research" diff --git a/code/modules/research/xenoarchaeology/artifact/artifact.dm b/code/modules/research/xenoarchaeology/artifact/artifact.dm index 3cb23ffd965..366ce13107b 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact.dm @@ -80,7 +80,7 @@ if(istype(W, /obj/item/device/measuring_tape)) var/obj/item/device/measuring_tape/P = W user.visible_message("[user] extends [P] towards [src].","You extend [P] towards [src].") - if(do_after(user,40, target = src)) + if(do_after(user, 40, target = src)) to_chat(user, "[bicon(P)] [src] has been excavated to a depth of [2*src.excavation_level]cm.") return @@ -89,7 +89,7 @@ to_chat(user, "You start [P.drill_verb] [src].") - if(!do_after(user,P.digspeed, target = src)) + if(!do_after(user, P.digspeed, target = src)) return to_chat(user, "You finish [P.drill_verb] [src].") diff --git a/code/modules/research/xenoarchaeology/tools/gearbelt.dm b/code/modules/research/xenoarchaeology/tools/gearbelt.dm index e2d4839d2b4..8912e9248c8 100644 --- a/code/modules/research/xenoarchaeology/tools/gearbelt.dm +++ b/code/modules/research/xenoarchaeology/tools/gearbelt.dm @@ -5,24 +5,24 @@ icon_state = "gearbelt" item_state = "utility" can_hold = list( - "/obj/item/weapon/storage/box/samplebags", - "/obj/item/device/core_sampler", - "/obj/item/device/beacon_locator", - "/obj/item/device/radio/beacon", - "/obj/item/device/gps", - "/obj/item/device/measuring_tape", - "/obj/item/device/flashlight", - "/obj/item/weapon/pickaxe", - "/obj/item/device/depth_scanner", - "/obj/item/device/camera", - "/obj/item/weapon/paper", - "/obj/item/weapon/photo", - "/obj/item/weapon/folder", - "/obj/item/weapon/pen", - "/obj/item/weapon/folder", - "/obj/item/weapon/clipboard", - "/obj/item/weapon/anodevice", - "/obj/item/clothing/glasses", - "/obj/item/weapon/wrench", - "/obj/item/weapon/storage/box/excavation", - "/obj/item/weapon/anobattery") + /obj/item/weapon/storage/box/samplebags, + /obj/item/device/core_sampler, + /obj/item/device/beacon_locator, + /obj/item/device/radio/beacon, + /obj/item/device/gps, + /obj/item/device/measuring_tape, + /obj/item/device/flashlight, + /obj/item/weapon/pickaxe, + /obj/item/device/depth_scanner, + /obj/item/device/camera, + /obj/item/weapon/paper, + /obj/item/weapon/photo, + /obj/item/weapon/folder, + /obj/item/weapon/pen, + /obj/item/weapon/folder, + /obj/item/weapon/clipboard, + /obj/item/weapon/anodevice, + /obj/item/clothing/glasses, + /obj/item/weapon/wrench, + /obj/item/weapon/storage/box/excavation, + /obj/item/weapon/anobattery) diff --git a/code/modules/research/xenoarchaeology/tools/tools.dm b/code/modules/research/xenoarchaeology/tools/tools.dm index 39dc6738f4f..6ac7aee6a2b 100644 --- a/code/modules/research/xenoarchaeology/tools/tools.dm +++ b/code/modules/research/xenoarchaeology/tools/tools.dm @@ -21,4 +21,4 @@ storage_slots = 50 max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class max_w_class = 3 - can_hold = list("/obj/item/weapon/fossil") + can_hold = list(/obj/item/weapon/fossil) diff --git a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm b/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm index 1dd6b769390..4e6e48b49b5 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm @@ -126,13 +126,13 @@ foldable = /obj/item/stack/sheet/cardboard //BubbleWrap storage_slots = 7 w_class = 2 - can_hold = list("/obj/item/weapon/pickaxe/brush",\ - "/obj/item/weapon/pickaxe/one_pick",\ - "/obj/item/weapon/pickaxe/two_pick",\ - "/obj/item/weapon/pickaxe/three_pick",\ - "/obj/item/weapon/pickaxe/four_pick",\ - "/obj/item/weapon/pickaxe/five_pick",\ - "/obj/item/weapon/pickaxe/six_pick") + can_hold = list(/obj/item/weapon/pickaxe/brush,\ + /obj/item/weapon/pickaxe/one_pick,\ + /obj/item/weapon/pickaxe/two_pick,\ + /obj/item/weapon/pickaxe/three_pick,\ + /obj/item/weapon/pickaxe/four_pick,\ + /obj/item/weapon/pickaxe/five_pick,\ + /obj/item/weapon/pickaxe/six_pick) max_combined_w_class = 17 max_w_class = 4 use_to_pickup = 1 // for picking up broken bulbs, not that most people will try diff --git a/code/modules/spacepods/parts.dm b/code/modules/spacepods/parts.dm index d1aefb535e6..757d7a95dcc 100644 --- a/code/modules/spacepods/parts.dm +++ b/code/modules/spacepods/parts.dm @@ -55,7 +55,7 @@ return 0 return connectedparts -/obj/item/pod_parts/pod_frame/attackby(var/obj/O, mob/user) +/obj/item/pod_parts/pod_frame/attackby(var/obj/item/O, mob/user) if(istype(O, /obj/item/stack/rods)) var/obj/item/stack/rods/R = O var/list/linkedparts = find_square() @@ -71,12 +71,12 @@ //log_admin("Repositioning") pod.loc = F.loc qdel(F) - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) + playsound(get_turf(src), O.usesound, 50, 1) if(istype(O, /obj/item/weapon/wrench)) to_chat(user, "You [!anchored ? "secure \the [src] in place." : "remove the securing bolts."]") anchored = !anchored density = anchored - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) + playsound(get_turf(src), O.usesound, 50, 1) /obj/item/pod_parts/pod_frame/verb/rotate() set name = "Rotate Frame" diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index 62609932fe0..0f7373c2d19 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -311,7 +311,7 @@ if(iscrowbar(W)) if(!equipment_system.lock_system || unlocked || hatch_open) hatch_open = !hatch_open - playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(loc, W.usesound, 50, 1) to_chat(user, "You [hatch_open ? "open" : "close"] the maintenance hatch.") else to_chat(user, "The hatch is locked shut!") @@ -369,8 +369,8 @@ return if(health < initial(health)) to_chat(user, "You start welding the spacepod...") - playsound(loc, 'sound/items/Welder.ogg', 50, 1) - if(do_after(user, 20, target = src)) + playsound(loc, W.usesound, 50, 1) + if(do_after(user, 20 * W.toolspeed, target = src)) if(!src || !WT.remove_fuel(3, user)) return repair_damage(10) to_chat(user, "You mend some [pick("dents","bumps","damage")] with \the [WT]") @@ -383,7 +383,7 @@ if(L.on && equipment_system.lock_system) user.visible_message(user, "[user] is drilling through the [src]'s lock!", "You start drilling through the [src]'s lock!") - if(do_after(user, 100, target = src)) + if(do_after(user, 100 * W.toolspeed, target = src)) qdel(equipment_system.lock_system) equipment_system.lock_system = null user.visible_message(user, "[user] has destroyed the [src]'s lock!", diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 89a58d7cc9e..a2f3a047dae 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -312,7 +312,7 @@ ui.open() ui.set_auto_update(1) -/obj/machinery/computer/bsa_control/ui_data(mob/user, ui_key = "main", datum/topic_state/state = physical_state) +/obj/machinery/computer/bsa_control/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state) var/list/data = list() data["connected"] = cannon data["notice"] = notice diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 26d00e6360d..03f119d62c4 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -211,7 +211,7 @@ var/list/non_simple_animals = typecacheof(list(/mob/living/carbon/human/monkey,/ L += pick_n_take(possible_powers) power_lottery[user] = L -/obj/machinery/dna_vault/ui_data(mob/user, ui_key = "main", datum/topic_state/state = physical_state) //TODO Make it % bars maybe +/obj/machinery/dna_vault/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state) //TODO Make it % bars maybe var/list/data = list() data["plants"] = plants.len data["plants_max"] = plants_max diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 36f8c868cf6..8a7484626be 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -71,7 +71,7 @@ if(S.id == id && atoms_share_level(src, S)) S.toggle() -/obj/machinery/computer/sat_control/ui_data(mob/user, ui_key = "main", datum/topic_state/state = physical_state) +/obj/machinery/computer/sat_control/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state) var/list/data = list() data["satellites"] = list() diff --git a/code/modules/surgery/organs/autoimplanter.dm b/code/modules/surgery/organs/autoimplanter.dm index 5c2aa1193d9..4af88abc52f 100644 --- a/code/modules/surgery/organs/autoimplanter.dm +++ b/code/modules/surgery/organs/autoimplanter.dm @@ -4,6 +4,7 @@ icon_state = "autoimplanter" item_state = "walkietalkie"//left as this so as to intentionally not have inhands w_class = 2 + usesound = 'sound/weapons/circsawhit.ogg' var/obj/item/organ/internal/cyberimp/storedorgan /obj/item/device/autoimplanter/attack_self(mob/user)//when the object it used... @@ -12,7 +13,7 @@ return storedorgan.insert(user)//insert stored organ into the user user.visible_message("[user] presses a button on [src], and you hear a short mechanical noise.", "You feel a sharp sting as [src] plunges into your body.") - playsound(get_turf(user), 'sound/weapons/circsawhit.ogg', 50, 1) + playsound(get_turf(user), usesound, 50, 1) storedorgan = null /obj/item/device/autoimplanter/attackby(obj/item/I, mob/user, params) @@ -32,4 +33,4 @@ storedorgan.forceMove(get_turf(user)) storedorgan = null to_chat(user, "You remove the [storedorgan] from [src].") - playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1) + playsound(get_turf(user), I.usesound, 50, 1) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index defa57b3ca4..9ed77cd2c9f 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -109,13 +109,8 @@ if(implement_type) //this means it isn't a require nd or any item step. prob_chance = min(allowed_tools[implement_type], 100) prob_chance *= get_location_modifier(target) - - if(prob_chance > 100)//if we are using a super tool - time = time/prob_chance //PLACEHOLDER VALUES - if(do_after(user, time, target = target)) - - + if(do_after(user, time * tool.toolspeed, target = target)) if(prob(prob_chance) || isrobot(user)) if(end_step(user, target, target_zone, tool, surgery)) advance = 1 diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 2e47438eb44..27ed3895a2c 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -89,6 +89,7 @@ item_state = "scalpel" damtype = "fire" hitsound = 'sound/weapons/sear.ogg' + toolspeed = 0.8 /obj/item/weapon/scalpel/laser2 name = "laser scalpel" @@ -97,6 +98,7 @@ item_state = "scalpel" damtype = "fire" hitsound = 'sound/weapons/sear.ogg' + toolspeed = 0.6 /obj/item/weapon/scalpel/laser3 name = "laser scalpel" @@ -105,6 +107,7 @@ item_state = "scalpel" damtype = "fire" hitsound = 'sound/weapons/sear.ogg' + toolspeed = 0.4 /obj/item/weapon/scalpel/manager //super tool! Retractor/hemostat name = "incision management system" @@ -113,6 +116,7 @@ item_state = "scalpel" damtype = "fire" hitsound = 'sound/weapons/sear.ogg' + toolspeed = 0.2 /obj/item/weapon/circular_saw name = "circular saw" diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm index a2ee8cc85ca..113d2abd751 100644 --- a/code/modules/telesci/bscrystal.dm +++ b/code/modules/telesci/bscrystal.dm @@ -9,6 +9,8 @@ points = 50 var/blink_range = 8 // The teleport range when crushed/thrown at someone. refined_type = /obj/item/stack/sheet/bluespace_crystal + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/item/weapon/ore/bluespace_crystal/New() ..() @@ -58,6 +60,8 @@ var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/st desc = "A stable polycrystal, made of fused-together bluespace crystals. You could probably break one off." origin_tech = "bluespace=4;materials=3" attack_verb = list("bluespace polybashed", "bluespace polybattered", "bluespace polybludgeoned", "bluespace polythrashed", "bluespace polysmashed") + toolspeed = 1 + usesound = 'sound/items/Deconstruct.ogg' /obj/item/stack/sheet/bluespace_crystal/New() ..() diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 0f1f7c8f582..ed330821f06 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -67,7 +67,7 @@ var/stage = 0 /obj/machinery/telepad_cargo/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(istype(W, /obj/item/weapon/wrench)) - playsound(src, 'sound/items/Ratchet.ogg', 50, 1) + playsound(src, W.usesound, 50, 1) if(anchored) anchored = 0 to_chat(user, " The [src] can now be moved.") @@ -76,15 +76,15 @@ to_chat(user, " The [src] is now secured.") if(istype(W, /obj/item/weapon/screwdriver)) if(stage == 0) - playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src, W.usesound, 50, 1) to_chat(user, " You unscrew the telepad's tracking beacon.") stage = 1 else if(stage == 1) - playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src, W.usesound, 50, 1) to_chat(user, " You screw in the telepad's tracking beacon.") stage = 0 if(istype(W, /obj/item/weapon/weldingtool) && stage == 1) - playsound(src, 'sound/items/Welder.ogg', 50, 1) + playsound(src, W.usesound, 50, 1) to_chat(user, " You disassemble the telepad.") new /obj/item/stack/sheet/metal(get_turf(src)) new /obj/item/stack/sheet/glass(get_turf(src)) @@ -119,6 +119,8 @@ throwforce = 10.0 throw_speed = 2 throw_range = 5 + toolspeed = 1 + usesound = 'sound/machines/click.ogg' var/obj/item/weapon/stock_parts/cell/high/rcell = null var/obj/machinery/pad = null var/mode = 0 diff --git a/html/changelog.html b/html/changelog.html index b2c3b33045b..d13d886de36 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,12 +55,30 @@ -->
+

09 March 2017

+

Markolie updated:

+
    +
  • Tools now have a "usesound" and "toolspeed" variable which allows different tool (levels) to have different sounds and speeds.
  • +
  • Robots spawn with tools that are twice as fast as regular tools.
  • +
  • Abductor agents now spawn with a toolbelt with specialized abductor tools that are very fast.
  • +
  • Abductor surgery tools are now much faster.
  • +
  • Abductor (surgery) tools can now be constructed in R&D with a sufficiently high "abductor" research level.
  • +
  • The abductor multitool will now display what each wire does.
  • +
  • Admin ghosts can now interact with wires and see what each wire does.
  • +
  • Adds a set of unique tools for the Chief Engineer that he is given in a unique toolbelt at roundstart. These tools are faster and can be created in R&D with a sufficiently high R&D level.
  • +
  • The AI detector has been refactored to have much more robust AI tracking.
  • +
+

08 March 2017

Alffd updated:

  • Farting on a bible now puts you at the mercy of the gods.
  • Removed automatic biblefarting gibbing.
+

FlaaaaaattestGuitar updated:

+
    +
  • Magistrate now starts their shift with a pair of white gloves as well as Bridge and Meeting Room access.
  • +

Fox McCloud updated:

  • money is now far easier to use, and distribute in amounts you would like
  • diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 4347295478e..92654fb69a1 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -3990,6 +3990,9 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. Alffd: - rscadd: Farting on a bible now puts you at the mercy of the gods. - rscdel: Removed automatic biblefarting gibbing. + FlaaaaaattestGuitar: + - tweak: Magistrate now starts their shift with a pair of white gloves as well as + Bridge and Meeting Room access. Fox McCloud: - tweak: money is now far easier to use, and distribute in amounts you would like Kyep: @@ -4000,3 +4003,19 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. Xenos) are less likely.' uraniummeltdown: - rscadd: Wizard Hardsuit helmet and suit now have inhand sprites +2017-03-09: + Markolie: + - tweak: Tools now have a "usesound" and "toolspeed" variable which allows different + tool (levels) to have different sounds and speeds. + - tweak: Robots spawn with tools that are twice as fast as regular tools. + - rscadd: Abductor agents now spawn with a toolbelt with specialized abductor tools + that are very fast. + - tweak: Abductor surgery tools are now much faster. + - rscadd: Abductor (surgery) tools can now be constructed in R&D with a sufficiently + high "abductor" research level. + - tweak: The abductor multitool will now display what each wire does. + - rscadd: Admin ghosts can now interact with wires and see what each wire does. + - rscadd: Adds a set of unique tools for the Chief Engineer that he is given in + a unique toolbelt at roundstart. These tools are faster and can be created in + R&D with a sufficiently high R&D level. + - tweak: The AI detector has been refactored to have much more robust AI tracking. diff --git a/icons/mob/belt.dmi b/icons/mob/belt.dmi index b6089236f2a..93630adce9a 100644 Binary files a/icons/mob/belt.dmi and b/icons/mob/belt.dmi differ diff --git a/icons/obj/abductor.dmi b/icons/obj/abductor.dmi index 9a171b97645..7bcd0607116 100644 Binary files a/icons/obj/abductor.dmi and b/icons/obj/abductor.dmi differ diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi index ae8fa296794..cfcfec6e283 100644 Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 6e749fc11ec..afa4f586504 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 6c3fdcf2bee..d021f5d02b1 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi index 332afbbdb71..d1aca5822c3 100644 Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ diff --git a/nano/templates/wires.tmpl b/nano/templates/wires.tmpl index cce49b84f95..a661fa3e851 100644 --- a/nano/templates/wires.tmpl +++ b/nano/templates/wires.tmpl @@ -2,7 +2,7 @@ {{for data.wires}} -
    {{:value.colour}} + {{:value.colour}} {{if value.index}}({{:value.index}}){{/if}} {{:helper.link(value.cut ? 'Mend' : 'Cut', null, {'action' : 'cut', 'wire' : value.colour})}} {{:helper.link('Pulse', null, {'action' : 'pulse', 'wire' : value.colour})}} diff --git a/sound/effects/pray.ogg b/sound/effects/pray.ogg new file mode 100644 index 00000000000..beadd3916f1 Binary files /dev/null and b/sound/effects/pray.ogg differ diff --git a/sound/items/WelderActivate.ogg b/sound/items/WelderActivate.ogg new file mode 100644 index 00000000000..5218f2ab1cf Binary files /dev/null and b/sound/items/WelderActivate.ogg differ diff --git a/sound/items/WelderDeactivate.ogg b/sound/items/WelderDeactivate.ogg new file mode 100644 index 00000000000..22ac4f445cb Binary files /dev/null and b/sound/items/WelderDeactivate.ogg differ diff --git a/sound/items/change_drill.ogg b/sound/items/change_drill.ogg new file mode 100644 index 00000000000..406027a5955 Binary files /dev/null and b/sound/items/change_drill.ogg differ diff --git a/sound/items/change_jaws.ogg b/sound/items/change_jaws.ogg new file mode 100644 index 00000000000..b6a41eca806 Binary files /dev/null and b/sound/items/change_jaws.ogg differ diff --git a/sound/items/drill_hit.ogg b/sound/items/drill_hit.ogg new file mode 100644 index 00000000000..0f8fa631aa1 Binary files /dev/null and b/sound/items/drill_hit.ogg differ diff --git a/sound/items/drill_use.ogg b/sound/items/drill_use.ogg new file mode 100644 index 00000000000..82f37cd35bb Binary files /dev/null and b/sound/items/drill_use.ogg differ diff --git a/sound/items/jaws_cut.ogg b/sound/items/jaws_cut.ogg new file mode 100644 index 00000000000..a0bfd855029 Binary files /dev/null and b/sound/items/jaws_cut.ogg differ diff --git a/sound/items/jaws_pry.ogg b/sound/items/jaws_pry.ogg new file mode 100644 index 00000000000..05178bd4663 Binary files /dev/null and b/sound/items/jaws_pry.ogg differ