[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

@@ -280,7 +280,7 @@
return 1
/obj/machinery/shieldgen/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 100, 1)
if(is_open)
to_chat(user, "<font color='blue'>You close the panel.</font>")
@@ -300,7 +300,7 @@
to_chat(user, "<span class='notice'>You repair the [src]!</span>")
update_icon()
else if(W.is_wrench())
else if(W.has_tool_quality(TOOL_WRENCH))
if(locked)
to_chat(user, "The bolts are covered, unlocking this would retract the covers.")
return

View File

@@ -157,7 +157,7 @@
/obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user)
if(W.is_wrench())
if(W.has_tool_quality(TOOL_WRENCH))
if(active)
to_chat(user, "Turn off the field generator first.")
return

View File

@@ -46,7 +46,7 @@
updateDialog()
else
to_chat(user, "<font color='red'>Access denied.</font>")
else if(W.is_wrench())
else if(W.has_tool_quality(TOOL_WRENCH))
src.anchored = !src.anchored
playsound(src, W.usesound, 75, 1)
src.visible_message("<font color='blue'>\icon[src][bicon(src)] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].</font>")

View File

@@ -69,7 +69,7 @@
updateDialog()
else
to_chat(user, "<font color='red'>Access denied.</font>")
else if(W.is_wrench())
else if(W.has_tool_quality(TOOL_WRENCH))
src.anchored = !src.anchored
playsound(src, W.usesound, 75, 1)
src.visible_message("<font color='blue'>\icon[src][bicon(src)] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].</font>")

View File

@@ -357,12 +357,12 @@
overloaded = 0
/obj/machinery/power/shield_generator/attackby(obj/item/O as obj, mob/user as mob)
if(panel_open && (O?.is_multitool() || O?.is_wirecutter()))
if(panel_open && (O?.has_tool_quality(TOOL_MULTITOOL) || O?.has_tool_quality(TOOL_WIRECUTTER)))
wires.Interact(user)
return TRUE
if(default_deconstruction_screwdriver(user, O))
return
if(O?.is_crowbar() || O?.is_wrench() || istype(O, /obj/item/weapon/storage/part_replacer))
if(O?.has_tool_quality(TOOL_CROWBAR) || O?.has_tool_quality(TOOL_WRENCH) || istype(O, /obj/item/weapon/storage/part_replacer))
if(offline_for)
to_chat(user, "<span class='warning'>Wait until \the [src] cools down from emergency shutdown first!</span>")
return