Converts most istype(thing,tool) procs into an appropriate thing.is_tool() format

This commit is contained in:
Anewbe
2018-08-02 21:45:15 -05:00
parent 8b6377016f
commit 729ce71aa0
294 changed files with 20414 additions and 3197 deletions

View File

@@ -9,7 +9,7 @@
/obj/item/frame/apc/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
if (W.is_wrench())
new /obj/item/stack/material/steel( get_turf(src.loc), 2 )
qdel(src)

View File

@@ -42,7 +42,7 @@
storage_capacity = (MOB_MEDIUM * 2) - 1
var/contains_body = 0
/obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob)
/obj/structure/closet/body_bag/attackby(var/obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if (user.get_active_hand() != W)
@@ -58,7 +58,7 @@
src.name = "body bag"
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
return
else if(istype(W, /obj/item/weapon/wirecutters))
else if(W.is_wirecutter())
to_chat(user, "You cut the tag off the bodybag")
src.name = "body bag"
src.overlays.Cut()
@@ -239,7 +239,7 @@
inject_occupant(H)
break
else if(istype(W,/obj/item/weapon/screwdriver))
else if(W.is_screwdriver())
if(syringe)
if(used)
to_chat(user,"<span class='warning'>The injector cannot be removed now that the stasis bag has been used!</span>")

View File

@@ -94,7 +94,7 @@
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
update_icon()
else if(isscrewdriver(W))
else if(W.is_screwdriver())
if(bcell)
bcell.update_icon()
bcell.forceMove(get_turf(src.loc))

View File

@@ -24,7 +24,7 @@
return ..()
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
if(isscrewdriver(W))
if(W.is_screwdriver())
in_hack_mode = !in_hack_mode
playsound(src.loc, W.usesound, 50, 1)
else

View File

@@ -54,7 +54,7 @@
else
to_chat(user, "<span class='notice'>[src] already has a diode.</span>")
else if(istype(W, /obj/item/weapon/screwdriver))
else if(W.is_screwdriver())
if(diode)
to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>")
diode.loc = get_turf(src.loc)

View File

@@ -30,13 +30,13 @@
..()
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/screwdriver))
if(I.is_screwdriver())
if(mode == 0)
var/turf/T = loc
if(isturf(T) && !!T.is_plating())
attached = locate() in T
if(!attached)
user << "No exposed cable here to attach to."
to_chat(user, "No exposed cable here to attach to.")
return
else
anchored = 1
@@ -45,7 +45,7 @@
playsound(src, I.usesound, 50, 1)
return
else
user << "Device must be placed over an exposed cable to attach to it."
to_chat(user, "Device must be placed over an exposed cable to attach to it.")
return
else
if (mode == 2)

View File

@@ -40,8 +40,8 @@
if(!(..(user, 1) && radio_desc))
return
user << "The following channels are available:"
user << radio_desc
to_chat(user, "The following channels are available:")
to_chat(user, radio_desc)
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
if (channel == "special")
@@ -326,10 +326,10 @@
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
if(!W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey))
return
if(istype(W, /obj/item/weapon/screwdriver))
if(W.is_screwdriver())
if(keyslot1 || keyslot2)
@@ -353,15 +353,15 @@
keyslot2 = null
recalculateChannels()
user << "You pop out the encryption keys in the headset!"
to_chat(user, "You pop out the encryption keys in the headset!")
playsound(src, W.usesound, 50, 1)
else
user << "This headset doesn't have any encryption keys! How useless..."
to_chat(user, "This headset doesn't have any encryption keys! How useless...")
if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot1 && keyslot2)
user << "The headset can't hold another key!"
to_chat(user, "The headset can't hold another key!")
return
if(!keyslot1)

View File

@@ -118,9 +118,9 @@
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
add_fingerprint(user)
if(istype(W, /obj/item/weapon/screwdriver)) // Opening the intercom up.
if(W.is_screwdriver()) // Opening the intercom up.
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
playsound(src, W.usesound, 50, 1)
if(wiresexposed)
if(!on)
@@ -130,7 +130,7 @@
else
icon_state = "intercom"
return
if(wiresexposed && istype(W, /obj/item/weapon/wirecutters))
if(wiresexposed && W.is_wirecutter())
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src, W.usesound, 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)

View File

