mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Makes end-of-round sounds play before reboot
Based on their length, they will now start playing early enough to finish playing right as the server reboots, so long as there's time to do so.
This commit is contained in:
@@ -20,4 +20,12 @@ var/list/restricted_camera_networks = list( //Those networks can only be accesse
|
||||
|
||||
var/list/mineral_turfs = list()
|
||||
|
||||
var/list/ruin_landmarks = list()
|
||||
var/list/ruin_landmarks = list()
|
||||
|
||||
var/list/round_end_sounds = list( // Maps available round end sounds to their duration
|
||||
'sound/AI/newroundsexy.ogg' = 2.3 SECONDS,
|
||||
'sound/misc/apcdestroyed.ogg' = 3 SECONDS,
|
||||
'sound/misc/bangindonk.ogg' = 1.6 SECONDS,
|
||||
'sound/goonstation/misc/newround1.ogg' = 6.9 SECONDS,
|
||||
'sound/goonstation/misc/newround2.ogg' = 14.8 SECONDS
|
||||
)
|
||||
|
||||
+8
-4
@@ -269,6 +269,7 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
return
|
||||
else
|
||||
return ..(1)
|
||||
|
||||
var/delay
|
||||
if(!isnull(time))
|
||||
delay = max(0,time)
|
||||
@@ -278,6 +279,13 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
to_chat(world, "<span class='boldannounce'>An admin has delayed the round end.</span>")
|
||||
return
|
||||
to_chat(world, "<span class='boldannounce'>Rebooting world in [delay/10] [delay > 10 ? "seconds" : "second"]. [reason]</span>")
|
||||
|
||||
var/round_end_sound = pick(round_end_sounds)
|
||||
var/sound_length = round_end_sounds[round_end_sound]
|
||||
if(delay > sound_length) // If there's time, play the round-end sound before rebooting
|
||||
spawn(delay - sound_length)
|
||||
if(!ticker.delay_end)
|
||||
world << round_end_sound
|
||||
sleep(delay)
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
@@ -288,10 +296,6 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
log_game("<span class='boldannounce'>Rebooting world. [reason]</span>")
|
||||
//kick_clients_in_lobby("<span class='boldannounce'>The round came to an end with you in the lobby.</span>", 1)
|
||||
|
||||
spawn(0)
|
||||
world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg', 'sound/goonstation/misc/newround1.ogg', 'sound/goonstation/misc/newround2.ogg'))// random end sounds!! - LastyBatsy
|
||||
|
||||
|
||||
processScheduler.stop()
|
||||
|
||||
if(config && config.shutdown_on_reboot)
|
||||
|
||||
Reference in New Issue
Block a user