Players who are assigned restricted jobs will be removed from the antag candidate list (#9729)

This commit is contained in:
mikomyazaki
2020-08-22 11:22:30 +02:00
committed by GitHub
parent a4e2154f51
commit 2da2e50644
2 changed files with 47 additions and 0 deletions
+6
View File
@@ -185,6 +185,12 @@ var/global/list/additional_antag_types = list()
else
potential = antag.candidates
if(islist(potential))
for(var/potential_antag in potential)
var/datum/mind/player = potential_antag
if(!(antag.flags & ANTAG_OVERRIDE_JOB) && (player.assigned_role in antag.restricted_jobs))
potential -= potential_antag
antag.candidates -= player
log_debug("GAMEMODE: Player [player.name] ([player.key]) was removed from the potential antags list due to being given the role [player.assigned_role] which is a restricted job!")
if(potential.len)
log_debug("GAMEMODE: Found [potential.len] potential antagonists for [antag.role_text].")
total_enemy_count += potential.len