[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

@@ -70,7 +70,7 @@
if((!A.secured) && (!secured))
attach_assembly(A,user)
return
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(toggle_secure())
to_chat(user, "<span class='notice'>\The [src] is ready!</span>")
else

View File

@@ -103,7 +103,7 @@
..()
/obj/item/device/assembly_holder/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(!a_left || !a_right)
to_chat(user, "<span class='warning'> BUG:Assembly part missing, please report this!</span>")
return

View File

@@ -14,7 +14,7 @@
return
/obj/item/assembly/shock_kit/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.is_wrench() && !status)
if(W.has_tool_quality(TOOL_WRENCH) && !status)
var/turf/T = loc
if(ismob(T))
T = T.loc
@@ -26,7 +26,7 @@
part2 = null
qdel(src)
return
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
status = !status
to_chat(user, "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>")
playsound(src, W.usesound, 50, 1)