Enforces species jobs restrictions through mechanics (#7691)

This commit is contained in:
Alberyk
2019-12-18 23:13:41 +01:00
committed by Werner
parent 658dac81d8
commit 13138756b5
10 changed files with 33 additions and 0 deletions
@@ -286,6 +286,11 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
if (jobban_isbanned(src,rank))
return FALSE
if(job.blacklisted_species) // check for restricted species
var/datum/species/S = all_species[client.prefs.species]
if(S.name in job.blacklisted_species)
return FALSE
var/datum/faction/faction = SSjobs.name_factions[client.prefs.faction] || SSjobs.default_faction
if (!(job.type in faction.allowed_role_types))
return FALSE