[MIRROR] Adds the Aurora Caelus event, the deep-space equivalent of the northern lights. (#5920)

* Adds the Aurora Caelus event, the deep-space equivalent of the northern lights. (#35987)

* Aurora caelus

* I saw that!

* fix?

* Weight increase for testmerge

* Update aurora_caelus.dm

* Adds the Aurora Caelus event, the deep-space equivalent of the northern lights.
This commit is contained in:
CitadelStationBot
2018-03-12 13:13:00 -05:00
committed by Poojawa
parent d6478f19c9
commit 31ffc89cbc
4 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
/datum/round_event_control/aurora_caelus
name = "Aurora Caelus"
typepath = /datum/round_event/aurora_caelus
max_occurrences = 1
weight = 15
earliest_start = 5 MINUTES
/datum/round_event_control/aurora_caelus/canSpawnEvent(players, gamemode)
if(!CONFIG_GET(flag/starlight))
return FALSE
return ..()
/datum/round_event/aurora_caelus
announceWhen = 1
startWhen = 9
endWhen = 50
var/list/aurora_colors = list("#A2FF80", "#A2FF8B", "#A2FF96", "#A2FFA5", "#A2FFB6", "#A2FFC7", "#A2FFDE")
var/aurora_progress = 0 //this cycles from 1 to 7, slowly changing colors from gentle green to gentle blue
/datum/round_event/aurora_caelus/announce()
priority_announce("[station_name()]: A harmless cloud of ions is approaching your station, and will exhaust their energy battering the hull. Nanotrasen has approved a short break for all employees to relax and observe this very rare event. During this time, starlight will be bright but gentle, shifting between quiet green and blue colors. Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space. We hope you enjoy the lights.",
sound = 'sound/misc/notice2.ogg',
sender_override = "Nanotrasen Meteorology Division")
for(var/V in GLOB.player_list)
var/mob/M = V
if((M.client.prefs.toggles & SOUND_MIDI) && is_station_level(M.z))
M.playsound_local(M, 'sound/ambience/aurora_caelus.ogg', 20, FALSE, pressure_affected = FALSE)
/datum/round_event/aurora_caelus/start()
for(var/area in GLOB.sortedAreas)
var/area/A = area
if(initial(A.dynamic_lighting) == DYNAMIC_LIGHTING_IFSTARLIGHT)
for(var/turf/open/space/S in A)
S.set_light(S.light_range * 3, S.light_power * 0.5)
/datum/round_event/aurora_caelus/tick()
if(activeFor % 5 == 0)
aurora_progress++
var/aurora_color = aurora_colors[aurora_progress]
for(var/area in GLOB.sortedAreas)
var/area/A = area
if(initial(A.dynamic_lighting) == DYNAMIC_LIGHTING_IFSTARLIGHT)
for(var/turf/open/space/S in A)
S.set_light(l_color = aurora_color)
/datum/round_event/aurora_caelus/end()
for(var/area in GLOB.sortedAreas)
var/area/A = area
if(initial(A.dynamic_lighting) == DYNAMIC_LIGHTING_IFSTARLIGHT)
for(var/turf/open/space/S in A)
fade_to_black(S)
priority_announce("The aurora caelus event is now ending. Starlight conditions will slowly return to normal. When this has concluded, please return to your workplace and continue work as normal. Have a pleasant shift, [station_name()], and thank you for watching with us.",
sound = 'sound/misc/notice2.ogg',
sender_override = "Nanotrasen Meteorology Division")
/datum/round_event/aurora_caelus/proc/fade_to_black(turf/open/space/S)
set waitfor = FALSE
var/new_light = initial(S.light_range)
while(S.light_range > new_light)
S.set_light(S.light_range - 0.2)
sleep(30)
S.set_light(new_light, initial(S.light_power), initial(S.light_color))

View File

@@ -2,3 +2,5 @@ ambidet1.ogg is Fast Talking by Kevin Macleod. It has been licensed under the CC
It has been cropped for use ingame.
ambidet2.ogg is Night on the Docks, Piano by Kevin Macleod. It has been licensed under CC-BY 3.0 license.
It has been cropped for use ingame, and also fades in.
aurora_caelus.ogg is Music for Manatees, by Kevin Macleod. It has been licensed under CC-BY 3.0 license.
It has been cropped for use ingame, and also fades out.

Binary file not shown.

View File

@@ -1444,6 +1444,7 @@
#include "code\modules\events\anomaly_grav.dm"
#include "code\modules\events\anomaly_pyro.dm"
#include "code\modules\events\anomaly_vortex.dm"
#include "code\modules\events\aurora_caelus.dm"
#include "code\modules\events\blob.dm"
#include "code\modules\events\brand_intelligence.dm"
#include "code\modules\events\camerafailure.dm"