Merge pull request #48971 from Bawhoppen/filingfix

Fixes not being able to unwrench drawers
This commit is contained in:
81Denton
2020-02-01 08:26:01 +01:00
committed by GitHub
+6 -6
View File
@@ -46,7 +46,12 @@
qdel(src)
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
if(P.w_class < WEIGHT_CLASS_NORMAL)
if(P.tool_behaviour == TOOL_WRENCH && user.a_intent != INTENT_HELP)
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(P.w_class < WEIGHT_CLASS_NORMAL)
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
@@ -54,11 +59,6 @@
sleep(5)
icon_state = initial(icon_state)
updateUsrDialog()
else if(P.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(user.a_intent != INTENT_HARM)
to_chat(user, "<span class='warning'>You can't put [P] in [src]!</span>")
else