Killing off inconsistencies with impact wrenches / combi-tools (#7269)

Part 1 in the "why my impact wrench no wrench bolt" saga

tl;dr for end users: combitools / impact wrenches now work on everything their non-powered versions do (except mechs and RIGs, tune in next time on dragon ball Z for that)

essentially all this PR does is murder every istype() check possible that could use a helper function instead, most notably many pen checks with ispen(). it also repaths combitools and powerdrills to /obj/item/weapon so they aren't instantly taken out of contention by half of the known attackby() prompts

I already squashed a couple runtimes here and there from the pen changes and it's possible I missed another because pencode is another scourge upon our lives
This commit is contained in:
JohnWildkins
2019-10-26 22:20:40 +03:00
committed by Erki
parent 751f77550a
commit 9c335f6c00
47 changed files with 141 additions and 119 deletions
+2 -2
View File
@@ -392,7 +392,7 @@
to_chat(usr, "<span class='warning'>[src] has no power cell.</span>")
// Handle most of things: restraining, cutting restrains, attaching tank.
/obj/structure/closet/airbubble/attackby(W as obj, mob/user as mob)
/obj/structure/closet/airbubble/attackby(obj/W, mob/user as mob)
if(istype(W, /obj/item/weapon/tank))
if(!isnull(use_internal_tank))
user.visible_message(
@@ -442,7 +442,7 @@
qdel(W)
update_icon()
else if(istype(W, /obj/item/weapon/wirecutters))
else if(W.iswirecutter())
if(!zipped)
to_chat(user, "<span class='warning'>[src] has no cables to cut.</span>")
attack_hand(user)