Mechanically enforces minimum age requirements for jobs (#7106)

Pretty much a port of Baystation12/Baystation12#27197
This commit is contained in:
Matt Atlas
2019-10-06 21:47:04 +03:00
committed by Erki
parent 3f77b73a9e
commit 3ac40451e1
15 changed files with 139 additions and 4 deletions
+6
View File
@@ -102,6 +102,12 @@
if(jobban_isbanned(player, rank))
return FALSE
var/character_age = player.client.prefs.age
var/datum/species/species = global.all_species[player.client.prefs.species]
if((character_age < job.minimum_character_age) && !(species.spawn_flags & NO_AGE_MINIMUM))
to_chat(player, "<span class='warning'>Your character is too young!</span>")
return FALSE
var/position_limit = job.total_positions
if(!latejoin)
position_limit = job.spawn_positions