mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 21:49:11 +01:00
ticker followup (#18275)
* ticker followup * . * . * fix the timer * . * move sleep out of ticker * area * strip improper
This commit is contained in:
@@ -454,7 +454,9 @@ SUBSYSTEM_DEF(ticker)
|
||||
return
|
||||
|
||||
if(!delay)
|
||||
delay = CONFIG_GET(number/round_end_countdown) * 10
|
||||
delay = CONFIG_GET(number/round_end_countdown) SECONDS
|
||||
if(delay >= 60 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(announce_countodwn), delay), 60 SECONDS)
|
||||
|
||||
var/skip_delay = check_rights()
|
||||
if(delay_end && !skip_delay)
|
||||
@@ -475,6 +477,16 @@ SUBSYSTEM_DEF(ticker)
|
||||
UNTIL(round_end_sound_sent || (world.time - start_wait) > (delay * 2)) //don't wait forever
|
||||
reboot_timer = addtimer(CALLBACK(src, PROC_REF(reboot_callback), reason, end_string), delay - (world.time - start_wait), TIMER_STOPPABLE)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/announce_countodwn(remaining_time)
|
||||
if(remaining_time >= 60 SECONDS)
|
||||
remaining_time -= 60 SECONDS
|
||||
to_chat(world, span_boldannounce("Rebooting World in [DisplayTimeText(remaining_time)]."))
|
||||
addtimer(CALLBACK(src, PROC_REF(announce_countodwn), remaining_time), 60 SECONDS)
|
||||
return
|
||||
if(remaining_time > 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(announce_countodwn), 0), remaining_time)
|
||||
return
|
||||
to_chat(world, span_boldannounce("Rebooting World."))
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/reboot_callback(reason, end_string)
|
||||
if(end_string)
|
||||
|
||||
Reference in New Issue
Block a user