mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user