From 96294e625c4f9b893c3a240b0ae68f6831f4d60b Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 27 Sep 2020 03:26:42 -0700 Subject: [PATCH 1/3] Prevent observe before server is finished starting --- code/controllers/subsystem/ticker.dm | 2 ++ code/modules/mob/new_player/new_player.dm | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index e53c91ac20d..3a1ba7595c0 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -65,6 +65,8 @@ SUBSYSTEM_DEF(ticker) to_chat(world, "Please, setup your character and select ready. Game will start in [config.pregame_timestart] seconds") current_state = GAME_STATE_PREGAME fire() // TG says this is a good idea + for(var/mob/new_player/N in GLOB.player_list) + N.new_player_panel_proc() // to enable the observe option if(GAME_STATE_PREGAME) if(!SSticker.ticker_going) // This has to be referenced like this, and I dont know why. If you dont put SSticker. it will break return diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index f53daba6626..dce78c2f33c 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -77,7 +77,10 @@ else output += "

Global Antag Candidacy" output += "
You are [client.skip_antag ? "ineligible" : "eligible"] for all antag roles.

" - output += "

Observe

" + if(!SSticker || SSticker.current_state == GAME_STATE_STARTUP) + output += "

Observe (starting up...)

" + else + output += "

Observe

" if(GLOB.join_tos) output += "

Terms of Service

" @@ -184,6 +187,10 @@ to_chat(usr, "You must consent to the terms of service before you can join!") return 0 + if(!SSticker || SSticker.current_state == GAME_STATE_STARTUP) + to_chat(usr, "You must wait for the server to finish starting before you can join!") + return 0 + if(alert(src,"Are you sure you wish to observe? You cannot normally join the round after doing this!","Player Setup","Yes","No") == "Yes") if(!client) return 1 From 7358d9fea03c906311a656f282bf841227d87bfe Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 27 Sep 2020 03:35:29 -0700 Subject: [PATCH 2/3] fix window size --- code/modules/mob/new_player/new_player.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index dce78c2f33c..a3886f905ec 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -106,7 +106,7 @@ output += "" - var/datum/browser/popup = new(src, "playersetup", "
New Player Options
", 220, 290) + var/datum/browser/popup = new(src, "playersetup", "
New Player Options
", 240, 330) popup.set_window_options("can_close=0") popup.set_content(output) popup.open(0) From f6ea90fa1e66e5f759b011b8621584a3682679f1 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 27 Sep 2020 04:07:29 -0700 Subject: [PATCH 3/3] AA requests --- code/modules/mob/new_player/new_player.dm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a3886f905ec..2bb2466ce02 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -78,7 +78,7 @@ output += "
You are [client.skip_antag ? "ineligible" : "eligible"] for all antag roles.

" if(!SSticker || SSticker.current_state == GAME_STATE_STARTUP) - output += "

Observe (starting up...)

" + output += "

Observe (Please wait...)

" else output += "

Observe

" @@ -147,7 +147,8 @@ /mob/new_player/Topic(href, href_list[]) - if(!client) return 0 + if(!client) + return FALSE if(href_list["consent_signed"]) var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") @@ -165,12 +166,12 @@ if(href_list["show_preferences"]) client.prefs.ShowChoices(src) - return 1 + return TRUE if(href_list["ready"]) if(!tos_consent) to_chat(usr, "You must consent to the terms of service before you can join!") - return 0 + return FALSE ready = !ready new_player_panel_proc() @@ -185,11 +186,11 @@ if(href_list["observe"]) if(!tos_consent) to_chat(usr, "You must consent to the terms of service before you can join!") - return 0 + return FALSE if(!SSticker || SSticker.current_state == GAME_STATE_STARTUP) to_chat(usr, "You must wait for the server to finish starting before you can join!") - return 0 + return FALSE if(alert(src,"Are you sure you wish to observe? You cannot normally join the round after doing this!","Player Setup","Yes","No") == "Yes") if(!client) @@ -223,12 +224,12 @@ return 1 if(href_list["tos"]) privacy_consent() - return 0 + return FALSE if(href_list["late_join"]) if(!tos_consent) to_chat(usr, "You must consent to the terms of service before you can join!") - return 0 + return FALSE if(!SSticker || SSticker.current_state != GAME_STATE_PLAYING) to_chat(usr, "The round is either not ready, or has already finished...") return @@ -236,7 +237,7 @@ if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist) to_chat(src, alert("You are currently not whitelisted to play [client.prefs.species].")) - return 0 + return FALSE LateChoices() @@ -255,7 +256,7 @@ if(client.prefs.species in GLOB.whitelisted_species) if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist) to_chat(src, alert("You are currently not whitelisted to play [client.prefs.species].")) - return 0 + return FALSE AttemptLateSpawn(href_list["SelectedJob"],client.prefs.spawnpoint) return