mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-26 14:36:16 +01:00
COMPLETELY FUCKING REFACTORS TOOL CHECKING CODE
dear FUCKING GOD why was it like this, it hurts soooo bad DDDD:
This commit is contained in:
@@ -148,13 +148,13 @@
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver) && deconstruction_ready)
|
||||
if(I.tool_behavior == TOOL_SCREWDRIVER && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/wrench) && deconstruction_ready)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start deconstructing [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
@@ -495,7 +495,7 @@
|
||||
to_chat(user, "<span class='notice'>The top cover is firmly <b>welded</b> on.</span>")
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behavior == TOOL_WELDER)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -647,7 +647,7 @@
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
if (W.tool_behavior == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
|
||||
W.play_tool_sound(src)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
@@ -706,7 +706,7 @@
|
||||
var/building = FALSE
|
||||
|
||||
/obj/item/rack_parts/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench))
|
||||
if (W.tool_behavior == TOOL_WRENCH)
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user