From f234f759f4a7afcaa09655b834d3d9ad345d04d7 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 30 Sep 2017 11:49:31 -0400 Subject: [PATCH] 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 ae5a96f8c5d..7e65dd5a382 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