mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
Floodlights can now only be turned on if they are anchored (#21680)
* aight we ball * Sirryan review * Lewcc review
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user