infil and protect mutual exclusivity (#31133)

This commit is contained in:
Pooble
2025-12-05 02:43:58 -05:00
committed by GitHub
parent 547d33a68b
commit f35b10850a
@@ -487,6 +487,9 @@ GLOBAL_LIST_EMPTY(antagonists)
// Prevent duplicate infiltrate objectives
if(locate(/datum/objective/infiltrate_sec) in owner.get_all_objectives())
objective_to_add = roll_single_human_objective()
// Mutual exclusivity with protecting someone
else if(locate(/datum/objective/protect) in owner.get_all_objectives())
objective_to_add = roll_single_human_objective()
else
objective_to_add = /datum/objective/infiltrate_sec
@@ -496,7 +499,11 @@ GLOBAL_LIST_EMPTY(antagonists)
objective_to_add = /datum/objective/incriminate
if(PROTECT_OBJECTIVE)
objective_to_add = /datum/objective/protect
// Mutual exclusivity with infiltrating Sec
if(locate(/datum/objective/infiltrate_sec) in owner.get_all_objectives())
objective_to_add = roll_single_human_objective()
else
objective_to_add = /datum/objective/protect
if(delayed_objectives)
objective_to_add = new /datum/objective/delayed(objective_to_add)