mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Title screen timer (#17200)
* Atomization * cl --------- Co-authored-by: FluffyGhost <FluffyGhost>
This commit is contained in:
co-authored by
FluffyGhost <FluffyGhost>
parent
4f36be02df
commit
9c28aec1af
@@ -66,6 +66,14 @@
|
||||
name = "Title"
|
||||
screen_loc = "WEST,SOUTH"
|
||||
var/lobby_index = 1
|
||||
var/refresh_timer_id = null
|
||||
|
||||
/obj/screen/new_player/title/Destroy(force)
|
||||
if(refresh_timer_id)
|
||||
deltimer(refresh_timer_id)
|
||||
refresh_timer_id = null
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/screen/new_player/title/Initialize()
|
||||
if(SSatlas.current_sector.sector_lobby_art)
|
||||
@@ -87,7 +95,7 @@
|
||||
spawn(current_map.lobby_transitions)
|
||||
Update()
|
||||
else
|
||||
addtimer(CALLBACK(src, PROC_REF(Update)), current_map.lobby_transitions, TIMER_UNIQUE | TIMER_CLIENT_TIME | TIMER_OVERRIDE)
|
||||
refresh_timer_id = addtimer(CALLBACK(src, PROC_REF(Update)), current_map.lobby_transitions, TIMER_UNIQUE | TIMER_CLIENT_TIME | TIMER_OVERRIDE | TIMER_STOPPABLE)
|
||||
else
|
||||
icon_state = pick(current_map.lobby_screens)
|
||||
else //This should basically never happen.
|
||||
@@ -99,6 +107,9 @@
|
||||
return
|
||||
|
||||
/obj/screen/new_player/title/proc/Update()
|
||||
if(QDELING(src))
|
||||
return
|
||||
|
||||
if(!current_map.lobby_transitions && SSatlas.current_sector.sector_lobby_transitions)
|
||||
return
|
||||
if(!istype(hud) || !isnewplayer(hud.mymob))
|
||||
@@ -112,7 +123,7 @@
|
||||
spawn(current_map.lobby_transitions)
|
||||
Update()
|
||||
else
|
||||
addtimer(CALLBACK(src, PROC_REF(Update)), current_map.lobby_transitions, TIMER_UNIQUE | TIMER_CLIENT_TIME | TIMER_OVERRIDE)
|
||||
refresh_timer_id = addtimer(CALLBACK(src, PROC_REF(Update)), current_map.lobby_transitions, TIMER_UNIQUE | TIMER_CLIENT_TIME | TIMER_OVERRIDE | TIMER_STOPPABLE)
|
||||
|
||||
/obj/screen/new_player/selection
|
||||
var/click_sound = 'sound/effects/menu_click.ogg'
|
||||
|
||||
Reference in New Issue
Block a user