mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 09:34:21 +01:00
Adds ability to auto-follow debris for meteor events (#20917)
* general outline * Works pretty well at this point? * Fixes up some other smaller things * Improve documentation * Removes some unused code * Removes a stray comment too * minor reorganization * thanks gdn * qdel null * Remove unused proc * Remove some other unused functionality * sirryan review * merges
This commit is contained in:
@@ -3,8 +3,14 @@
|
||||
endWhen = 7
|
||||
var/next_meteor = 6
|
||||
var/waves = 1
|
||||
var/obj/screen/alert/augury/meteor/screen_alert
|
||||
|
||||
/datum/event/meteor_wave/setup()
|
||||
for(var/mob/dead/observer/O in GLOB.dead_mob_list)
|
||||
var/obj/screen/alert/augury/meteor/A = O.throw_alert("\ref[src]_augury", /obj/screen/alert/augury/meteor)
|
||||
if(A)
|
||||
screen_alert = A
|
||||
|
||||
waves = severity * rand(1,3)
|
||||
|
||||
/datum/event/meteor_wave/announce()
|
||||
@@ -16,6 +22,9 @@
|
||||
|
||||
//meteor showers are lighter and more common,
|
||||
/datum/event/meteor_wave/tick()
|
||||
// keep observers updated with the alert
|
||||
for(var/mob/dead/observer/O in GLOB.dead_mob_list)
|
||||
O.throw_alert("\ref[src]_augury", /obj/screen/alert/augury/meteor)
|
||||
if(waves && activeFor >= next_meteor)
|
||||
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(spawn_meteors), get_meteor_count(), get_meteors())
|
||||
next_meteor += rand(15, 30) / severity
|
||||
@@ -23,6 +32,9 @@
|
||||
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
|
||||
|
||||
/datum/event/meteor_wave/end()
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
M.clear_alert("\ref[src]_augury")
|
||||
QDEL_NULL(screen_alert)
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
GLOB.minor_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
|
||||
|
||||
Reference in New Issue
Block a user