[MIRROR] Refactors tool typechecks, refactors transforming tools, makes Altevian wrench into one (#7062)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Nadyr <41974248+Darlantanis@users.noreply.github.com>
This commit is contained in:
CHOMPStation2
2023-10-04 15:37:41 -07:00
committed by GitHub
parent 00a5f09ad4
commit d2e66e6410
310 changed files with 1035 additions and 944 deletions

View File

@@ -1145,8 +1145,8 @@ About the new airlock wires panel:
if(istype(C, /mob/living))
..()
return
if(!repairing && istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density)
var/obj/item/weapon/weldingtool/W = C
if(!repairing && C.has_tool_quality(TOOL_WELDER) && !( src.operating > 0 ) && src.density)
var/obj/item/weapon/weldingtool/W = C.get_welder()
if(W.remove_fuel(0,user))
if(!src.welded)
src.welded = 1
@@ -1157,7 +1157,7 @@ About the new airlock wires panel:
return
else
return
else if(C.is_screwdriver())
else if(C.has_tool_quality(TOOL_SCREWDRIVER))
if (src.p_open)
if (stat & BROKEN)
to_chat(usr, "<span class='warning'>The panel is broken and cannot be closed.</span>")
@@ -1171,7 +1171,7 @@ About the new airlock wires panel:
playsound(src, C.usesound, 50, 1)
src.update_icon()
return src.attack_hand(user)
else if(C.is_wirecutter())
else if(C.has_tool_quality(TOOL_WIRECUTTER))
return src.attack_hand(user)
else if(istype(C, /obj/item/device/multitool))
return src.attack_hand(user)
@@ -1180,7 +1180,7 @@ About the new airlock wires panel:
else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE
var/obj/item/weapon/pai_cable/cable = C
cable.plugin(src, user)
else if(!repairing && C.is_crowbar())
else if(!repairing && C.has_tool_quality(TOOL_CROWBAR))
if(can_remove_electronics())
playsound(src, C.usesound, 75, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")