Better round start time handling after using delay (#25035)

This commit is contained in:
Mikhail Dzianishchyts
2024-04-22 20:53:14 +00:00
committed by GitHub
parent 2d1d7e283b
commit 00be61a811
4 changed files with 8 additions and 10 deletions
+4 -7
View File
@@ -81,9 +81,9 @@ SUBSYSTEM_DEF(ticker)
switch(current_state)
if(GAME_STATE_STARTUP)
// This is ran as soon as the MC starts firing, and should only run ONCE, unless startup fails
round_start_time = world.time + (GLOB.configuration.general.lobby_time SECONDS)
pregame_timeleft = GLOB.configuration.general.lobby_time SECONDS
to_chat(world, "<b><span class='darkmblue'>Welcome to the pre-game lobby!</span></b>")
round_start_time = world.time + pregame_timeleft
to_chat(world, "<B><span class='darkmblue'>Welcome to the pre-game lobby!</span></B>")
to_chat(world, "Please, setup your character and select ready. Game will start in [GLOB.configuration.general.lobby_time] seconds")
current_state = GAME_STATE_PREGAME
fire() // TG says this is a good idea
@@ -95,12 +95,9 @@ SUBSYSTEM_DEF(ticker)
return
// This is so we dont have sleeps in controllers, because that is a bad, bad thing
if(!delay_end)
pregame_timeleft = max(0, round_start_time - world.time) // Normal lobby countdown when roundstart was not delayed
else
pregame_timeleft = max(0, pregame_timeleft - wait) // If roundstart was delayed, we should resume the countdown where it left off
pregame_timeleft = max(0, round_start_time - world.time)
if(pregame_timeleft <= 600 && !tipped) // 60 seconds
if(pregame_timeleft <= 1 MINUTES && !tipped)
send_tip_of_the_round()
tipped = TRUE
@@ -1,9 +1,9 @@
#define CHALLENGE_TELECRYSTALS 1400
#define CHALLENGE_TIME_LIMIT 6000
#define CHALLENGE_TIME_LIMIT 10 MINUTES
#define CHALLENGE_SCALE_PLAYER 1 // How many player per scaling bonus
#define CHALLENGE_SCALE_BONUS 10 // How many TC per scaling bonus
#define CHALLENGE_MIN_PLAYERS 50
#define CHALLENGE_SHUTTLE_DELAY 18000 //30 minutes, so the ops have at least 10 minutes before the shuttle is callable. Gives the nuke ops at least 15 minutes before shuttle arrive.
#define CHALLENGE_SHUTTLE_DELAY 30 MINUTES // So the ops have at least 10 minutes before the shuttle is callable. Gives the nuke ops at least 15 minutes before shuttle arrive.
/obj/item/nuclear_challenge
name = "Declaration of War (Challenge Mode)"
+1
View File
@@ -613,6 +613,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
log_admin("[key_name(usr)] delayed the game.")
else
SSticker.ticker_going = TRUE
SSticker.round_start_time = world.time + SSticker.pregame_timeleft
to_chat(world, "<b>The game will start soon.</b>")
log_admin("[key_name(usr)] removed the delay.")
+1 -1
View File
@@ -1,4 +1,4 @@
#define SYNDICATE_CHALLENGE_TIMER 12000 //20 minutes
#define SYNDICATE_CHALLENGE_TIMER 20 MINUTES
/obj/machinery/computer/shuttle/syndicate
name = "syndicate shuttle terminal"