From cd984e18d2ce145eee5d034bc5ac02119c93facf Mon Sep 17 00:00:00 2001 From: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> Date: Tue, 4 Nov 2025 09:59:11 -0500 Subject: [PATCH] Fixes document exchange runtiming when there's no other valid targets (#30870) * checks length of possible opponents * log_debug instead --- code/modules/antagonists/_common/antag_datum.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 598d74ee0aa..3d20f95dd98 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -571,6 +571,9 @@ GLOBAL_LIST_EMPTY(antagonists) return var/list/possible_opponents = SSticker.mode.traitors + SSticker.mode.vampires + SSticker.mode.changelings + SSticker.mode.mindflayers possible_opponents -= owner + if(!length(possible_opponents)) + log_debug("[owner] was picked to start a document exchange but there were no other antagonists.") + return var/datum/mind/opponent = pick(possible_opponents) var/datum/antagonist/other_antag = opponent.has_antag_datum(/datum/antagonist) if(other_antag)