What was supposed to be another straightforward major system overhaul that once again spiraled out of control (#8220)

* get_tool_quality has numerical meaning

* Basic tools set tool quality

* Toolspeed is replaced by tool quality checks

* Addresses assorted results from live test

* Extra cleanup
This commit is contained in:
Atermonera
2022-01-16 15:52:55 -08:00
committed by GitHub
parent 0232be9531
commit 4d8c43f106
312 changed files with 1902 additions and 2271 deletions

View File

@@ -275,14 +275,14 @@
if(default_deconstruction_screwdriver(user, I))
return
if(istype(I, /obj/item/weapon/weldingtool))
if(I.get_tool_quality(TOOL_WELDER))
if(panel_open)
var/obj/item/weapon/weldingtool/WT = I
if(!WT.remove_fuel(0, user))
to_chat(user, "The welding tool must be on to complete this task.")
return
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(do_after(user, 20 * WT.get_tool_speed(TOOL_WELDER)))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
new /obj/item/stack/material/steel( src.loc, 2 )

View File

@@ -246,7 +246,7 @@
var/obj/structure/disposalpipe/CP = locate() in T
// wrench: (un)anchor
if(I.is_wrench())
if(I.get_tool_quality(TOOL_WRENCH))
if(anchored)
anchored = 0
if(ispipe)
@@ -285,13 +285,13 @@
update()
// weldingtool: convert to real pipe
else if(istype(I, /obj/item/weapon/weldingtool))
else if(I.get_tool_quality(TOOL_WELDER))
if(anchored)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src, W.usesound, 100, 1)
to_chat(user, "Welding the [nicetype] in place.")
if(do_after(user, 20 * W.toolspeed))
if(do_after(user, 20 * W.get_tool_speed(TOOL_WELDER)))
if(!src || !W.isOn()) return
to_chat(user, "The [nicetype] has been welded in place!")
update() // TODO: Make this neat

View File

@@ -56,7 +56,7 @@
src.add_fingerprint(user)
if(mode<=0) // It's off
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
if(contents.len > 0)
to_chat(user, "Eject the items first!")
return
@@ -70,7 +70,7 @@
playsound(src, I.usesound, 50, 1)
to_chat(user, "You attach the screws around the power connection.")
return
else if(istype(I, /obj/item/weapon/weldingtool) && mode==-1)
else if(I.get_tool_quality(TOOL_WELDER) && mode==-1)
if(contents.len > 0)
to_chat(user, "Eject the items first!")
return
@@ -79,7 +79,7 @@
playsound(src, W.usesound, 100, 1)
to_chat(user, "You start slicing the floorweld off the disposal unit.")
if(do_after(user,20 * W.toolspeed))
if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER)))
if(!src || !W.isOn()) return
to_chat(user, "You sliced the floorweld off the disposal unit.")
var/obj/structure/disposalconstruct/C = new (src.loc)
@@ -1554,7 +1554,7 @@
if(!I || !user)
return
src.add_fingerprint(user)
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
if(mode==0)
mode=1
to_chat(user, "You remove the screws around the power connection.")
@@ -1565,12 +1565,12 @@
to_chat(user, "You attach the screws around the power connection.")
playsound(src, I.usesound, 50, 1)
return
else if(istype(I, /obj/item/weapon/weldingtool) && mode==1)
else if(I.get_tool_quality(TOOL_WELDER) && mode==1)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src, W.usesound, 100, 1)
to_chat(user, "You start slicing the floorweld off the disposal outlet.")
if(do_after(user,20 * W.toolspeed))
if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER)))
if(!src || !W.isOn()) return
to_chat(user, "You sliced the floorweld off the disposal outlet.")
var/obj/structure/disposalconstruct/C = new (src.loc)

View File

@@ -430,19 +430,19 @@
if(!I || !user)
return
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
c_mode = !c_mode
playsound(src, I.usesound, 50, 1)
to_chat(user, "You [c_mode ? "remove" : "attach"] the screws around the power connection.")
return
if(istype(I, /obj/item/weapon/weldingtool) && c_mode==1)
if(I.get_tool_quality(TOOL_WELDER) && c_mode==1)
var/obj/item/weapon/weldingtool/W = I
if(!W.remove_fuel(0,user))
to_chat(user, "You need more welding fuel to complete this task.")
return
playsound(src, W.usesound, 50, 1)
to_chat(user, "You start slicing the floorweld off the delivery chute.")
if(do_after(user,20 * W.toolspeed))
if(do_after(user,20 * W.get_tool_speed(TOOL_WELDER)))
if(!src || !W.isOn()) return
to_chat(user, "You sliced the floorweld off the delivery chute.")
var/obj/structure/disposalconstruct/C = new (src.loc)