mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
made the alien player limit a config option
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -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]."
|
||||
|
||||
@@ -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))
|
||||
|
||||
+4
-1
@@ -176,4 +176,7 @@ SOCKET_TALK 0
|
||||
USEALIENWHITELIST
|
||||
|
||||
## Location of the nudge.py script
|
||||
NUDGE_SCRIPT_PATH nudge.py
|
||||
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
|
||||
Reference in New Issue
Block a user