mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 13:42:44 +00:00
Adds several new map/event oriented objects (#5757)
* Adds some helpful effects to enhance PoI construction. * Adds several features for mappers. * Test map please go
This commit is contained in:
@@ -176,6 +176,11 @@
|
||||
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
|
||||
var/auto_flicker = FALSE // If true, will constantly flicker, so long as someone is around to see it (otherwise its a waste of CPU).
|
||||
|
||||
/obj/machinery/light/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
// the smaller bulb light fixture
|
||||
|
||||
/obj/machinery/light/small
|
||||
@@ -187,6 +192,9 @@
|
||||
desc = "A small lighting fixture."
|
||||
light_type = /obj/item/weapon/light/bulb
|
||||
|
||||
/obj/machinery/light/small/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
/obj/machinery/light/flamp
|
||||
icon_state = "flamp1"
|
||||
base_state = "flamp"
|
||||
@@ -199,10 +207,18 @@
|
||||
light_type = /obj/item/weapon/light/bulb
|
||||
var/lamp_shade = 1
|
||||
|
||||
/obj/machinery/light/flamp/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
|
||||
/obj/machinery/light/small/emergency
|
||||
brightness_range = 4
|
||||
brightness_color = "#da0205"
|
||||
|
||||
/obj/machinery/light/small/emergency/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
|
||||
/obj/machinery/light/spot
|
||||
name = "spotlight"
|
||||
fitting = "large tube"
|
||||
@@ -210,6 +226,10 @@
|
||||
brightness_range = 12
|
||||
brightness_power = 0.9
|
||||
|
||||
/obj/machinery/light/spot/flicker
|
||||
auto_flicker = TRUE
|
||||
|
||||
|
||||
/obj/machinery/light/built/New()
|
||||
status = LIGHT_EMPTY
|
||||
update(0)
|
||||
@@ -292,7 +312,8 @@
|
||||
update_icon()
|
||||
if(on)
|
||||
if(light_range != brightness_range || light_power != brightness_power || light_color != brightness_color)
|
||||
switchcount++
|
||||
if(!auto_flicker)
|
||||
switchcount++
|
||||
if(rigged)
|
||||
if(status == LIGHT_OK && trigger)
|
||||
|
||||
@@ -675,6 +696,13 @@
|
||||
if(on)
|
||||
use_power(light_range * LIGHTING_POWER_FACTOR, LIGHT)
|
||||
|
||||
if(auto_flicker && !flickering)
|
||||
if(check_for_player_proximity(src, radius = 12, ignore_ghosts = FALSE, ignore_afk = TRUE))
|
||||
seton(TRUE) // Lights must be on to flicker.
|
||||
flicker(5)
|
||||
else
|
||||
seton(FALSE) // Otherwise keep it dark and spooky for when someone shows up.
|
||||
|
||||
|
||||
// called when area power state changes
|
||||
/obj/machinery/light/power_change()
|
||||
|
||||
Reference in New Issue
Block a user