@@ -561,7 +561,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) ))
if (!W.is_screwdriver())
return
b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
@@ -613,10 +613,10 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
if (!W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey))
return
if(istype(W, /obj/item/weapon/screwdriver))
if(W.is_screwdriver())
if(keyslot)
@@ -632,15 +632,15 @@ var/global/list/default_medbay_channels = list(
keyslot = null
recalculateChannels()
user << "You pop out the encryption key in the radio!"
to_chat(user, "You pop out the encryption key in the radio!")
playsound(src, W.usesound, 50, 1)
else
user << "This radio doesn't have any encryption keys!"
to_chat(user, "This radio doesn't have any encryption keys!")
if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot)
user << "The radio can't hold another key!"
to_chat(user, "The radio can't hold another key!")
return
if(!keyslot)
@@ -692,9 +692,9 @@ var/global/list/default_medbay_channels = list(
if(enable_subspace_transmission != subspace_transmission)
subspace_transmission = !subspace_transmission
if(subspace_transmission)
usr << "<span class='notice'>Subspace Transmission is enabled</span>"
to_chat(usr, "<span class='notice'>Subspace Transmission is enabled</span>")
else
usr << "<span class='notice'>Subspace Transmission is disabled</span>"
to_chat(usr, "<span class='notice'>Subspace Transmission is disabled</span>")
if(subspace_transmission == 0)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
channels = list()
@@ -707,10 +707,10 @@ var/global/list/default_medbay_channels = list(
shut_up = !shut_up
if(shut_up)
canhear_range = 0
usr << "<span class='notice'>Loadspeaker disabled.</span>"
to_chat(usr, "<span class='notice'>Loadspeaker disabled.</span>")
else
canhear_range = 3
usr << "<span class='notice'>Loadspeaker enabled.</span>"
to_chat(usr, "<span class='notice'>Loadspeaker enabled.</span>")
. = 1
if(.)

View File

@@ -122,7 +122,7 @@
cell.add_fingerprint(user)
cell.update_icon()
user << "You remove \the [src.cell]."
to_chat(user, "You remove \the [src.cell].")
src.cell = null
updateicon()
return
@@ -134,16 +134,16 @@
turn_off()
else
turn_on()
user << "<span class='notice'>You switch \the [src] [on ? "on" : "off"].</span>"
to_chat(user, "<span class='notice'>You switch \the [src] [on ? "on" : "off"].</span>")
/obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
if (W.is_screwdriver())
if(cover_open)
cover_open = 0
user << "You screw the panel into place."
to_chat(user, "You screw the panel into place.")
else
cover_open = 1
user << "You unscrew the panel."
to_chat(user, "You unscrew the panel.")
playsound(src, W.usesound, 50, 1)
updateicon()
return
@@ -151,12 +151,12 @@
if (istype(W, /obj/item/weapon/cell))
if(cover_open)
if(cell)
user << "There is a [cell] already installed here."
to_chat(user, "There is a [cell] already installed here.")
else
user.drop_item()
W.loc = src
cell = W
user << "You insert the [cell]."
to_chat(user, "You insert the [cell].")
updateicon()
return
@@ -177,19 +177,19 @@
if (on)
if (attached_to_suit(src.loc))
user << "It's switched on and running."
to_chat(user, "It's switched on and running.")
else
user << "It's switched on, but not attached to anything."
to_chat(user, "It's switched on, but not attached to anything.")
else
user << "It is switched off."
to_chat(user, "It is switched off.")
if (cover_open)
if(cell)
user << "The panel is open, exposing the [cell]."
to_chat(user, "The panel is open, exposing the [cell].")
else
user << "The panel is open."
to_chat(user, "The panel is open.")
if (cell)
user << "The charge meter reads [round(cell.percent())]%."
to_chat(user, "The charge meter reads [round(cell.percent())]%.")
else
user << "It doesn't have a power cell installed."
to_chat(user, "It doesn't have a power cell installed.")

View File

@@ -414,7 +414,7 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
if(ruined && I.is_screwdriver())
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
playsound(src, I.usesound, 50, 1)
if(do_after(user, 120 * I.toolspeed, target = src))

View File

@@ -7,15 +7,15 @@
build_path = /obj/machinery/computer/rdconsole/core
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/weapon/screwdriver))
if(I.is_screwdriver())
playsound(src, I.usesound, 50, 1)
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on \the [src]'s access protocol pins.</span>", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
if(build_path == /obj/machinery/computer/rdconsole/core)
name = T_BOARD("RD Console - Robotics")
build_path = /obj/machinery/computer/rdconsole/robotics
user << "<span class='notice'>Access protocols set to robotics.</span>"
to_chat(user, "<span class='notice'>Access protocols set to robotics.</span>")
else
name = T_BOARD("RD Console")
build_path = /obj/machinery/computer/rdconsole/core
user << "<span class='notice'>Access protocols set to default.</span>"
to_chat(user, "<span class='notice'>Access protocols set to default.</span>")
return

