mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Merge pull request #15231 from Tupinambis/Assistantagging
Antag roles will now respect your backup role preferences if none of the enabled roles are available
This commit is contained in:
@@ -367,9 +367,14 @@ SUBSYSTEM_DEF(job)
|
||||
JobDebug("DO, Handling unrejectable unassigned")
|
||||
//Mop up people who can't leave.
|
||||
for(var/mob/dead/new_player/player in unassigned) //Players that wanted to back out but couldn't because they're antags (can you feel the edge case?)
|
||||
if(!GiveRandomJob(player))
|
||||
if(!AssignRole(player, SSjob.overflow_role)) //If everything is already filled, make them an assistant
|
||||
return FALSE //Living on the edge, the forced antagonist couldn't be assigned to overflow role (bans, client age) - just reroll
|
||||
if(player.client.prefs.joblessrole == BERANDOMJOB) //Gives the player a random role if their preferences are set to it
|
||||
if(!GiveRandomJob(player))
|
||||
if(!AssignRole(player, SSjob.overflow_role)) //If everything is already filled, make them the overflow role
|
||||
return FALSE //Living on the edge, the forced antagonist couldn't be assigned to overflow role (bans, client age) - just reroll
|
||||
else //If the player prefers to return to lobby or be an assistant, give them assistant
|
||||
if(!AssignRole(player, SSjob.overflow_role))
|
||||
if(!GiveRandomJob(player)) //The forced antagonist couldn't be assigned to overflow role (bans, client age) - give a random role
|
||||
return FALSE //Somehow the forced antagonist couldn't be assigned to the overflow role or the a random role - reroll
|
||||
|
||||
return validate_required_jobs(required_jobs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user