mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
Better wrenching code
Probably
This commit is contained in:
@@ -65,17 +65,9 @@
|
||||
|
||||
/obj/structure/dresser/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
WRENCH_UNANCHOR_MESSAGE
|
||||
anchored = FALSE
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to secure [src]!</span>")
|
||||
return
|
||||
WRENCH_ANCHOR_MESSAGE
|
||||
anchored = TRUE
|
||||
default_unfasten_wrench(user, I, time = 20)
|
||||
|
||||
obj/structure/dresser/deconstruct(disassembled = FALSE)
|
||||
var/mat_drop = 15
|
||||
|
||||
@@ -26,17 +26,9 @@
|
||||
|
||||
/obj/structure/loom/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
WRENCH_UNANCHOR_MESSAGE
|
||||
anchored = FALSE
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to secure [src]!</span>")
|
||||
return
|
||||
WRENCH_ANCHOR_MESSAGE
|
||||
anchored = TRUE
|
||||
default_unfasten_wrench(user, I, time = 20)
|
||||
|
||||
/obj/structure/loom/deconstruct(disassembled = FALSE)
|
||||
var/mat_drop = 5
|
||||
|
||||
Reference in New Issue
Block a user