forked from TauCetiStation/TauCetiClassic
/
ticker.dm
569 lines (463 loc) · 20.3 KB
/
ticker.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
var/round_start_time = 0
var/round_start_realtime = 0
SUBSYSTEM_DEF(ticker)
name = "Ticker"
priority = SS_PRIORITY_TICKER
flags = SS_FIRE_IN_LOBBY | SS_KEEP_TIMING
var/const/restart_timeout = 600
var/current_state = GAME_STATE_STARTUP
var/hide_mode = 0
var/datum/game_mode/mode = null
var/event_time = null
var/event = 0
var/login_music // music played in pregame lobby
var/list/datum/mind/minds = list()//The people in the game. Used for objective tracking.
var/random_players = 0 // if set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders
var/list/syndicate_coalition = list() // list of traitor-compatible factions
var/list/factions = list() // list of all factions
var/list/availablefactions = list() // list of factions with openings
var/list/reconverted_antags = list()
var/delay_end = 0 //if set to nonzero, the round will not restart on it's own
var/triai = 0 //Global holder for Triumvirate
var/timeLeft = 1800 //pregame timer
var/totalPlayers = 0 //used for pregame stats on statpanel
var/totalPlayersReady = 0 //used for pregame stats on statpanel
var/obj/screen/cinematic = null
var/force_ending = FALSE
/datum/controller/subsystem/ticker/PreInit()
login_music = pick(\
/*
'sound/music/space.ogg',\
'sound/music/clouds.s3m',\
'sound/music/title1.ogg',\ //disgusting
*/
'sound/music/space_oddity.ogg',\
'sound/music/b12_combined_start.ogg',\
'sound/music/title2.ogg',\
'sound/music/traitor.ogg',\
'sound/lobby/sundown.ogg',\
'sound/lobby/hanging_masses.ogg',\
'sound/lobby/admiral-station-13.ogg',\
'sound/lobby/robocop_gb_intro.ogg')
/datum/controller/subsystem/ticker/Initialize(timeofday)
global.syndicate_code_phrase = generate_code_phrase()
global.syndicate_code_response = generate_code_phrase()
global.code_phrase_highlight_rule = generate_code_regex(global.syndicate_code_phrase, @"\u0430-\u0451") // Russian chars only
global.code_response_highlight_rule = generate_code_regex(global.syndicate_code_response, @"\u0430-\u0451") // Russian chars only
setupFactions()
..()
/datum/controller/subsystem/ticker/fire()
switch(current_state)
if(GAME_STATE_STARTUP)
timeLeft = initial(timeLeft)
to_chat(world, "<b><font color='blue'>Welcome to the pre-game lobby!</font></b>")
to_chat(world, "Please, setup your character and select ready. Game will start in [timeLeft/10] seconds")
current_state = GAME_STATE_PREGAME
log_initialization() // need to dump cached log
if(GAME_STATE_PREGAME)
//lobby stats for statpanels
totalPlayers = 0
totalPlayersReady = 0
for(var/mob/dead/new_player/player in player_list)
++totalPlayers
if(player.ready)
++totalPlayersReady
//countdown
if(timeLeft < 0)
return
timeLeft -= wait
if(timeLeft <= 0)
current_state = GAME_STATE_SETTING_UP
if(GAME_STATE_SETTING_UP)
if(!setup())
//setup failed
current_state = GAME_STATE_STARTUP
if(GAME_STATE_PLAYING)
mode.process(wait * 0.1)
var/mode_finished = mode.check_finished() || (SSshuttle.location == 2 && SSshuttle.alert == 1) || force_ending
if(!mode.explosion_in_progress && mode_finished)
current_state = GAME_STATE_FINISHED
declare_completion()
spawn(50)
for(var/client/C in clients)
C.log_client_ingame_age_to_db()
world.save_last_mode(SSticker.mode.name)
if(blackbox)
blackbox.save_all_data_to_sql()
if(establish_db_connection("erro_round"))
var/DBQuery/query_round_game_mode = dbcon.NewQuery("UPDATE erro_round SET end_datetime = Now(), game_mode_result = '[sanitize_sql(mode.mode_result)]' WHERE id = [global.round_id]")
query_round_game_mode.Execute()
world.send2bridge(
type = list(BRIDGE_ROUNDSTAT),
attachment_title = "Round #[global.round_id] is over",
attachment_color = BRIDGE_COLOR_ANNOUNCE,
)
drop_round_stats()
if (mode.station_was_nuked)
feedback_set_details("end_proper","nuke")
if(!delay_end)
to_chat(world, "<span class='notice'><B>Rebooting due to destruction of station in [restart_timeout/10] seconds</B></span>")
else
feedback_set_details("end_proper","proper completion")
if(!delay_end)
to_chat(world, "<span class='notice'><B>Restarting in [restart_timeout/10] seconds</B></span>")
if(!delay_end)
sleep(restart_timeout)
if(!delay_end)
world.Reboot(end_state = mode.station_was_nuked ? "nuke" : "proper completion") //Can be upgraded to remove unneded sleep here.
else
to_chat(world, "<span class='info bold'>An admin has delayed the round end</span>")
world.send2bridge(
type = list(BRIDGE_ROUNDSTAT),
attachment_msg = "An admin has delayed the round end",
attachment_color = BRIDGE_COLOR_ROUNDSTAT,
)
else
to_chat(world, "<span class='info bold'>An admin has delayed the round end</span>")
world.send2bridge(
type = list(BRIDGE_ROUNDSTAT),
attachment_msg = "An admin has delayed the round end",
attachment_color = BRIDGE_COLOR_ROUNDSTAT,
)
/datum/controller/subsystem/ticker/proc/setup()
to_chat(world, "<span class='boldannounce'>Starting game...</span>")
// Discuss your stuff after the round ends.
if(config.ooc_round_only)
to_chat(world, "<span class='warning bold'>The OOC channel has been globally disabled for the duration of the round!</span>")
ooc_allowed = FALSE
var/init_start = world.timeofday
//Create and announce mode
if(config.is_hidden_gamemode(master_mode))
hide_mode = 1
var/list/datum/game_mode/runnable_modes
if (config.is_modeset(master_mode))
runnable_modes = config.get_runnable_modes(master_mode)
if (runnable_modes.len==0)
current_state = GAME_STATE_PREGAME
to_chat(world, "<B>Unable to choose playable game mode.</B> Reverting to pre-game lobby.")
// Players can initiate gamemode vote again
var/datum/poll/gamemode_vote = SSvote.votes[/datum/poll/gamemode]
if(gamemode_vote)
gamemode_vote.reset_next_vote()
return 0
// hiding forced gamemode in secret
if(master_mode == "secret" && secret_force_mode != "secret")
var/datum/game_mode/smode = config.pick_mode(secret_force_mode)
smode.modeset = master_mode
if(!smode.can_start())
message_admins("<span class='notice'>Unable to force secret [secret_force_mode]. [smode.required_players] players and [smode.required_enemies] eligible antagonists needed.</span>")
else
mode = smode
SSjob.ResetOccupations()
if(!src.mode)
src.mode = pickweight(runnable_modes)
if(src.mode)
var/mtype = src.mode.type
src.mode = new mtype
src.mode.modeset = master_mode
else
// master_mode is config tag of gamemode
src.mode = config.pick_mode(master_mode)
// Before assign the crew setup antag roles without crew jobs
if (!src.mode.assign_outsider_antag_roles())
message_admins("<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players needed.")
qdel(mode)
mode = null
current_state = GAME_STATE_PREGAME
to_chat(world, "<B>Error setting up [master_mode].</B> Reverting to pre-game lobby.")
SSjob.ResetOccupations()
return 0
//Configure mode and assign player to special mode stuff
SSjob.DivideOccupations() //Distribute jobs
var/can_continue = src.mode.pre_setup()//Setup special modes
if(!can_continue)
message_admins("Preparation phase for [mode.name] has failed.")
qdel(mode)
mode = null
current_state = GAME_STATE_PREGAME
to_chat(world, "<B>Error setting up [master_mode].</B> Reverting to pre-game lobby.")
SSjob.ResetOccupations()
return 0
if(!hide_mode)
src.mode.announce()
current_state = GAME_STATE_PLAYING
round_start_time = world.time
round_start_realtime = world.realtime
if(establish_db_connection("erro_round"))
var/DBQuery/query_round_game_mode = dbcon.NewQuery("UPDATE erro_round SET start_datetime = Now(), map_name = '[sanitize_sql(SSmapping.config.map_name)]' WHERE id = [global.round_id]")
query_round_game_mode.Execute()
setup_economy()
create_religion(/datum/religion/chaplain)
//start_landmarks_list = shuffle(start_landmarks_list) //Shuffle the order of spawn points so they dont always predictably spawn bottom-up and right-to-left
create_characters() //Create player characters and transfer them
collect_minds()
equip_characters()
data_core.manifest()
spawn_empty_ai()
Master.RoundStart()
world.send2bridge(
type = list(BRIDGE_ROUNDSTAT),
attachment_title = "Round is started, gamemode - **[master_mode]**",
attachment_msg = "Round #[global.round_id]; Join now: <[BYOND_JOIN_LINK]>",
attachment_color = BRIDGE_COLOR_ANNOUNCE,
)
world.log << "Game start took [(world.timeofday - init_start)/10]s"
to_chat(world, "<FONT color='blue'><B>Enjoy the game!</B></FONT>")
for(var/mob/M in player_list)
M.playsound_local(null, 'sound/AI/enjoyyourstay.ogg', VOL_EFFECTS_VOICE_ANNOUNCEMENT, vary = FALSE, ignore_environment = TRUE)
//Holiday Round-start stuff ~Carn
Holiday_Game_Start()
spawn(0)//Forking here so we dont have to wait for this to finish
mode.post_setup()
SSevents.start_roundstart_event()
for(var/mob/dead/new_player/N in new_player_list)
if(N.client)
N.show_titlescreen()
//Cleanup some stuff
for(var/obj/effect/landmark/start/S in landmarks_list)
//Deleting Startpoints but we need the ai point to AI-ize people later
if (S.name != "AI")
qdel(S)
//Print a list of antagonists to the server log
antagonist_announce()
/*var/admins_number = 0 //For slack maybe?
for(var/client/C)
if(C.holder)
admins_number++
if(admins_number == 0)
send2adminirc("Round has started with no admins online.")*/
return 1
//Plus it provides an easy way to make cinematics for other events. Just use this as a template
/datum/controller/subsystem/ticker/proc/station_explosion_cinematic(station_missed=0, override = null)
if(cinematic)
return
var/screen = "intro_nuke"
var/screen_time = 35
var/explosion = "station_explode_fade_red"
var/summary = "summary_selfdes"
if(mode && !override)
override = mode.name
cinematic = new /obj/screen{icon='icons/effects/station_explosion.dmi';icon_state="station_intact";layer=21;mouse_opacity = MOUSE_OPACITY_TRANSPARENT;screen_loc="1,0";}(src)
for(var/mob/M in mob_list) //nuke kills everyone on station z-level to prevent "hurr-durr I survived"
if(M.client)
M.client.screen += cinematic //show every client the cinematic
if(isliving(M))
var/mob/living/L = M
L.SetSleeping(1 MINUTE, TRUE, TRUE)
switch(station_missed)
if(0) //station was destroyed
if(override == "AI malfunction")
screen = "intro_malf"
screen_time = 76
summary = "summary_malf"
else if(override == "nuclear emergency")
summary = "summary_nukewin"
for(var/mob/M in mob_list) //nuke kills everyone on station z-level to prevent "hurr-durr I survived"
if(M.stat != DEAD) //Just you wait for real destruction!
var/turf/T = get_turf(M)
if(T && is_station_level(T.z))
M.death(0) //No mercy
if(1) //nuke was nearby but (mostly) missed
if(override == "nuclear emergency")
explosion = "station_intact_fade_red"
summary = "summary_nukefail"
else
explosion = null
summary = null
if(2) //nuke was nowhere nearby TODO: a really distant explosion animation
screen = null
screen_time = 50
explosion = null
summary = null
if(screen)
flick(screen, cinematic)
addtimer(CALLBACK(src, .proc/station_explosion_effects, explosion, summary, cinematic), screen_time)
/datum/controller/subsystem/ticker/proc/station_explosion_effects(explosion, summary, /obj/screen/cinematic)
for(var/mob/M in mob_list) //search any goodest
M.playsound_local(null, 'sound/effects/explosionfar.ogg', VOL_EFFECTS_MASTER, vary = FALSE, ignore_environment = TRUE)
if(explosion)
flick(explosion,cinematic)
if(summary)
cinematic.icon_state = summary
addtimer(CALLBACK(src, .proc/station_explosion_rollback_effects, cinematic), 10 SECONDS)
/datum/controller/subsystem/ticker/proc/station_explosion_rollback_effects(cinematic)
for(var/mob/M in mob_list)
if(M.client)
M.client.screen -= cinematic
if(isliving(M))
var/mob/living/L = M
L.SetSleeping(0, TRUE, TRUE)
if(cinematic)
qdel(cinematic) //end the cinematic
/datum/controller/subsystem/ticker/proc/create_characters()
for(var/mob/dead/new_player/player in player_list)
//sleep(1)//Maybe remove??
if(player && player.ready && player.mind)
joined_player_list += player.ckey
if(player.mind.assigned_role=="AI")
player.close_spawn_windows()
player.AIize()
//else if(!player.mind.assigned_role)//Not sure if needed...
// continue
else
player.create_character()
qdel(player)
CHECK_TICK // comment/remove this and uncomment sleep, if crashes at round start will come back.
/datum/controller/subsystem/ticker/proc/collect_minds()
for(var/mob/living/player in player_list)
if(player.mind)
SSticker.minds += player.mind
/datum/controller/subsystem/ticker/proc/equip_characters()
var/captainless=1
for(var/mob/living/carbon/human/player in player_list)
if(player && player.mind && player.mind.assigned_role && player.mind.assigned_role != "default")
if(player.mind.assigned_role == "Captain")
captainless=0
if(ishuman(player))
SSquirks.AssignQuirks(player, player.client, TRUE)
if(player.mind.assigned_role != "MODE")
SSjob.EquipRank(player, player.mind.assigned_role, 0)
if(captainless)
for(var/mob/M in player_list)
if(!isnewplayer(M))
to_chat(M, "Captainship not forced on anyone.")
//cursed code
/datum/controller/subsystem/ticker/proc/declare_completion()
// Now you all can discuss the game.
if(config.ooc_round_only)
to_chat(world, "<span class='notice bold'>The OOC channel has been globally enabled!</span>")
ooc_allowed = TRUE
var/station_evacuated
if(SSshuttle.location > 0)
station_evacuated = 1
var/num_survivors = 0
var/num_escapees = 0
to_chat(world, "<BR><BR><BR><FONT size=3><B>The round has ended.</B></FONT>")
//Player status report
for(var/mob/Player in mob_list)//todo: remove in favour of /game_mode/proc/declare_completion
if(Player.mind && !isnewplayer(Player))
if(Player.stat != DEAD && !isbrain(Player))
num_survivors++
if(station_evacuated) //If the shuttle has already left the station
var/turf/playerTurf = get_turf(Player)
if(!is_centcom_level(playerTurf.z))
to_chat(Player, "<font color='blue'><b>You managed to survive, but were marooned on [station_name()]...</b></FONT>")
else
num_escapees++
to_chat(Player, "<font color='green'><b>You managed to survive the events on [station_name()] as [Player.real_name].</b></FONT>")
else
to_chat(Player, "<font color='green'><b>You managed to survive the events on [station_name()] as [Player.real_name].</b></FONT>")
else
to_chat(Player, "<font color='red'><b>You did not survive the events on [station_name()]...</b></FONT>")
//Round statistics report
var/datum/station_state/end_state = new /datum/station_state()
end_state.count()
var/station_integrity = min(round( 100 * start_state.score(end_state), 0.1), 100)
to_chat(world, "<BR>[TAB]Shift Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[add_zero("[world.time / 10 % 60]", 2)]</B>")
to_chat(world, "<BR>[TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>")
if(joined_player_list.len)
to_chat(world, "<BR>[TAB]Total Population: <B>[joined_player_list.len]</B>")
if(station_evacuated)
to_chat(world, "<BR>[TAB]Evacuation Rate: <B>[num_escapees] ([round((num_escapees/joined_player_list.len)*100, 0.1)]%)</B>")
to_chat(world, "<BR>[TAB]Survival Rate: <B>[num_survivors] ([round((num_survivors/joined_player_list.len)*100, 0.1)]%)</B>")
to_chat(world, "<BR>")
//Silicon laws report
var/ai_completions = "<h1>Round End Information</h1><HR>"
if(silicon_list.len)
ai_completions += "<h2>Silicons Laws</h2>"
ai_completions += "<div class='Section'>"
for (var/mob/living/silicon/ai/aiPlayer in ai_list)
if(!aiPlayer)
continue
var/icon/flat = getFlatIcon(aiPlayer)
end_icons += flat
var/tempstate = end_icons.len
var/aikey = aiPlayer.mind ? aiPlayer.mind.key : aiPlayer.key
if (aiPlayer.stat != DEAD)
ai_completions += {"<BR><B><img src="logo_[tempstate].png"> [aiPlayer.name] (Played by: [aikey])'s laws at the end of the game were:</B>"}
else
ai_completions += {"<BR><B><img src="logo_[tempstate].png"> [aiPlayer.name] (Played by: [aikey])'s laws when it was deactivated were:</B>"}
ai_completions += "<BR>[aiPlayer.write_laws()]"
if (aiPlayer.connected_robots.len)
var/robolist = "<BR><B>The AI's loyal minions were:</B> "
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
var/robokey = robo.mind ? robo.mind.key : robo.key
robolist += "[robo.name][robo.stat?" (Deactivated) (Played by: [robokey]), ":" (Played by: [robokey]), "]"
ai_completions += "[robolist]"
var/dronecount = 0
for (var/mob/living/silicon/robot/robo in silicon_list)
if(!robo)
continue
if(istype(robo,/mob/living/silicon/robot/drone))
dronecount++
continue
var/icon/flat = getFlatIcon(robo,exact=1)
end_icons += flat
var/tempstate = end_icons.len
var/robokey = robo.mind ? robo.mind.key : robo.key
if (!robo.connected_ai)
if (robo.stat != DEAD)
ai_completions += {"<BR><B><img src="logo_[tempstate].png"> [robo.name] (Played by: [robokey]) survived as an AI-less borg! Its laws were:</B>"}
else
ai_completions += {"<BR><B><img src="logo_[tempstate].png"> [robo.name] (Played by: [robokey]) was unable to survive the rigors of being a cyborg without an AI. Its laws were:</B>"}
else
ai_completions += {"<BR><B><img src="logo_[tempstate].png"> [robo.name] (Played by: [robokey]) [robo.stat!=2?"survived":"perished"] as a cyborg slaved to [robo.connected_ai]! Its laws were:</B>"}
ai_completions += "<BR>[robo.write_laws()]"
if(dronecount)
ai_completions += "<br><B>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] this round.</B>"
ai_completions += "</div>"
mode.declare_completion()//To declare normal completion.
ai_completions += "<br><h2>Mode Result</h2>"
if(mode.completion_text)//extendet has empty completion text
ai_completions += "<div class='Section'>[mode.completion_text]</div>"
//calls auto_declare_completion_* for all modes
for(var/handler in typesof(/datum/game_mode/proc))
if (findtext("[handler]","auto_declare_completion_"))
ai_completions += "[call(mode, handler)()]"
//Print a list of antagonists to the server log
antagonist_announce()
// Add AntagHUD to everyone, see who was really evil the whole time!
for(var/datum/atom_hud/antag/H in global.huds)
for(var/m in global.player_list)
var/mob/M = m
H.add_hud_to(M)
if(SSjunkyard)
SSjunkyard.save_stats()
scoreboard(ai_completions)
teleport_players_to_eorg_area()
//Ask the event manager to print round end information
SSevents.RoundEnd()
return 1
/datum/controller/subsystem/ticker/proc/teleport_players_to_eorg_area()
if(!config.deathmatch_arena)
return
for(var/mob/living/M in global.player_list)
if(!M.client.prefs.eorg_enabled)
continue
var/mob/living/carbon/human/L = new(pick(eorgwarp))
M.mind.transfer_to(L)
L.equipOutfit(/datum/outfit/arena)
L.name = "Gladiator ([rand(1, 1000)])"
L.real_name = L.name
to_chat(L, "<span class='warning'>Welcome to End of Round Deathmatch Arena! Go hog wild and let out some steam!.</span>")
/datum/controller/subsystem/ticker/proc/achievement_declare_completion()
var/text = "<br><FONT size = 5><b>Additionally, the following players earned achievements:</b></FONT>"
var/icon/cup = icon('icons/obj/drinks.dmi', "golden_cup")
end_icons += cup
var/tempstate = end_icons.len
for(var/winner in achievements)
var/winner_text = "<b>[winner["key"]]</b> as <b>[winner["name"]]</b> won \"<b>[winner["title"]]</b>\"! \"[winner["desc"]]\""
text += {"<br><img src="logo_[tempstate].png"> [winner_text]"}
return text
/datum/controller/subsystem/ticker/proc/start_now()
if(SSticker.current_state != GAME_STATE_PREGAME)
return FALSE
SSticker.can_fire = TRUE
SSticker.timeLeft = 0
return TRUE
/world/proc/has_round_started()
return (SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
/world/proc/has_round_finished()
return (SSticker && SSticker.current_state >= GAME_STATE_FINISHED)
/world/proc/is_round_preparing()
return (SSticker && SSticker.current_state == GAME_STATE_PREGAME)