Fixes Alt Title Age Requirements (#7130)

Job age requirements now take into account alt titles. Alt titles are automatically limited to only ones a character is old enough for.
    The latejoin screen now shows what alt-title you have selected.
    The occupation preferences screen now functions differently if only one alt-title is available, or if the base job is not available.
    Tidies up the job age requirement system.
This commit is contained in:
MarinaGryphon
2019-10-09 15:07:52 -05:00
committed by Erki
parent 9fe517f4b6
commit 300d0fc8d8
6 changed files with 53 additions and 28 deletions

View File

@@ -102,9 +102,7 @@
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))
if(!(rank in player.client.prefs.GetValidTitles(job)))
to_chat(player, "<span class='warning'>Your character is too young!</span>")
return FALSE