Moves newplayer button population to a dedicated proc, significantly reducing the hackiness involved for getting the agegate working proper

This commit is contained in:
deathride58
2022-05-30 22:08:49 -04:00
parent 688fac740a
commit ee92230176
3 changed files with 16 additions and 6 deletions
+10
View File
@@ -9,6 +9,12 @@
..()
if(!age_verify())
return
if(!client) //client can end up null as a result of age_verify() kicking those who fail
return
var/motd = global.config.motd
if(motd)
to_chat(src, "<div class=\"motd\">[motd]</div>", handle_whitespace=FALSE)
@@ -35,3 +41,7 @@
else
postfix = "soon"
to_chat(src, "Please set up your character and select \"Ready\". The game will start [postfix].")
var/datum/hud/new_player/NH = hud_used
if(istype(NH))
NH.populate_buttons(src)
@@ -89,6 +89,9 @@
if(!(client.prefs.db_flags & DB_FLAG_AGE_CONFIRMATION_INCOMPLETE)) //completed? Skip
return TRUE
if(!client)
return FALSE
var/age_verification = age_gate()
//ban them and kick them
if(age_verification != 1)
@@ -165,7 +168,7 @@
return 0
//don't let people get to this unless they are specifically not verified
if(href_list["Month"] && (CONFIG_GET(flag/age_verification) && !check_rights_for(client, R_ADMIN) && !(client.ckey in GLOB.bunker_passthrough)))
if(href_list["Month"] && (CONFIG_GET(flag/age_verification) && /*!check_rights_for(client, R_ADMIN) &&*/ !(client.ckey in GLOB.bunker_passthrough)))
var/player_month = text2num(href_list["Month"])
var/player_year = text2num(href_list["Year"])