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 15:08:42 -04:00
committed by Erki
parent ad96a34dd8
commit cb5e227320
219 changed files with 546 additions and 572 deletions

View File

@@ -148,7 +148,7 @@
try_install_component(user, C)
else
to_chat(user, "This component is too large for \the [src].")
if(istype(W, /obj/item/weapon/wrench))
if(iswrench(W))
var/list/components = get_all_components()
if(components.len)
to_chat(user, "Remove all components from \the [src] before disassembling it.")
@@ -162,7 +162,7 @@
"You hear a ratchet.")
qdel(src)
return
if(istype(W, /obj/item/weapon/weldingtool))
if(iswelder(W))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.isOn())
to_chat(user, "\The [W] is off.")
@@ -179,7 +179,7 @@
to_chat(user, "You repair \the [src].")
return
if(istype(W, /obj/item/weapon/screwdriver))
if(isscrewdriver(W))
var/list/all_components = get_all_components()
if(!all_components.len)
to_chat(user, "This device doesn't have any components installed.")