View File

@@ -12,17 +12,17 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/stock_parts/scanning_module = 1)
obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/weapon/screwdriver))
if(I.is_screwdriver())
playsound(src, I.usesound, 50, 1)
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on \the [src]'s access protocol pins.</span>", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
if(build_path == /obj/machinery/r_n_d/server/core)
name = T_BOARD("RD Console - Robotics")
build_path = /obj/machinery/r_n_d/server/robotics
user << "<span class='notice'>Access protocols set to robotics.</span>"
to_chat(user, "<span class='notice'>Access protocols set to robotics.</span>")
else
name = T_BOARD("RD Console")
build_path = /obj/machinery/r_n_d/server/core
user << "<span class='notice'>Access protocols set to default.</span>"
to_chat(user, "<span class='notice'>Access protocols set to default.</span>")
return
/obj/item/weapon/circuitboard/destructive_analyzer

View File

@@ -25,11 +25,11 @@
return ..()
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/screwdriver))
if(I.is_screwdriver())
open_panel = !open_panel
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
playsound(src, I.usesound, 50, 1)
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
else if(I.is_wirecutter() || I.is_multitool() || istype(I, /obj/item/device/assembly/signaler ))
wires.Interact(user)
else
..()

View File

@@ -70,7 +70,7 @@
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
if(iswrench(W) && !status)//Taking this apart
if(W.is_wrench() && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.loc = T
@@ -85,7 +85,7 @@
qdel(src)
return
if(isscrewdriver(W) && igniter && !lit)
if(W.is_screwdriver() && igniter && !lit)
status = !status
user << "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>"
update_icon()

View File

@@ -46,7 +46,7 @@
/obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (!istype(W, /obj/item/weapon/wirecutters))
if (!W.is_wirecutter())
user << "<span class='warning'>I need wirecutters for that.</span>"
return
@@ -129,7 +129,8 @@
if (!( locate(/obj/structure/table, src.loc) ))
user << "<span class='warning'>You MUST put the paper on a table!</span>"
if (W.w_class < ITEMSIZE_LARGE)
if (user.get_type_in_hands(/obj/item/weapon/wirecutters))
var/obj/item/I = user.get_inactive_hand()
if(I.is_wirecutter())
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
user << "<span class='warning'>You need more paper!</span>"

View File

@@ -41,7 +41,7 @@
user.put_in_hands(B)
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
if(stage > 1 && !active && clown_check(user))
user << "<span class='warning'>You prime \the [name]!</span>"
to_chat(user, "<span class='warning'>You prime \the [name]!</span>")
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
@@ -56,13 +56,13 @@
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
var/obj/item/device/assembly_holder/det = W
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
user << "<span class='warning'>Assembly must contain one igniter.</span>"
to_chat(user, "<span class='warning'>Assembly must contain one igniter.</span>")
return
if(!det.secured)
user << "<span class='warning'>Assembly must be secured with screwdriver.</span>"
to_chat(user, "<span class='warning'>Assembly must be secured with screwdriver.</span>")
return
path = 1
user << "<span class='notice'>You add [W] to the metal casing.</span>"
to_chat(user, "<span class='notice'>You add [W] to the metal casing.</span>")
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
user.remove_from_mob(det)
det.loc = src
@@ -76,26 +76,26 @@
icon_state = initial(icon_state) +"_ass"
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
stage = 1
else if(istype(W,/obj/item/weapon/screwdriver) && path != 2)
else if(W.is_screwdriver() && path != 2)
if(stage == 1)
path = 1
if(beakers.len)
user << "<span class='notice'>You lock the assembly.</span>"
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
name = "grenade"
else
// user << "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>"
user << "<span class='notice'>You lock the empty assembly.</span>"
// to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>")
to_chat(user, "<span class='notice'>You lock the empty assembly.</span>")
name = "fake grenade"
playsound(src, W.usesound, 50, 1)
icon_state = initial(icon_state) +"_locked"
stage = 2
else if(stage == 2)
if(active && prob(95))
user << "<span class='warning'>You trigger the assembly!</span>"
to_chat(user, "<span class='warning'>You trigger the assembly!</span>")
prime()
return
else
user << "<span class='notice'>You unlock the assembly.</span>"
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
playsound(src.loc, W.usesound, 50, -3)
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
icon_state = initial(icon_state) + (detonator?"_ass":"")
@@ -104,23 +104,23 @@
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
path = 1
if(beakers.len == 2)
user << "<span class='warning'>The grenade can not hold more containers.</span>"
to_chat(user, "<span class='warning'>The grenade can not hold more containers.</span>")
return
else
if(W.reagents.total_volume)
user << "<span class='notice'>You add \the [W] to the assembly.</span>"
to_chat(user, "<span class='notice'>You add \the [W] to the assembly.</span>")
user.drop_item()
W.loc = src
beakers += W
stage = 1
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
else
user << "<span class='warning'>\The [W] is empty.</span>"
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
examine(mob/user)
..(user)
if(detonator)
user << "With attached [detonator.name]"
to_chat(user, "With attached [detonator.name]")
activate(mob/user as mob)
if(active) return

View File

@@ -91,7 +91,7 @@
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(W.is_screwdriver())
switch(det_time)
if (1)
det_time = 10

View File

@@ -39,7 +39,7 @@
IC.examine(user)
/obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(istype(O, /obj/item/weapon/crowbar) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || istype(O, /obj/item/weapon/screwdriver) || istype(O, /obj/item/weapon/cell/device) )
if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) )
IC.attackby(O, user)
else
..()

