Replaces istypes with the proper tool_behaviour checks. (#40414)

This commit is contained in:
ShizCalev
2018-09-30 20:10:31 -04:00
committed by yogstation13-bot
parent 81a1280956
commit 5a29dc43e3
179 changed files with 489 additions and 464 deletions

View File

@@ -385,7 +385,7 @@
if(install_component(W, user))
return
if(istype(W, /obj/item/wrench))
if(W.tool_behaviour == TOOL_WRENCH)
if(all_components.len)
to_chat(user, "<span class='warning'>Remove all components from \the [src] before disassembling it.</span>")
return
@@ -395,7 +395,7 @@
qdel(src)
return
if(istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
if(obj_integrity == max_integrity)
to_chat(user, "<span class='warning'>\The [src] does not require repairs.</span>")
return
@@ -409,7 +409,7 @@
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
return
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(!all_components.len)
to_chat(user, "<span class='warning'>This device doesn't have any components installed.</span>")
return