mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Sanity check for circuit boards without build_path (#18814)
* Sanity check for circuit boards * Adds analogous check for machine boards Co-authored-by: Gatchapod <Gatchapod@users.noreply.github.com>
This commit is contained in:
@@ -551,6 +551,10 @@
|
||||
to_chat(user, "<span class='warning'>[src] does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
|
||||
if(!B.build_path)
|
||||
to_chat(user, "<span class='warning'>This is not a functional computer circuit board!</span>")
|
||||
return
|
||||
|
||||
B.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You place [B] inside [src].</span>")
|
||||
name += " ([B.board_name])"
|
||||
|
||||
@@ -99,6 +99,9 @@
|
||||
if(istype(P, /obj/item/circuitboard))
|
||||
var/obj/item/circuitboard/B = P
|
||||
if(B.board_type == "machine")
|
||||
if(!B.build_path)
|
||||
to_chat(user, "<span class='warning'>This is not a functional machine board!</span>")
|
||||
return
|
||||
playsound(src.loc, B.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You add the circuit board to the frame.</span>")
|
||||
circuit = P
|
||||
|
||||
Reference in New Issue
Block a user