View File

@@ -7,8 +7,8 @@
thrown_force_divisor = 0.1
/obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
user << "You finish the concealed blade weapon."
if(W.is_screwdriver())
to_chat(user, "You finish the concealed blade weapon.")
playsound(src, W.usesound, 50, 1)
new /obj/item/weapon/material/butterfly(user.loc, material.name)
qdel(src)
@@ -33,7 +33,7 @@
/obj/item/weapon/material/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/material/butterflyblade))
var/obj/item/weapon/material/butterflyblade/B = W
user << "You attach the two concealed blade parts."
to_chat(user, "You attach the two concealed blade parts.")
new /obj/item/weapon/material/butterflyconstruction(user.loc, B.material.name)
qdel(W)
qdel(src)
@@ -58,10 +58,10 @@
if(istype(I, /obj/item/weapon/material/shard) || istype(I, /obj/item/weapon/material/butterflyblade))
var/obj/item/weapon/material/tmp_shard = I
finished = new /obj/item/weapon/material/twohanded/spear(get_turf(user), tmp_shard.material.name)
user << "<span class='notice'>You fasten \the [I] to the top of the rod with the cable.</span>"
else if(istype(I, /obj/item/weapon/wirecutters))
to_chat(user, "<span class='notice'>You fasten \the [I] to the top of the rod with the cable.</span>")
else if(I.is_wirecutter())
finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user))
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
to_chat(user, "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>")
if(finished)
user.drop_from_inventory(src)
user.drop_from_inventory(I)

View File

@@ -12,7 +12,7 @@
var/epitaph = "" //A quick little blurb
/obj/item/weapon/material/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
if(W.is_screwdriver())
var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
@@ -27,7 +27,7 @@
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
if(istype(W, /obj/item/weapon/wrench))
if(W.is_wrench())
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
material.place_dismantled_product(get_turf(src))

View File

