Config for antag forcing (#12171)

This commit is contained in:
Putnam3145
2020-05-10 12:35:20 -07:00
committed by GitHub
parent c2e689aec0
commit e1d113b970
3 changed files with 22 additions and 1 deletions

View File

@@ -35,6 +35,13 @@
/datum/config_entry/keyed_list/midround_antag/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/force_antag_count
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/force_antag_count/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/policy
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_TEXT

View File

@@ -417,7 +417,7 @@
if(player.assigned_role == job)
candidates -= player
if(candidates.len < recommended_enemies)
if(candidates.len < recommended_enemies && CONFIG_GET(keyed_list/force_antag_count)[config_tag])
for(var/mob/dead/new_player/player in players)
if(player.client && player.ready == PLAYER_READY_TO_PLAY)
if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a separate list of people who don't want to be one

View File

@@ -139,6 +139,20 @@ MIDROUND_ANTAG CHANGELING
MIDROUND_ANTAG WIZARD
#MIDROUND_ANTAG MONKEY
## Toggles for whether this mode should force antags even if not enough players have it enabled.
## If it's off, it just won't roll as many antags.
#FORCE_ANTAG_COUNT TRAITOR
#FORCE_ANTAG_COUNT TRAITORBRO
#FORCE_ANTAG_COUNT TRAITORCHAN
#FORCE_ANTAG_COUNT INTERNAL_AFFAIRS
FORCE_ANTAG_COUNT NUCLEAR
FORCE_ANTAG_COUNT REVOLUTION
FORCE_ANTAG_COUNT CULT
FORCE_ANTAG_COUNT CLOCKWORK_CULT
#FORCE_ANTAG_COUNT CHANGELING
#FORCE_ANTAG_COUNT WIZARD
#FORCE_ANTAG_COUNT MONKEY
## Uncomment these for overrides of the minimum / maximum number of players in a round type.
## If you set any of these occasionally check to see if you still need them as the modes
## will still be actively rebalanced around the SUGGESTED populations, not your overrides.