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
+1 -1
View File
@@ -3,7 +3,7 @@
. = ..()
if(locate(/obj/item/hose_connector) in src)
if(O.is_wirecutter())
if(O.get_tool_quality(TOOL_WIRECUTTER))
var/list/available_sockets = list()
for(var/obj/item/hose_connector/HC in src)
@@ -76,10 +76,10 @@
SStgui.update_uis(src)
/obj/machinery/chemical_dispenser/attackby(obj/item/weapon/W, mob/user)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to [anchored ? "un" : ""]fasten \the [src].</span>")
if (do_after(user, 20 * W.toolspeed))
if (do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH)))
user.visible_message(
"<span class='notice'>\The [user] [anchored ? "un" : ""]fastens \the [src].</span>",
"<span class='notice'>You have [anchored ? "un" : ""]fastened \the [src].</span>",
@@ -91,7 +91,7 @@
else if(istype(W, /obj/item/weapon/reagent_containers/chem_disp_cartridge))
add_cartridge(W, user)
else if(W.is_screwdriver())
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
var/label = input(user, "Which cartridge would you like to remove?", "Chemical Dispenser") as null|anything in cartridges
if(!label) return
var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = remove_cartridge(label)
@@ -133,7 +133,7 @@
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W as obj, mob/user as mob)
src.add_fingerprint(user)
if (W.is_wrench())
if (W.get_tool_quality(TOOL_WRENCH))
user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \
"You wrench [src]'s faucet [modded ? "closed" : "open"]")
modded = modded ? 0 : 1
@@ -265,7 +265,7 @@
return 1
/obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_wrench())
if(I.get_tool_quality(TOOL_WRENCH))
src.add_fingerprint(user)
if(bottle)
playsound(src, I.usesound, 50, 1)
@@ -283,14 +283,14 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20 * I.toolspeed, src))
if(do_after(user, 20 * I.get_tool_speed(TOOL_WRENCH), src))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
anchored = !anchored
playsound(src, I.usesound, 50, 1)
return
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
if(cupholder)
playsound(src, I.usesound, 50, 1)
to_chat(user, "<span class='notice'>You take the cup dispenser off.</span>")
@@ -305,7 +305,7 @@
if(!bottle && !cupholder)
playsound(src, I.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start taking the water-cooler apart.</span>")
if(do_after(user, 20 * I.toolspeed) && !bottle && !cupholder)
if(do_after(user, 20 * I.get_tool_speed(TOOL_SCREWDRIVER)) && !bottle && !cupholder)
to_chat(user, "<span class='notice'>You take the water-cooler apart.</span>")
new /obj/item/stack/material/plastic( src.loc, 4 )
qdel(src)
+3 -3
View File
@@ -141,18 +141,18 @@
/obj/machinery/pump/attackby(obj/item/weapon/W, mob/user)
. = TRUE
if(W.is_screwdriver() && !open)
if(W.get_tool_quality(TOOL_SCREWDRIVER) && !open)
to_chat(user, SPAN_NOTICE("You [unlocked ? "screw" : "unscrew"] the battery panel."))
unlocked = !unlocked
else if(W.is_crowbar() && unlocked)
else if(W.get_tool_quality(TOOL_CROWBAR) && unlocked)
to_chat(user, open ? \
"<span class='notice'>You crowbar the battery panel in place.</span>" : \
"<span class='notice'>You remove the battery panel.</span>" \
)
open = !open
else if(W.is_wrench())
else if(W.get_tool_quality(TOOL_WRENCH))
if(on)
to_chat(user, "<span class='notice'>\The [src] is active. Turn it off before trying to move it!</span>")
return FALSE
@@ -277,7 +277,7 @@
user.drop_from_inventory(src)
qdel(src)
return
else if(D.is_wirecutter())
else if(D.get_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "<span class='notice'>You cut a big hole in \the [src] with \the [D]. It's kinda useless as a bucket now.</span>")
user.put_in_hands(new /obj/item/clothing/head/helmet/bucket)
user.drop_from_inventory(src)