mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
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
This commit is contained in:
committed by
duncathan salt
parent
6f0ba150dc
commit
4a6e0c6b00
@@ -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))
|
||||
Binary file not shown.
@@ -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.
|
||||
|
||||
@@ -1420,6 +1420,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"
|
||||
|
||||
Reference in New Issue
Block a user