Skip to content

Commit

Permalink
Turrets now emit light (Aurorastation#12211)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberyk authored Jul 23, 2021
1 parent 7fc4810 commit 856fc04
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions code/game/machinery/portable_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

req_one_access = list(access_security, access_heads)

light_range = 3
light_power = 2

var/raised = 0 //if the turret cover is "open" and the turret is raised
var/raising= 0 //if the turret is currently opening or closing its cover
var/health = 80 //the turret's health
Expand Down Expand Up @@ -171,6 +174,7 @@
if(stat & BROKEN)
icon_state = "turret_[sprite_set]_broken"
underlays += "cover_open_[cover_set]"
set_light(0)
else if(raised || raising)
if(powered() && enabled)
if(!lethal_icon)
Expand All @@ -185,6 +189,11 @@
else
icon_state = "cover_[cover_set]"

if(stat & NOPOWER)
set_light(0)
else
set_light(light_range, light_power)

/obj/machinery/porta_turret/proc/isLocked(mob/user)
if(ailock && issilicon(user))
to_chat(user, SPAN_WARNING("There seems to be a firewall preventing you from accessing this device."))
Expand Down
6 changes: 6 additions & 0 deletions html/changelogs/alberyk-turret.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: Alberyk

delete-after: True

changes:
- rscadd: "Turrets now emit light when powered."

0 comments on commit 856fc04

Please sign in to comment.