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
+1 -1
View File
@@ -146,7 +146,7 @@
/obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wirecutters) || I.is_sharp())
if(I.tool_behavior == TOOL_WIRECUTTER || I.is_sharp())
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two gauzes to do this!</span>")
return
+1 -1
View File
@@ -40,7 +40,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool))
if(W.tool_behavior == TOOL_WELDER)
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
return
@@ -20,7 +20,7 @@
state = 0 //fine
/obj/item/stack/tile/light/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/crowbar))
if(O.tool_behavior == TOOL_CROWBAR)
new/obj/item/stack/sheet/metal(user.loc)
amount--
new/obj/item/stack/light_w(user.loc)
@@ -20,7 +20,7 @@
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weldingtool))
if (W.tool_behavior == TOOL_WELDER)
if(get_amount() < 4)
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
return