From c56bb27bbd458c69fea81c54c8a90a558eec1c2a Mon Sep 17 00:00:00 2001 From: oranges Date: Mon, 2 Oct 2017 08:43:24 +1300 Subject: [PATCH 1/2] Merge pull request #31167 from tgstation/Cyberboss-patch-2 Prompt for observer confirmation now happens when you click it initially --- .../modules/mob/dead/new_player/new_player.dm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index aca1d9b63f..01a5b166d3 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -115,6 +115,15 @@ //no longer is required if(SSticker.current_state <= GAME_STATE_PREGAME) ready = tready + + var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") + + if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes") + ready = PLAYER_NOT_READY + src << browse(null, "window=playersetup") //closes the player setup window + new_player_panel() + return FALSE + //if it's post initialisation and they're trying to observe we do the needful if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE) ready = tready @@ -259,15 +268,7 @@ if(QDELETED(src) || !src.client) ready = PLAYER_NOT_READY return FALSE - - var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") - - if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes") - ready = PLAYER_NOT_READY - src << browse(null, "window=playersetup") //closes the player setup window - new_player_panel() - return FALSE - + var/mob/dead/observer/observer = new() spawning = TRUE