Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TM-ONLY] Фикс целек еретика. #2934

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion modular_nova/modules/antag_opt_in/code/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading