Fixes document exchange runtiming when there's no other valid targets (#30870)

* checks length of possible opponents

* log_debug instead
This commit is contained in:
BiancaWilkson
2025-11-04 09:59:11 -05:00
committed by GitHub
parent 33a311292e
commit cd984e18d2

View File

@@ -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)