diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm index 5d999ee4ddc..1be68315f1c 100644 --- a/code/controllers/subsystems/job.dm +++ b/code/controllers/subsystems/job.dm @@ -403,6 +403,18 @@ INVOKE_ASYNC(GLOBAL_PROC, .proc/show_location_blurb, H.client, 30) + if(joined_late) + var/antag_count = 0 + for(var/antag_type in SSticker.mode.antag_tags) + var/datum/antagonist/A = all_antag_types[antag_type] + antag_count += A.get_active_antag_count() + for(var/antag_type in SSticker.mode.antag_tags) + var/datum/antagonist/A = all_antag_types[antag_type] + A.update_current_antag_max() + if((A.role_type in H.client.prefs.be_special_role) && !(A.flags & ANTAG_OVERRIDE_JOB) && antag_count < A.cur_max) + A.add_antagonist(H.mind) + break + Debug("ER/([H]): Completed.") return H diff --git a/html/changelogs/geeves-midgame_antag.yml b/html/changelogs/geeves-midgame_antag.yml new file mode 100644 index 00000000000..07c30d227c5 --- /dev/null +++ b/html/changelogs/geeves-midgame_antag.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "People who latejoin can now be turned into antags as well, provided they have the role preference selected, it's a station antag, and amount of antags is lower than or equal to the living player count divided by the antag count coeff." \ No newline at end of file