From 37a3d530af75e701efa2ef9342a23e286ef4cd45 Mon Sep 17 00:00:00 2001 From: Iajret Date: Tue, 16 Apr 2024 23:02:02 +0300 Subject: [PATCH] opt-in fixes --- .../sacrifice_knowledge/sacrifice_knowledge.dm | 17 +++++++++-------- modular_nova/modules/antag_opt_in/code/mind.dm | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm index f515b3e25bd..c3a518b598a 100644 --- a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm @@ -114,7 +114,7 @@ if(possible_target.current.stat == DEAD) continue // NOVA EDIT ADDITION BEGIN - Antag opt-in (Only security and command can be targetted) - if (!possible_target.assigned_role?.heretic_sac_target) + if (!CONFIG_GET(flag/disable_antag_opt_in_preferences) && !possible_target.assigned_role?.heretic_sac_target) continue // NOVA EDIT ADDITION END @@ -146,14 +146,15 @@ valid_targets -= sec_mind break - /* NOVA EDIT REMOVAL -- Antag Opt In (Only sec and command may be targetted) + // NOVA EDIT REMOVAL -- Antag Opt In (Only sec and command may be targetted if config is set as 0) // Third target, someone in their department. - for(var/datum/mind/department_mind as anything in shuffle(valid_targets)) - if(department_mind.assigned_role?.departments_bitflags & user.mind.assigned_role?.departments_bitflags) - final_targets += department_mind - valid_targets -= department_mind - break - */ // NOVA EDIT REMOVAL END + if(CONFIG_GET(flag/disable_antag_opt_in_preferences)) + for(var/datum/mind/department_mind as anything in shuffle(valid_targets)) + if(department_mind.assigned_role?.departments_bitflags & user.mind.assigned_role?.departments_bitflags) + final_targets += department_mind + valid_targets -= department_mind + break + // NOVA EDIT REMOVAL END // Now grab completely random targets until we'll full var/target_sanity = 0 diff --git a/modular_nova/modules/antag_opt_in/code/mind.dm b/modular_nova/modules/antag_opt_in/code/mind.dm index 3b704ee70ae..29f2d9ff466 100644 --- a/modular_nova/modules/antag_opt_in/code/mind.dm +++ b/modular_nova/modules/antag_opt_in/code/mind.dm @@ -35,7 +35,8 @@ GLOBAL_LIST_INIT(optin_forcing_on_spawn_antag_categories, list( /mob/living/Login() . = ..() - + if(CONFIG_GET(flag/disable_antag_opt_in_preferences)) //lets not annoy our fellow players with useless info if we don't use this system at all + return if (isnull(mind)) return if (isnull(client?.prefs))