mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-13 17:08:53 +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:
@@ -400,7 +400,7 @@
|
||||
if(install_component(W, user))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behavior == TOOL_WRENCH)
|
||||
if(all_components.len)
|
||||
to_chat(user, "<span class='warning'>Remove all components from \the [src] before disassembling it.</span>")
|
||||
return
|
||||
@@ -410,7 +410,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
if(W.tool_behavior == TOOL_WELDER)
|
||||
if(obj_integrity == max_integrity)
|
||||
to_chat(user, "<span class='warning'>\The [src] does not require repairs.</span>")
|
||||
return
|
||||
@@ -424,7 +424,7 @@
|
||||
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behavior == TOOL_SCREWDRIVER)
|
||||
if(!all_components.len)
|
||||
to_chat(user, "<span class='warning'>This device doesn't have any components installed.</span>")
|
||||
return
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/obj/item/computer_hardware/attackby(obj/item/I, mob/living/user)
|
||||
// Multitool. Runs diagnostics
|
||||
if(istype(I, /obj/item/multitool))
|
||||
if(I.tool_behavior == TOOL_MULTITOOL)
|
||||
to_chat(user, "***** DIAGNOSTICS REPORT *****")
|
||||
diagnostics(user)
|
||||
to_chat(user, "******************************")
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
/obj/item/computer_hardware/ai_slot/attackby(obj/item/I, mob/living/user)
|
||||
if(..())
|
||||
return
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behavior == TOOL_SCREWDRIVER)
|
||||
to_chat(user, "<span class='notice'>You press down on the manual eject button with \the [I].</span>")
|
||||
try_eject(,user,1)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
/obj/item/computer_hardware/card_slot/attackby(obj/item/I, mob/living/user)
|
||||
if(..())
|
||||
return
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behavior == TOOL_SCREWDRIVER)
|
||||
to_chat(user, "<span class='notice'>You press down on the manual eject button with \the [I].</span>")
|
||||
try_eject(0,user)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user