diff --git a/code/__DEFINES/ARES.dm b/code/__DEFINES/ARES.dm index a1b82af25821..d9f71ba88f0a 100644 --- a/code/__DEFINES/ARES.dm +++ b/code/__DEFINES/ARES.dm @@ -70,3 +70,6 @@ /// Cooldowns #define COOLDOWN_ARES_SENSOR 60 SECONDS #define COOLDOWN_ARES_ACCESS_CONTROL 20 SECONDS + +/// Time until someone can respawn as Working Joe +#define JOE_JOIN_DEAD_TIME (10 MINUTES) diff --git a/code/game/gamemodes/cm_initialize.dm b/code/game/gamemodes/cm_initialize.dm index 36271054bb21..c434734df9d5 100644 --- a/code/game/gamemodes/cm_initialize.dm +++ b/code/game/gamemodes/cm_initialize.dm @@ -957,11 +957,6 @@ Additional game mode variables. to_chat(joe_candidate, SPAN_WARNING("You are not whitelisted! You may apply on the forums to be whitelisted as a synth.")) return - if((joe_candidate.ckey in joes) && !MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_JOE)) - if(show_warning) - to_chat(joe_candidate, SPAN_WARNING("You already were a Working Joe this round!")) - return - // council doesn't count towards this conditional. if(joe_job.get_whitelist_status(RoleAuthority.roles_whitelist, joe_candidate.client) == WHITELIST_NORMAL) var/joe_max = joe_job.total_positions @@ -970,6 +965,11 @@ Additional game mode variables. to_chat(joe_candidate, SPAN_WARNING("Only [joe_max] Working Joes may spawn per round.")) return + var/deathtime = world.time - joe_candidate.timeofdeath + if(deathtime < JOE_JOIN_DEAD_TIME && !MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_JOE)) + to_chat(joe_candidate, SPAN_WARNING("You have been dead for [DisplayTimeText(deathtime)]. You need to wait [DisplayTimeText(JOE_JOIN_DEAD_TIME - deathtime)] before rejoining as a Working Joe!")) + return FALSE + if(!enter_allowed && !MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_JOE)) if(show_warning) to_chat(joe_candidate, SPAN_WARNING("There is an administrative lock from entering the game."))