Skip to content

Commit

Permalink
Floodlights can now only be turned on if they are anchored (ParadiseS…
Browse files Browse the repository at this point in the history
…S13#21680)

* aight we ball

* Sirryan review

* Lewcc review
  • Loading branch information
DGamerL authored Jul 24, 2023
1 parent 2734383 commit f04a318
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/game/machinery/floodlight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f04a318

Please sign in to comment.