Antagonist Age Fix (#7730)

Players with accounts too young to be antagonists now properly cannot select those roles. No more empty gamemodes.
This commit is contained in:
Geeves
2019-12-19 21:37:33 +02:00
committed by Erki
parent f40dbfc2f2
commit 3323e1fa3c
4 changed files with 11 additions and 1 deletions
@@ -50,6 +50,8 @@
dat += "<span class='danger'>\[IN [player_old_enough_for_role(preference_mob(), antag.bantype)] DAYS\]</span><br>"
else if(is_global_banned || ban_reason)
dat += "<span class='danger'>\[<a href='?src=\ref[user.client];view_jobban=[is_global_banned ? "Antagonist" : "[antag.bantype]"];'>BANNED</a>\]</span><br>"
else if(establish_db_connection(dbcon) && antag.required_age && antag.required_age > user.client?.player_age)
dat += "<span class='notice'>ACC TOO YOUNG</span><br>"
else if(antag.role_type in pref.be_special_role)
dat += "<b>Yes</b> / <a href='?src=\ref[src];del_special=[antag.role_type]'>No</a></br>"
else