mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Add reboot countdown to stat panel (#88438)
## About The Pull Request Rewrite ticker `Reboot` proc slightly to use a timer and callback for the delay before the reboot, tracks this timer in the stat panel for players to see. Also adds a verb to cancel a pending reboot independent of the delay round end verb. ## Why It's Good For The Game It's nice to be able to see exactly how much time is left until the server restarts, and it's even nicer to see that the round end has been delayed when the "admin has delayed round end" message gets buried in a fast moving chat. ## Changelog 🆑 qol: The time until the server reboots is now visible in the status tab. admin: Added a cancel reboot verb to the server tab. /🆑
This commit is contained in:
@@ -66,6 +66,12 @@ ADMIN_VERB(restart, R_SERVER, "Reboot World", "Restarts the world immediately.",
|
||||
#undef HARDEST_RESTART
|
||||
#undef TGS_RESTART
|
||||
|
||||
ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world reboot.", ADMIN_CATEGORY_SERVER)
|
||||
if(!SSticker.cancel_reboot(user))
|
||||
return
|
||||
log_admin("[key_name(user)] cancelled the pending world reboot.")
|
||||
message_admins("[key_name_admin(user)] cancelled the pending world reboot.")
|
||||
|
||||
ADMIN_VERB(end_round, R_SERVER, "End Round", "Forcibly ends the round and allows the server to restart normally.", ADMIN_CATEGORY_SERVER)
|
||||
var/confirm = tgui_alert(user, "End the round and restart the game world?", "End Round", list("Yes", "Cancel"))
|
||||
if(confirm != "Yes")
|
||||
@@ -131,6 +137,8 @@ ADMIN_VERB(delay_round_end, R_SERVER, "Delay Round End", "Prevent the server fro
|
||||
|
||||
SSticker.delay_end = TRUE
|
||||
SSticker.admin_delay_notice = delay_reason
|
||||
if(SSticker.reboot_timer)
|
||||
SSticker.cancel_reboot(user)
|
||||
|
||||
log_admin("[key_name(user)] delayed the round end for reason: [SSticker.admin_delay_notice]")
|
||||
message_admins("[key_name_admin(user)] delayed the round end for reason: [SSticker.admin_delay_notice]")
|
||||
|
||||
Reference in New Issue
Block a user