Converts some istype's to use helpers (#3224)

Converts various istype's to use helpers. Mainly:
Cable
Wrench
Screwdriver
Multitool
Crowbar
Wirecutter

And makes the helpers defines.
This commit is contained in:
Ron
2017-08-06 22:08:42 +03:00
committed by Erki
parent ad96a34dd8
commit cb5e227320
219 changed files with 546 additions and 572 deletions
@@ -28,7 +28,7 @@
stored_card = W
W.forceMove(src)
update_power_usage()
if(istype(W, /obj/item/weapon/screwdriver))
if(isscrewdriver(W))
user << "You manually remove \the [stored_card] from \the [src]."
stored_card.forceMove(get_turf(src))
stored_card = null
@@ -15,7 +15,7 @@
/obj/item/weapon/computer_hardware/attackby(var/obj/item/W as obj, var/mob/living/user as mob)
// Multitool. Runs diagnostics
if(istype(W, /obj/item/device/multitool))
if(ismultitool(W))
to_chat(user, "***** DIAGNOSTICS REPORT *****")
diagnostics(user)
to_chat(user, "******************************")
@@ -31,7 +31,7 @@
damage = 0
return 1
// Cable coil. Works as repair method, but will probably require multiple applications and more cable.
if(istype(S, /obj/item/stack/cable_coil))
if(iscoil(S))
if(!damage)
to_chat(user, "\The [src] doesn't seem to require repairs.")
return 1