From ef2ebaf2910f35d1a8e221fd3aa83bfde7905708 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 1 Jun 2021 01:58:55 +0200 Subject: [PATCH] [MIRROR] Prevent players who get booted back to the lobby on shiftstart from getting broken antag status on latejoin (#6055) * Prevent players who get booted back to the lobby on shiftstart from getting broken antag status on latejoin (#59377) * Prevent players who get booted back to the lobby on shiftstart from getting broken antag status on latejoin * Mirrored * oop Co-authored-by: Timberpoes Co-authored-by: Funce --- code/game/gamemodes/dynamic/dynamic.dm | 2 +- code/modules/mob/dead/new_player/new_player.dm | 5 ++--- .../code/modules/mob/living/dead/new_player/new_player.dm | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index 0fdd2e97824..a7088382303 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -386,7 +386,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) for(var/i in GLOB.new_player_list) var/mob/dead/new_player/player = i - if(player.ready == PLAYER_READY_TO_PLAY && player.mind) + if(player.ready == PLAYER_READY_TO_PLAY && player.mind && player.check_preferences()) roundstart_pop_ready++ if(player.client.prefs.be_antag) //SKYRAT EDIT CHANGE candidates.Add(player) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 7aaac823077..da45a8e68de 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -527,9 +527,8 @@ ineligible_for_roles = TRUE ready = PLAYER_NOT_READY if(has_antags) - log_admin("[src.ckey] just got booted back to lobby with no jobs, but antags enabled.") - message_admins("[src.ckey] just got booted back to lobby with no jobs enabled, but antag rolling enabled. Likely antag rolling abuse.") - + log_admin("[src.ckey] has no jobs enabled, return to lobby if job is unavailable enabled and [client.prefs.be_special.len] antag preferences enabled. The player has been forcefully returned to the lobby.") + message_admins("[src.ckey] has no jobs enabled, return to lobby if job is unavailable enabled and [client.prefs.be_special.len] antag preferences enabled. This is an old antag rolling technique. The player has been asked to update their job preferences and has been forcefully returned to the lobby.") return FALSE //This is the only case someone should actually be completely blocked from antag rolling as well return TRUE diff --git a/modular_skyrat/master_files/code/modules/mob/living/dead/new_player/new_player.dm b/modular_skyrat/master_files/code/modules/mob/living/dead/new_player/new_player.dm index b5c80acd266..90b22c30828 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/dead/new_player/new_player.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/dead/new_player/new_player.dm @@ -570,9 +570,8 @@ ineligible_for_roles = TRUE ready = PLAYER_NOT_READY if(has_antags) - log_admin("[src.ckey] just got booted back to lobby with no jobs, but antags enabled.") - message_admins("[src.ckey] just got booted back to lobby with no jobs enabled, but antag rolling enabled. Likely antag rolling abuse.") - + log_admin("[src.ckey] has no jobs enabled, return to lobby if job is unavailable enabled and [client.prefs.be_special.len] antag preferences enabled. The player has been forcefully returned to the lobby.") + message_admins("[src.ckey] has no jobs enabled, return to lobby if job is unavailable enabled and [client.prefs.be_special.len] antag preferences enabled. This is an old antag rolling technique. The player has been asked to update their job preferences and has been forcefully returned to the lobby.") return FALSE //This is the only case someone should actually be completely blocked from antag rolling as well return TRUE