diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index efc4bca39e7a..482b4bf5a1c7 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -42,8 +42,8 @@ INITIALIZE_IMMEDIATE(/mob/dead) . += "Time To Start: SOON" . += "Players: [LAZYLEN(GLOB.clients)]" + . += "Players Ready: [SSticker.totalPlayersReady]" if(client.holder) - . += "Players Ready: [SSticker.totalPlayersReady]" . += "Admins Ready: [SSticker.total_admins_ready] / [length(GLOB.admins)]" /mob/dead/proc/server_hop() diff --git a/monkestation/code/modules/storytellers/converted_events/_base_event.dm b/monkestation/code/modules/storytellers/converted_events/_base_event.dm index 8f896a2e74cf..0a4a88a2587c 100644 --- a/monkestation/code/modules/storytellers/converted_events/_base_event.dm +++ b/monkestation/code/modules/storytellers/converted_events/_base_event.dm @@ -153,7 +153,7 @@ var/living_players_arg = round_started ? TRUE : FALSE var/midround_antag_pref_arg = round_started ? FALSE : TRUE - var/list/candidates = SSgamemode.get_candidates(antag_flag, antag_flag, ready_newplayers = new_players_arg, living_players = living_players_arg, midround_antag_pref = midround_antag_pref_arg, restricted_roles = restricted_roles) + var/list/candidates = SSgamemode.get_candidates(antag_flag, antag_flag, ready_newplayers = new_players_arg, living_players = living_players_arg, midround_antag_pref = midround_antag_pref_arg, restricted_roles = restricted_roles, required_roles = exclusive_roles) candidates = trim_candidates(candidates) return candidates diff --git a/monkestation/code/modules/storytellers/converted_events/solo/malf.dm b/monkestation/code/modules/storytellers/converted_events/solo/malf.dm index 0c17035a1c46..e6265aca5029 100644 --- a/monkestation/code/modules/storytellers/converted_events/solo/malf.dm +++ b/monkestation/code/modules/storytellers/converted_events/solo/malf.dm @@ -8,9 +8,11 @@ JOB_HEAD_OF_SECURITY, JOB_RESEARCH_DIRECTOR, JOB_SCIENTIST, + JOB_ROBOTICIST, JOB_SECURITY_OFFICER, JOB_WARDEN, ) + maximum_antags = 1 exclusive_roles = list(JOB_AI) required_enemies = 4 weight = 4 diff --git a/monkestation/code/modules/storytellers/gamemode_subsystem.dm b/monkestation/code/modules/storytellers/gamemode_subsystem.dm index 82495ab883d4..2aa4db750c88 100644 --- a/monkestation/code/modules/storytellers/gamemode_subsystem.dm +++ b/monkestation/code/modules/storytellers/gamemode_subsystem.dm @@ -215,7 +215,8 @@ SUBSYSTEM_DEF(gamemode) /// Gets the number of antagonists the antagonist injection events will stop rolling after. /datum/controller/subsystem/gamemode/proc/get_antag_cap() - var/cap = FLOOR((get_correct_popcount() / ANTAG_CAP_DENOMINATOR), 1) + ANTAG_CAP_FLAT + var/total_number = get_correct_popcount() + (sec_crew * 2) + var/cap = FLOOR((total_number / ANTAG_CAP_DENOMINATOR), 1) + ANTAG_CAP_FLAT return cap /// Whether events can inject more antagonists into the round @@ -234,7 +235,7 @@ SUBSYSTEM_DEF(gamemode) return (get_antag_cap() > total_valid_antags) /// Gets candidates for antagonist roles. -/datum/controller/subsystem/gamemode/proc/get_candidates(be_special, job_ban, observers, ready_newplayers, living_players, required_time, inherit_required_time = TRUE, midround_antag_pref, no_antags = TRUE, list/restricted_roles) +/datum/controller/subsystem/gamemode/proc/get_candidates(be_special, job_ban, observers, ready_newplayers, living_players, required_time, inherit_required_time = TRUE, midround_antag_pref, no_antags = TRUE, list/restricted_roles, list/required_roles) var/list/candidates = list() var/list/candidate_candidates = list() //lol @@ -246,7 +247,7 @@ SUBSYSTEM_DEF(gamemode) else if (observers && isobserver(player)) candidate_candidates += player else if (living_players && isliving(player)) - if(!ishuman(player)) + if(!ishuman(player) && !isAI(player)) continue if(!(player.z in SSmapping.levels_by_trait(ZTRAIT_STATION))) continue @@ -260,6 +261,9 @@ SUBSYSTEM_DEF(gamemode) continue if(restricted_roles && (candidate.mind.assigned_role.title in restricted_roles)) continue + if(length(required_roles) && !(candidate.mind.assigned_role.title in required_roles)) + continue + if(be_special) if(!(candidate.client.prefs) || !(be_special in candidate.client.prefs.be_special)) continue