Floodlights can now only be turned on if they are anchored (#21680)

* aight we ball

* Sirryan review

* Lewcc review
This commit is contained in:
DGamerL
2023-07-24 11:11:59 +02:00
committed by GitHub
parent 273438330b
commit f04a318dfd
+5
View File
@@ -71,6 +71,9 @@
if(cell.charge <= 0)
to_chat(user, "<span class='warning'>[src] hardly glows at all! Seems like the <b>power cell is empty</b>.</span>")
return
if(!anchored)
to_chat(user, "<span class='warning'>[src] must be anchored first!</span>")
return
on = TRUE
to_chat(user, "<span class='notice'>You turn on the light.</span>")
set_light(brightness_on)
@@ -140,6 +143,8 @@
. = TRUE
if(!I.tool_use_check(user, 0))
return
if(anchored)
extinguish_light()
default_unfasten_wrench(user, I)
/obj/machinery/floodlight/extinguish_light(force = FALSE)