mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Moves Reboot timer to the game screen (#95357)
## About The Pull Request Since I'm trying to move away from the stat panel as part of my project here - https://hackmd.io/443_dE5lRWeEAp9bjGcKYw?view - I thought the reboot timer should be moved out before the stat panel could be made optional, due to its importance to post-round players (especially to know if the round is rebooted). Once the round is over the whole screen kinda becomes pointless, so we can take as much screen space as we can. I put this under the tooltips, using similar behavior to it, like the layer & outline. This is inspired by the Goon roundend, which does pretty much 1:1 what this is. #### Goon's, for reference: <img width="1397" height="787" alt="image" src="https://github.com/user-attachments/assets/309b5d6e-c4dd-4f6f-8b83-2256eecd4569" /> #### Ours: https://github.com/user-attachments/assets/b14efae2-e280-47e9-b3db-f57b2060cce7 It's also non-widescreen friendly ## Why It's Good For The Game Moving things away from the stat panel and to being more player visible is a positive IMO. It's also a necessary step to taking away from reliance away from said stat panel. ## Changelog 🆑 add: The endround timer telling you when a reboot is happening has been taken out of the stat panel and is instead text over your screen (similar to Goon) /🆑
This commit is contained in:
@@ -48,14 +48,6 @@ SUBSYSTEM_DEF(statpanels)
|
||||
if(ETA)
|
||||
global_data += "[ETA] [SSshuttle.emergency.getTimerStr()]"
|
||||
|
||||
if(SSticker.reboot_timer)
|
||||
var/reboot_time = timeleft(SSticker.reboot_timer)
|
||||
if(reboot_time)
|
||||
global_data += "Reboot: [DisplayTimeText(reboot_time, 1)]"
|
||||
// admin must have delayed round end
|
||||
else if(SSticker.ready_for_reboot)
|
||||
global_data += "Reboot: DELAYED"
|
||||
|
||||
src.currentrun = GLOB.clients.Copy()
|
||||
mc_data = null
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
name = "Ticker"
|
||||
priority = FIRE_PRIORITY_TICKER
|
||||
flags = SS_KEEP_TIMING
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
/// state of current round (used by process()) Use the defines GAME_STATE_* !
|
||||
var/current_state = GAME_STATE_STARTUP
|
||||
@@ -69,6 +69,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
/// Why an emergency shuttle was called
|
||||
var/emergency_reason
|
||||
|
||||
///The display of how much time is left before a reboot, given to all clients post-game.
|
||||
var/atom/movable/screen/reboot_timer/reboot_hud
|
||||
/// ID of round reboot timer, if it exists
|
||||
var/reboot_timer = null
|
||||
|
||||
@@ -204,6 +206,13 @@ SUBSYSTEM_DEF(ticker)
|
||||
declare_completion(force_ending)
|
||||
Master.SetRunLevel(RUNLEVEL_POSTGAME)
|
||||
|
||||
if(GAME_STATE_FINISHED)
|
||||
if(ready_for_reboot)
|
||||
if(isnull(reboot_timer))
|
||||
reboot_hud.maptext = MAPTEXT_PIXELLARI("<center>Server reboot \n\ DELAYED</center>")
|
||||
else
|
||||
reboot_hud.maptext = MAPTEXT_PIXELLARI("<center>Server rebooting in:\n\ [DisplayTimeText(timeleft(SSticker.reboot_timer), 1)]</center>")
|
||||
|
||||
/// Checks if the round should be ending, called every ticker tick
|
||||
/datum/controller/subsystem/ticker/proc/check_finished()
|
||||
if(!setup_done)
|
||||
@@ -833,6 +842,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
var/start_wait = world.time
|
||||
UNTIL(round_end_sound_sent || (world.time - start_wait) > (delay * 2)) //don't wait forever
|
||||
if(!isnull(reboot_timer)) //Override existing reboot timers.
|
||||
deltimer(reboot_timer)
|
||||
reboot_timer = addtimer(CALLBACK(src, PROC_REF(reboot_callback), reason, end_string), delay - (world.time - start_wait), TIMER_STOPPABLE)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user