diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index 26b95eb77e1..281e0ef9f04 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -78,12 +78,13 @@ for(var/mob/living/player in GLOB.mob_list) if(player.client && player.stat != DEAD) playercount += 1 - if(player.client && player.mind && player.mind.special_role && player.stat != DEAD) - traitorcount += 1 - if(player.client && player.mind && !player.mind.special_role && player.stat != DEAD) - if(ishuman(player) || isrobot(player) || isAI(player)) - if(player.client && (ROLE_TRAITOR in player.client.prefs.be_special) && !jobban_isbanned(player, ROLE_TRAITOR) && !jobban_isbanned(player, "Syndicate")) - possible_traitors += player.mind + if(player.mind) + if(player.mind.special_role) + traitorcount += 1 + else + if(ishuman(player) || isrobot(player) || isAI(player)) + if((ROLE_TRAITOR in player.client.prefs.be_special) && !player.client.skip_antag && !jobban_isbanned(player, ROLE_TRAITOR) && !jobban_isbanned(player, "Syndicate")) + possible_traitors += player.mind for(var/datum/mind/player in possible_traitors) for(var/job in restricted_jobs) if(player.assigned_role == job) @@ -159,7 +160,7 @@ if(SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) return //message_admins("Late Join Check") - if(character.client && (ROLE_TRAITOR in character.client.prefs.be_special) && !jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate")) + if(character.client && (ROLE_TRAITOR in character.client.prefs.be_special) && !character.client.skip_antag && !jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate")) //message_admins("Late Joiner has Be Syndicate") //message_admins("Checking number of players") var/playercount = 0 @@ -167,8 +168,8 @@ for(var/mob/living/player in GLOB.mob_list) if(player.client && player.stat != DEAD) playercount += 1 - if(player.client && player.mind && player.mind.special_role && player.stat != DEAD) - traitorcount += 1 + if(player.mind && player.mind.special_role) + traitorcount += 1 //message_admins("Live Players: [playercount]") //message_admins("Live Traitors: [traitorcount]") diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 2056c6c6260..42a42240ad5 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -55,7 +55,7 @@ var/list/blob_nodes = list() /datum/game_mode/blob/proc/get_blob_candidates() var/list/candidates = list() for(var/mob/living/carbon/human/player in GLOB.player_list) - if(!player.stat && player.mind && !player.mind.special_role && !jobban_isbanned(player, "Syndicate") && (ROLE_BLOB in player.client.prefs.be_special)) + if(!player.stat && player.mind && !player.client.skip_antag && !player.mind.special_role && !jobban_isbanned(player, "Syndicate") && (ROLE_BLOB in player.client.prefs.be_special)) candidates += player return candidates diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index de10fa34c01..08ab2b54c5d 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -271,7 +271,7 @@ // Get a list of all the people who want to be the antagonist for this round, except those with incompatible species for(var/mob/new_player/player in players) - if(!player.skip_antag) + if(!player.client.skip_antag) if((role in player.client.prefs.be_special) && !(player.client.prefs.species in protected_species)) player_draft_log += "[player.key] had [roletext] enabled, so we are drafting them." candidates += player.mind diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index b64f965a81a..5327eca3838 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -12,6 +12,7 @@ //OTHER// ///////// var/datum/preferences/prefs = null + var/skip_antag = FALSE //Decline to be selected as a game mode antagonist. var/move_delay = 1 var/moving = null var/adminobs = null diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a1be1db4c63..2e2f3bf8ac8 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -1,6 +1,5 @@ /mob/new_player var/ready = 0 - var/skip_antag = 0 //For declining an antag roll this round. var/spawning = 0 //Referenced when you want to delete the new_player later on in the code. var/totalPlayers = 0 //Player counts for the Lobby tab var/totalPlayersReady = 0 @@ -68,9 +67,9 @@ var/list/antags = client.prefs.be_special if(antags && antags.len) - if(!skip_antag) output += "

Global Antag Candidacy" + if(!client.skip_antag) output += "

Global Antag Candidacy" else output += "

Global Antag Candidacy" - output += "
You are [skip_antag ? "ineligible" : "eligible"] for all antag roles.

" + output += "
You are [client.skip_antag ? "ineligible" : "eligible"] for all antag roles.

" else output += "

View the Crew Manifest

" output += "

Join Game!

" @@ -172,7 +171,7 @@ new_player_panel_proc() if(href_list["skip_antag"]) - skip_antag = !skip_antag + client.skip_antag = !client.skip_antag new_player_panel_proc() if(href_list["refresh"])