mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[MIRROR] Interview System / Soft Panic Bunker (#1458)
* Interview System / Soft Panic Bunker * a Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com> Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
co-authored by
Bobbahbrown
Azarak
parent
6c58c5bad7
commit
91773c46da
@@ -204,3 +204,6 @@
|
||||
var/next_move_dir_add
|
||||
/// On next move, subtract this dir from the move that would otherwise be done
|
||||
var/next_move_dir_sub
|
||||
|
||||
/// If the client is currently under the restrictions of the interview system
|
||||
var/interviewee = FALSE
|
||||
|
||||
@@ -216,6 +216,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
tgui_panel = new(src)
|
||||
|
||||
GLOB.ahelp_tickets.ClientLogin(src)
|
||||
GLOB.interviews.client_login(src)
|
||||
var/connecting_admin = FALSE //because de-admined admins connecting should be treated like admins.
|
||||
//Admin Authorisation
|
||||
holder = GLOB.admin_datums[ckey]
|
||||
@@ -430,26 +431,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if(!tooltips)
|
||||
tooltips = new /datum/tooltip(src)
|
||||
|
||||
var/list/topmenus = GLOB.menulist[/datum/verbs/menu]
|
||||
for (var/thing in topmenus)
|
||||
var/datum/verbs/menu/topmenu = thing
|
||||
var/topmenuname = "[topmenu]"
|
||||
if (topmenuname == "[topmenu.type]")
|
||||
var/list/tree = splittext(topmenuname, "/")
|
||||
topmenuname = tree[tree.len]
|
||||
winset(src, "[topmenu.type]", "parent=menu;name=[url_encode(topmenuname)]")
|
||||
var/list/entries = topmenu.Generate_list(src)
|
||||
for (var/child in entries)
|
||||
winset(src, "[child]", "[entries[child]]")
|
||||
if (!ispath(child, /datum/verbs/menu))
|
||||
var/procpath/verbpath = child
|
||||
if (verbpath.name[1] != "@")
|
||||
new child(src)
|
||||
|
||||
for (var/thing in prefs.menuoptions)
|
||||
var/datum/verbs/menu/menuitem = GLOB.menulist[thing]
|
||||
if (menuitem)
|
||||
menuitem.Load_checked(src)
|
||||
if (!interviewee)
|
||||
initialize_menus()
|
||||
|
||||
view_size = new(src, getScreenSize(prefs.widescreenpref))
|
||||
view_size.resetFormat()
|
||||
@@ -471,6 +454,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
GLOB.directory -= ckey
|
||||
log_access("Logout: [key_name(src)]")
|
||||
GLOB.ahelp_tickets.ClientLogout(src)
|
||||
GLOB.interviews.client_logout(src)
|
||||
SSserver_maint.UpdateHubStatus()
|
||||
if(credits)
|
||||
QDEL_LIST(credits)
|
||||
@@ -556,7 +540,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
var/living_recs = CONFIG_GET(number/panic_bunker_living)
|
||||
//Relies on pref existing, but this proc is only called after that occurs, so we're fine.
|
||||
var/minutes = get_exp_living(pure_numeric = TRUE)
|
||||
if(minutes <= living_recs)
|
||||
if(minutes <= living_recs && !CONFIG_GET(flag/panic_bunker_interview))
|
||||
var/reject_message = "Failed Login: [key] - Account attempting to connect during panic bunker, but they do not have the required living time [minutes]/[living_recs]"
|
||||
log_access(reject_message)
|
||||
message_admins("<span class='adminnotice'>[reject_message]</span>")
|
||||
@@ -872,6 +856,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
..()
|
||||
|
||||
/client/proc/add_verbs_from_config()
|
||||
if (interviewee)
|
||||
return
|
||||
if(CONFIG_GET(flag/see_own_notes))
|
||||
add_verb(src, /client/proc/self_notes)
|
||||
if(CONFIG_GET(flag/use_exp_tracking))
|
||||
@@ -1068,3 +1054,28 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if(statbrowser_ready)
|
||||
return
|
||||
to_chat(src, "<span class='userdanger'>Statpanel failed to load, click <a href='?src=[REF(src)];reload_statbrowser=1'>here</a> to reload the panel </span>")
|
||||
|
||||
/**
|
||||
* Initializes dropdown menus on client
|
||||
*/
|
||||
/client/proc/initialize_menus()
|
||||
var/list/topmenus = GLOB.menulist[/datum/verbs/menu]
|
||||
for (var/thing in topmenus)
|
||||
var/datum/verbs/menu/topmenu = thing
|
||||
var/topmenuname = "[topmenu]"
|
||||
if (topmenuname == "[topmenu.type]")
|
||||
var/list/tree = splittext(topmenuname, "/")
|
||||
topmenuname = tree[tree.len]
|
||||
winset(src, "[topmenu.type]", "parent=menu;name=[url_encode(topmenuname)]")
|
||||
var/list/entries = topmenu.Generate_list(src)
|
||||
for (var/child in entries)
|
||||
winset(src, "[child]", "[entries[child]]")
|
||||
if (!ispath(child, /datum/verbs/menu))
|
||||
var/procpath/verbpath = child
|
||||
if (verbpath.name[1] != "@")
|
||||
new child(src)
|
||||
|
||||
for (var/thing in prefs.menuoptions)
|
||||
var/datum/verbs/menu/menuitem = GLOB.menulist[thing]
|
||||
if (menuitem)
|
||||
menuitem.Load_checked(src)
|
||||
|
||||
Reference in New Issue
Block a user