diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 74f0bbd499e..79b094bbb4e 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -55,6 +55,8 @@ var/automute_on = 0 //enables automuting/spam prevention var/usealienwhitelist = 0 + var/limitalienplayers = 0 + var/alien_to_human_ratio = 0.5 var/server var/banappeals @@ -353,9 +355,15 @@ if("usealienwhitelist") usealienwhitelist = 1 + + if("alien_player_ratio") + limitalienplayers = 1 + alien_to_human_ratio = text2num(value) + else diary << "Unknown setting in configuration: '[name]'" + else if(type == "game_options") if(!value) diary << "Unknown value for setting [name] in [filename]." diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 6c43e58b0b0..952961ca88e 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -455,11 +455,11 @@ src << browse(null, "window=latechoices") //closes late choices window src << browse(null, "window=playersetup") //closes the player setup window -#define MAX_ALIEN_PLAYER_PERCENT 20 - -//cael - this should probably be moved to ticker or somewhere, but it's fine here for now //limits the number of alien players in a game /proc/GetAvailableAlienPlayerSlots() + if(!config.limitalienplayers) + return 9999 + var/num_players = 0 //check new players @@ -472,4 +472,4 @@ if(H.ckey) num_players++ - return round(num_players * (MAX_ALIEN_PLAYER_PERCENT / 100)) + return round(num_players * (config.alien_to_human_ratio / 100)) diff --git a/config/config.txt b/config/config.txt index 803d975a80f..f6725954d75 100644 --- a/config/config.txt +++ b/config/config.txt @@ -176,4 +176,7 @@ SOCKET_TALK 0 USEALIENWHITELIST ## Location of the nudge.py script -NUDGE_SCRIPT_PATH nudge.py \ No newline at end of file +NUDGE_SCRIPT_PATH nudge.py + +## Comment this to unrestrict the number of alien players allowed in the round. The number represents the number of alien players for every human player. +#ALIEN_PLAYER_RATIO 0.2 \ No newline at end of file