Turrets now emit light (#12211)

This commit is contained in:
Alberyk
2021-07-23 14:48:21 +02:00
committed by GitHub
parent 7fc4810007
commit 856fc048bb
2 changed files with 15 additions and 0 deletions
+9
View File
@@ -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
@@ -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)
@@ -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."))
+6
View File
@@ -0,0 +1,6 @@
author: Alberyk
delete-after: True
changes:
- rscadd: "Turrets now emit light when powered."