mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Fixes a Modulo Moment in lobby screens (#21869)
see title (++index % num_lobby_screens) will only ever get you [0, num_lobby_screens), which is why it maxes with 1. but that still ignores the last screen. so instead we just do the smart thing which is to add +1 after.
This commit is contained in:
@@ -138,9 +138,11 @@ ABSTRACT_TYPE(/atom/movable/screen/new_player)
|
||||
icon_state = pick(SSatlas.current_map.lobby_screens)
|
||||
return
|
||||
|
||||
if(length(SSatlas.current_map.lobby_screens) >= 2)
|
||||
var/num_lobby_screens = length(SSatlas.current_map.lobby_screens)
|
||||
|
||||
if(num_lobby_screens >= 2)
|
||||
//Advance to the next icon
|
||||
lobby_screen_index = max(++lobby_screen_index % length(SSatlas.current_map.lobby_screens), 1)
|
||||
lobby_screen_index = (lobby_screen_index % num_lobby_screens) + 1
|
||||
|
||||
animate(src, alpha = 0, time = 1 SECOND)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user