@@ -43,11 +43,11 @@
icon_state = "utility"
can_hold = list(
///obj/item/weapon/combitool,
/obj/item/weapon/crowbar,
/obj/item/weapon/screwdriver,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/weldingtool,
/obj/item/weapon/wirecutters,
/obj/item/weapon/wrench,
/obj/item/weapon/tool/wirecutters,
/obj/item/weapon/tool/wrench,
/obj/item/device/multitool,
/obj/item/device/flashlight,
/obj/item/weapon/cell/device,
@@ -71,21 +71,21 @@
/obj/item/weapon/storage/belt/utility/full
starts_with = list(
/obj/item/weapon/screwdriver,
/obj/item/weapon/wrench,
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wrench,
/obj/item/weapon/weldingtool,
/obj/item/weapon/crowbar,
/obj/item/weapon/wirecutters,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/tool/wirecutters,
/obj/item/stack/cable_coil/random_belt
)
/obj/item/weapon/storage/belt/utility/atmostech
starts_with = list(
/obj/item/weapon/screwdriver,
/obj/item/weapon/wrench,
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wrench,
/obj/item/weapon/weldingtool,
/obj/item/weapon/crowbar,
/obj/item/weapon/wirecutters,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/tool/wirecutters,
/obj/item/device/t_scanner
)
@@ -97,8 +97,8 @@
/obj/item/weapon/storage/belt/utility/chief/full
starts_with = list(
/obj/item/weapon/screwdriver/power,
/obj/item/weapon/crowbar/power,
/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/tool/crowbar/power,
/obj/item/weapon/weldingtool/experimental,
/obj/item/device/multitool,
/obj/item/stack/cable_coil/random_belt,
@@ -131,7 +131,7 @@
/obj/item/clothing/gloves,
/obj/item/weapon/reagent_containers/hypospray,
/obj/item/clothing/glasses,
/obj/item/weapon/crowbar,
/obj/item/weapon/tool/crowbar,
/obj/item/device/flashlight,
/obj/item/weapon/cell/device,
/obj/item/weapon/extinguisher/mini,
@@ -242,11 +242,11 @@
/obj/item/weapon/storage/belt/utility/alien/full
starts_with = list(
/obj/item/weapon/screwdriver/alien,
/obj/item/weapon/wrench/alien,
/obj/item/weapon/tool/screwdriver/alien,
/obj/item/weapon/tool/wrench/alien,
/obj/item/weapon/weldingtool/alien,
/obj/item/weapon/crowbar/alien,
/obj/item/weapon/wirecutters/alien,
/obj/item/weapon/tool/crowbar/alien,
/obj/item/weapon/tool/wirecutters/alien,
/obj/item/device/multitool/alien,
/obj/item/stack/cable_coil/alien
)
@@ -279,7 +279,7 @@
/obj/item/clothing/gloves,
/obj/item/weapon/reagent_containers/hypospray,
/obj/item/clothing/glasses,
/obj/item/weapon/crowbar,
/obj/item/weapon/tool/crowbar,
/obj/item/device/flashlight,
/obj/item/weapon/cell/device,
/obj/item/weapon/extinguisher/mini,
@@ -369,7 +369,7 @@
/obj/item/weapon/clipboard,
/obj/item/weapon/anodevice,
/obj/item/clothing/glasses,
/obj/item/weapon/wrench,
/obj/item/weapon/tool/wrench,
/obj/item/weapon/storage/excavation,
/obj/item/weapon/anobattery,
/obj/item/device/ano_scanner,

View File

@@ -41,13 +41,13 @@
playsound(src.loc, "sparks", 50, 1)
return
if (istype(W, /obj/item/weapon/screwdriver))
if (W.is_screwdriver())
if (do_after(user, 20 * W.toolspeed))
src.open =! src.open
playsound(src, W.usesound, 50, 1)
user.show_message(text("<span class='notice'>You [] the service panel.</span>", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
if (W.is_multitool() && (src.open == 1)&& (!src.l_hacking))
user.show_message("<span class='notice'>Now attempting to reset internal memory, please hold.</span>", 1)
src.l_hacking = 1
if (do_after(usr, 100))
@@ -135,7 +135,7 @@
src.overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
user << (feedback ? feedback : "You short out the lock of \the [src].")
to_chat(user, (feedback ? feedback : "You short out the lock of \the [src]."))
return 1
// -----------------------------
@@ -156,7 +156,7 @@
attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
usr << "<span class='warning'>[src] is locked and cannot be opened!</span>"
to_chat(user, "<span class='warning'>[src] is locked and cannot be opened!</span>")
else if ((src.loc == user) && (!src.locked))
src.open(usr)
else

View File

@@ -20,7 +20,7 @@
icon_state = "red"
item_state_slots = list(slot_r_hand_str = "toolbox_red", slot_l_hand_str = "toolbox_red")
starts_with = list(
/obj/item/weapon/crowbar/red,
/obj/item/weapon/tool/crowbar/red,
/obj/item/weapon/extinguisher/mini,
/obj/item/device/radio
)
@@ -36,12 +36,12 @@
icon_state = "blue"
item_state_slots = list(slot_r_hand_str = "toolbox_blue", slot_l_hand_str = "toolbox_blue")
starts_with = list(
/obj/item/weapon/screwdriver,
/obj/item/weapon/wrench,
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wrench,
/obj/item/weapon/weldingtool,
/obj/item/weapon/crowbar,
/obj/item/weapon/tool/crowbar,
/obj/item/device/analyzer,
/obj/item/weapon/wirecutters
/obj/item/weapon/tool/wirecutters
)
/obj/item/weapon/storage/toolbox/electrical
@@ -49,10 +49,10 @@
icon_state = "yellow"
item_state_slots = list(slot_r_hand_str = "toolbox_yellow", slot_l_hand_str = "toolbox_yellow")
starts_with = list(
/obj/item/weapon/screwdriver,
/obj/item/weapon/wirecutters,
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wirecutters,
/obj/item/device/t_scanner,
/obj/item/weapon/crowbar,
/obj/item/weapon/tool/crowbar,
/obj/item/stack/cable_coil/random_belt,
/obj/item/stack/cable_coil/random_belt
)
@@ -72,20 +72,20 @@
force = 14
starts_with = list(
/obj/item/clothing/gloves/yellow,
/obj/item/weapon/screwdriver,
/obj/item/weapon/wrench,
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wrench,
/obj/item/weapon/weldingtool,
/obj/item/weapon/crowbar,
/obj/item/weapon/wirecutters,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/tool/wirecutters,
/obj/item/device/multitool
)
/obj/item/weapon/storage/toolbox/syndicate/powertools
starts_with = list(
/obj/item/clothing/gloves/yellow,
/obj/item/weapon/screwdriver/power,
/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/weldingtool/experimental,
/obj/item/weapon/crowbar/power,
/obj/item/weapon/tool/crowbar/power,
/obj/item/device/multitool,
/obj/item/stack/cable_coil/random_belt,
/obj/item/device/analyzer

View File

@@ -223,19 +223,19 @@
/obj/item/weapon/storage/box/syndie_kit/demolitions
starts_with = list(
/obj/item/weapon/syndie/c4explosive,
/obj/item/weapon/screwdriver
/obj/item/weapon/tool/screwdriver
)
/obj/item/weapon/storage/box/syndie_kit/demolitions_heavy
starts_with = list(
/obj/item/weapon/syndie/c4explosive/heavy,
/obj/item/weapon/screwdriver
/obj/item/weapon/tool/screwdriver
)
/obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy
starts_with = list(
/obj/item/weapon/syndie/c4explosive/heavy/super_heavy,
/obj/item/weapon/screwdriver
/obj/item/weapon/tool/screwdriver
)
/obj/item/weapon/storage/secure/briefcase/rifle
@@ -253,8 +253,8 @@
description_fluff = "The container, upon opening, looks to have a few oddly shaped indentations in its packing."
description_antag = "This case will likely contain a charged fuel rod gun, and a few fuel rods to go with it. It can only hold the fuel rod gun, fuel rods, batteries, a screwdriver, and stock machine parts."
force = 12 //Anti-rad lined i.e. Lead, probably gonna hurt a bit if you get bashed with it.
can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/screwdriver)
cant_hold = list(/obj/item/weapon/screwdriver/power)
can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/tool/screwdriver)
cant_hold = list(/obj/item/weapon/tool/screwdriver/power)
starts_with = list(
/obj/item/weapon/gun/magnetic/fuelrod,
/obj/item/weapon/fuel_assembly/deuterium,
@@ -262,5 +262,5 @@
/obj/item/weapon/fuel_assembly/tritium,
/obj/item/weapon/fuel_assembly/tritium,
/obj/item/weapon/fuel_assembly/phoron,
/obj/item/weapon/screwdriver
/obj/item/weapon/tool/screwdriver
)

View File

@@ -32,12 +32,12 @@
/obj/item/weapon/photo,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/sample,
/obj/item/weapon/screwdriver,
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/stamp,
/obj/item/clothing/accessory/permit,
/obj/item/clothing/accessory/badge
)
cant_hold = list(/obj/item/weapon/screwdriver/power)
cant_hold = list(/obj/item/weapon/tool/screwdriver/power)
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null

View File

@@ -91,7 +91,7 @@
else if(lit && detonator_mode)
switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter."))
if("Press the button.")
user << "<span class='warning'>You press the button.</span>"
to_chat(user, "<span class='warning'>You press the button.</span>")
icon_state = "[base_state]click"
if(src.bomb)
src.bomb.detonate()
@@ -106,7 +106,7 @@
/obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
if(W.is_screwdriver())
detonator_mode = !detonator_mode
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>"
to_chat(user, "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>")

View File

@@ -130,7 +130,7 @@ var/list/global/tank_gauge_cache = list()
to_chat(user, "<span class='notice'>You attach the wires to the tank.</span>")
src.add_bomb_overlay()
if(istype(W, /obj/item/weapon/wirecutters))
if(W.is_wirecutter())
if(wired && src.proxyassembly.assembly)
to_chat(user, "<span class='notice'>You carefully begin clipping the wires that attach to the tank.</span>")

View File

@@ -0,0 +1,63 @@
// File is unticked because this is entirely untested old code
/*
* Combitool
*/
/obj/item/weapon/combitool
name = "combi-tool"
desc = "It even has one of those nubbins for doing the thingy."
icon = 'icons/obj/items.dmi'
icon_state = "combitool"
w_class = ITEMSIZE_SMALL
var/list/spawn_tools = list(
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wrench,
/obj/item/weapon/tool/wirecutters,
/obj/item/weapon/material/knife,
/obj/item/weapon/material/kitchen/utensil/fork,
/obj/item/weapon/material/knife/machete/hatchet
)
var/list/tools = list()
var/current_tool = 1
/obj/item/weapon/combitool/examine()
..()
if(loc == usr && tools.len)
to_chat(usr, "It has the following fittings:")
for(var/obj/item/tool in tools)
to_chat(usr, "\icon[tool] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
/obj/item/weapon/combitool/New()
..()
for(var/type in spawn_tools)
tools |= new type(src)
/obj/item/weapon/combitool/attack_self(mob/user as mob)
if(++current_tool > tools.len) current_tool = 1
var/obj/item/tool = tools[current_tool]
if(!tool)
to_chat(user, "You can't seem to find any fittings in \the [src].")
else
to_chat(user, "You switch \the [src] to the [tool.name] fitting.")
return 1
/obj/item/weapon/combitool/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!M.Adjacent(user))
return 0
var/obj/item/tool = tools[current_tool]
if(!tool) return 0
return (tool ? tool.attack(M,user) : 0)
/obj/item/weapon/combitool/afterattack(var/atom/target, var/mob/living/user, proximity, params)
if(!proximity)
return 0
var/obj/item/tool = tools[current_tool]
if(!tool) return 0
tool.loc = user
var/resolved = target.attackby(tool,user)
if(!resolved && tool && target)
tool.afterattack(target,user,1)
if(tool)
tool.loc = src

View File

@@ -0,0 +1,77 @@
/*
* Crowbar
*/
/obj/item/weapon/tool/crowbar
name = "crowbar"
desc = "Used to remove floors and to pry open doors."
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
throwforce = 7
pry = 1
item_state = "crowbar"
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 50)
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
usesound = 'sound/items/crowbar.ogg'
toolspeed = 1
/obj/item/weapon/tool/crowbar/is_crowbar()
return TRUE
/obj/item/weapon/tool/crowbar/red
icon = 'icons/obj/tools.dmi'
icon_state = "red_crowbar"
item_state = "crowbar_red"
/obj/item/weapon/tool/crowbar/alien
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 = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4)
/obj/item/weapon/tool/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics."
usesound = 'sound/items/jaws_pry.ogg'
force = 10
toolspeed = 0.5
/obj/item/weapon/tool/crowbar/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
matter = list(MAT_METAL=150, MAT_SILVER=50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
var/obj/item/weapon/tool/wirecutters/power/counterpart = null
/obj/item/weapon/tool/crowbar/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/crowbar/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
qdel_null(counterpart)
return ..()
/obj/item/weapon/tool/crowbar/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")

View File

@@ -0,0 +1,125 @@
/*
* Screwdriver
*/
/obj/item/weapon/tool/screwdriver
name = "screwdriver"
desc = "You can be totally screwwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = "screwdriver"
flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_EARS
force = 6
w_class = ITEMSIZE_TINY
throwforce = 5
throw_speed = 3
throw_range = 5
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/screwdriver.ogg'
matter = list(DEFAULT_WALL_MATERIAL = 75)
attack_verb = list("stabbed")
sharp = 1
toolspeed = 1
var/random_color = TRUE
/obj/item/weapon/tool/screwdriver/suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
viewers(user) << pick("<span class='danger'>\The [user] is stabbing the [src.name] into [TU.his] temple! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is stabbing the [src.name] into [TU.his] heart! It looks like [TU.hes] trying to commit suicide.</span>")
return(BRUTELOSS)
/obj/item/weapon/tool/screwdriver/New()
if(random_color)
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"
if (prob(75))
src.pixel_y = rand(0, 16)
..()
/obj/item/weapon/tool/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M) || user.a_intent == "help")
return ..()
if(user.zone_sel.selecting != O_EYES && user.zone_sel.selecting != BP_HEAD)
return ..()
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
/obj/item/weapon/tool/screwdriver/is_screwdriver()
return TRUE
/obj/item/weapon/tool/screwdriver/alien
name = "alien screwdriver"
desc = "An ultrasonic screwdriver."
icon = 'icons/obj/abductor.dmi'
icon_state = "screwdriver_a"
item_state = "screwdriver_black"
usesound = 'sound/items/pshoom.ogg'
toolspeed = 0.1
random_color = FALSE
/obj/item/weapon/tool/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
/obj/item/weapon/tool/screwdriver/power
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a screw bit."
icon_state = "drill_screw"
item_state = "drill"
matter = list(DEFAULT_WALL_MATERIAL = 150, MAT_SILVER = 50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
slot_flags = SLOT_BELT
force = 8
w_class = ITEMSIZE_SMALL
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
random_color = FALSE
var/obj/item/weapon/tool/wrench/power/counterpart = null
/obj/item/weapon/tool/screwdriver/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/screwdriver/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
qdel_null(counterpart)
return ..()
/obj/item/weapon/tool/screwdriver/power/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")

View File

@@ -0,0 +1,93 @@
/*
* Wirecutters
*/
/obj/item/weapon/tool/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = "cutters"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
throw_speed = 2
throw_range = 9
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 80)
attack_verb = list("pinched", "nipped")
hitsound = 'sound/items/wirecutter.ogg'
usesound = 'sound/items/wirecutter.ogg'
sharp = 1
edge = 1
toolspeed = 1
var/random_color = TRUE
/obj/item/weapon/tool/wirecutters/New()
if(random_color && prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
..()
/obj/item/weapon/tool/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable)))
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
C.handcuffed = null
if(C.buckled && C.buckled.buckle_require_restraints)
C.buckled.unbuckle_mob()
C.update_inv_handcuffed()
return
else
..()
/obj/item/weapon/tool/wirecutters/is_wirecutter()
return TRUE
/obj/item/weapon/tool/wirecutters/alien
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 = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
random_color = FALSE
/obj/item/weapon/tool/wirecutters/cyborg
name = "wirecutters"
desc = "This cuts wires. With science."
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.5
/obj/item/weapon/tool/wirecutters/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
matter = list(MAT_METAL=150, MAT_SILVER=50)
usesound = 'sound/items/jaws_cut.ogg'
force = 15
toolspeed = 0.25
random_color = FALSE
var/obj/item/weapon/tool/crowbar/power/counterpart = null
/obj/item/weapon/tool/wirecutters/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/wirecutters/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
qdel_null(counterpart)
return ..()
/obj/item/weapon/tool/wirecutters/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")

View File

@@ -0,0 +1,71 @@
/*
* Wrench
*/
/obj/item/weapon/tool/wrench
name = "wrench"
desc = "A wrench with many common uses. Can be usually found in your hand."
icon = 'icons/obj/tools.dmi'
icon_state = "wrench"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
throwforce = 7
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 150)
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
usesound = 'sound/items/ratchet.ogg'
toolspeed = 1
/obj/item/weapon/tool/wrench/is_wrench()
return TRUE
/obj/item/weapon/tool/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in industrial synthetic shells."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
/obj/item/weapon/tool/wrench/alien
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 = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 5)
/obj/item/weapon/tool/wrench/power
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
usesound = 'sound/items/drill_use.ogg'
matter = list(DEFAULT_WALL_MATERIAL = 150, MAT_SILVER = 50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
force = 8
w_class = ITEMSIZE_SMALL
throwforce = 8
attack_verb = list("drilled", "screwed", "jabbed")
toolspeed = 0.25
var/obj/item/weapon/tool/screwdriver/power/counterpart = null
/obj/item/weapon/tool/wrench/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/wrench/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
qdel_null(counterpart)
return ..()
/obj/item/weapon/tool/wrench/power/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the screw driver bit to [src].</span>")