diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index 26b95eb77e1..bf9fbb5a9e5 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -78,22 +78,24 @@ 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(!player.mind) + continue + if(player.mind.special_role) + traitorcount += 1 + continue 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")) + 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) possible_traitors -= player - if(player.current) // Remove mindshield-implanted mobs from the list - if(ishuman(player.current)) - var/mob/living/carbon/human/H = player.current - for(var/obj/item/implant/mindshield/I in H.contents) - if(I && I.implanted) - possible_traitors -= player + if(!player.current || !ishuman(player.current)) // Remove mindshield-implanted mobs from the list + continue + var/mob/living/carbon/human/H = player.current + for(var/obj/item/implant/mindshield/I in H.contents) + if(I && I.implanted) + possible_traitors -= player //message_admins("Live Players: [playercount]") //message_admins("Live Traitors: [traitorcount]") @@ -159,7 +161,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 +169,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..c88347a305b 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 //TRUE when a player declines to be included for the selection process of game mode antagonists. 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..5b3fd873777 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 @@ -65,16 +64,16 @@ if(!ticker || ticker.current_state <= GAME_STATE_PREGAME) if(!ready) output += "

Declare Ready

" else output += "

You are ready (Cancel)

" - - var/list/antags = client.prefs.be_special - if(antags && antags.len) - if(!skip_antag) output += "

Global Antag Candidacy" - else output += "

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

" else output += "

View the Crew Manifest

" output += "

Join Game!

" + var/list/antags = client.prefs.be_special + if(antags && antags.len) + if(!client.skip_antag) output += "

Global Antag Candidacy" + else output += "

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

" + output += "

Observe

" if(GLOB.join_tos) @@ -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"])