mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
Fixes issues where players can enter the game without accepted interviews. (#67565)
* Feex * Buttonguard * Re-add removed code from debugging * Remove duplicate line * Be nice
This commit is contained in:
@@ -10,6 +10,13 @@
|
||||
mind.active = TRUE
|
||||
mind.set_current(src)
|
||||
|
||||
// Check if user should be added to interview queue
|
||||
if (!client.holder && CONFIG_GET(flag/panic_bunker) && CONFIG_GET(flag/panic_bunker_interview) && !(client.ckey in GLOB.interviews.approved_ckeys))
|
||||
var/required_living_minutes = CONFIG_GET(number/panic_bunker_living)
|
||||
var/living_minutes = client.get_exp_living(TRUE)
|
||||
if (required_living_minutes >= living_minutes)
|
||||
client.interviewee = TRUE
|
||||
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
@@ -32,15 +39,15 @@
|
||||
var/datum/asset/asset_datum = get_asset_datum(/datum/asset/simple/lobby)
|
||||
asset_datum.send(client)
|
||||
|
||||
// Check if user should be added to interview queue
|
||||
if (!client.holder && CONFIG_GET(flag/panic_bunker) && CONFIG_GET(flag/panic_bunker_interview) && !(client.ckey in GLOB.interviews.approved_ckeys))
|
||||
var/required_living_minutes = CONFIG_GET(number/panic_bunker_living)
|
||||
var/living_minutes = client.get_exp_living(TRUE)
|
||||
if (required_living_minutes >= living_minutes)
|
||||
client.interviewee = TRUE
|
||||
register_for_interview()
|
||||
return
|
||||
// The parent call for Login() may do a bunch of stuff, like add verbs.
|
||||
// Delaying the register_for_interview until the very end makes sure it can clean everything up
|
||||
// and set the player's client up for interview.
|
||||
if(client.interviewee)
|
||||
register_for_interview()
|
||||
return
|
||||
|
||||
if(SSticker.current_state < GAME_STATE_SETTING_UP)
|
||||
var/tl = SSticker.GetTimeLeft()
|
||||
to_chat(src, "Please set up your character and select \"Ready\". The game will start [tl > 0 ? "in about [DisplayTimeText(tl)]" : "soon"].")
|
||||
|
||||
|
||||
|
||||
@@ -439,5 +439,6 @@
|
||||
if (I)
|
||||
I.ui_interact(src)
|
||||
|
||||
// Add verb for re-opening the interview panel, and re-init the verbs for the stat panel
|
||||
// Add verb for re-opening the interview panel, fixing chat and re-init the verbs for the stat panel
|
||||
add_verb(src, /mob/dead/new_player/proc/open_interview)
|
||||
add_verb(client, /client/verb/fix_tgui_panel)
|
||||
|
||||
Reference in New Issue
Block a user