COMPLETELY FUCKING REFACTORS TOOL CHECKING CODE

dear FUCKING GOD why was it like this, it hurts soooo bad DDDD:
This commit is contained in:
ReoDaProtovali
2024-09-11 01:32:03 -05:00
parent a9ddce1dce
commit e503b7e267
185 changed files with 416 additions and 423 deletions
@@ -58,7 +58,7 @@
return
created_name = t
else if(istype(W, /obj/item/weldingtool) && (mineral || glass || !anchored ))
else if(W.tool_behavior == TOOL_WELDER && (mineral || glass || !anchored ))
if(!W.tool_start_check(user, amount=0))
return
@@ -88,7 +88,7 @@
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
deconstruct(TRUE)
else if(istype(W, /obj/item/wrench))
else if(W.tool_behavior == TOOL_WRENCH)
if(!anchored )
var/door_check = 1
for(var/obj/machinery/door/D in loc)
@@ -134,7 +134,7 @@
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
name = "wired airlock assembly"
else if(istype(W, /obj/item/wirecutters) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS )
else if(W.tool_behavior == TOOL_WIRECUTTER && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS )
user.visible_message("[user] cuts the wires from the airlock assembly.", \
"<span class='notice'>You start to cut the wires from the airlock assembly...</span>")
@@ -162,7 +162,7 @@
electronics = W
else if(istype(W, /obj/item/crowbar) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
else if(W.tool_behavior == TOOL_CROWBAR && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
user.visible_message("[user] removes the electronics from the airlock assembly.", \
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
@@ -226,7 +226,7 @@
else
to_chat(user, "<span class='warning'>You cannot add [G] to [src]!</span>")
else if(istype(W, /obj/item/screwdriver) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
else if(W.tool_behavior == TOOL_SCREWDRIVER && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
user.visible_message("[user] finishes the airlock.", \
"<span class='notice'>You start finishing the airlock...</span>")