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 vuonojenmustaturska
parent 2dfa05a848
commit 2fa1ac1349
179 changed files with 489 additions and 464 deletions

View File

@@ -25,7 +25,7 @@
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
if (istype(A, /obj/item/screwdriver) && !modified)
if (A.tool_behaviour == TOOL_SCREWDRIVER && !modified)
modified = TRUE
FD.modified = TRUE
FD.damage_type = BRUTE

View File

@@ -347,7 +347,7 @@
knife_overlay.pixel_x = knife_x_offset
knife_overlay.pixel_y = knife_y_offset
add_overlay(knife_overlay, TRUE)
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(gun_light)
var/obj/item/flashlight/seclite/S = gun_light
to_chat(user, "<span class='notice'>You unscrew the seclite from \the [src].</span>")