Allow enabling timers in debug mode
Specifically, all timers are enabled by default now and there are new settings to disable regular timers and disable time lord. There is also a new setting to disable quit/part stasis in debug mode.
This commit is contained in:
parent
8b2023f133
commit
a526442725
@ -99,19 +99,30 @@ var.BITTEN = {}
|
|||||||
var.BITTEN_ROLES = {}
|
var.BITTEN_ROLES = {}
|
||||||
var.VENGEFUL_GHOSTS = {}
|
var.VENGEFUL_GHOSTS = {}
|
||||||
|
|
||||||
if botconfig.DEBUG_MODE:
|
if botconfig.DEBUG_MODE and var.DISABLE_DEBUG_MODE_TIMERS:
|
||||||
var.NIGHT_TIME_LIMIT = 0 # 120
|
var.NIGHT_TIME_LIMIT = 0 # 120
|
||||||
var.NIGHT_TIME_WARN = 0 # 90
|
var.NIGHT_TIME_WARN = 0 # 90
|
||||||
var.DAY_TIME_LIMIT = 0 # 720
|
var.DAY_TIME_LIMIT = 0 # 720
|
||||||
var.DAY_TIME_WARN = 0 # 600
|
var.DAY_TIME_WARN = 0 # 600
|
||||||
var.SHORT_DAY_LIMIT = 0 # 520
|
var.SHORT_DAY_LIMIT = 0 # 520
|
||||||
var.SHORT_DAY_WARN = 0 # 400
|
var.SHORT_DAY_WARN = 0 # 400
|
||||||
|
|
||||||
|
if botconfig.DEBUG_MODE and var.DISABLE_DEBUG_MODE_REAPER:
|
||||||
var.KILL_IDLE_TIME = 0 # 300
|
var.KILL_IDLE_TIME = 0 # 300
|
||||||
var.WARN_IDLE_TIME = 0 # 180
|
var.WARN_IDLE_TIME = 0 # 180
|
||||||
var.JOIN_TIME_LIMIT = 0
|
var.JOIN_TIME_LIMIT = 0 # 3600
|
||||||
var.LEAVE_STASIS_PENALTY = 1
|
|
||||||
var.IDLE_STASIS_PENALTY = 1
|
if botconfig.DEBUG_MODE and var.DISABLE_DEBUG_MODE_STASIS:
|
||||||
var.PART_STASIS_PENALTY = 1
|
var.LEAVE_STASIS_PENALTY = 0
|
||||||
|
var.IDLE_STASIS_PENALTY = 0
|
||||||
|
var.PART_STASIS_PENALTY = 0
|
||||||
|
var.ACC_STASIS_PENALTY = 0
|
||||||
|
|
||||||
|
if botconfig.DEBUG_MODE and var.DISABLE_DEBUG_MODE_TIME_LORD:
|
||||||
|
var.TIME_LORD_DAY_LIMIT = 0 # 60
|
||||||
|
var.TIME_LORD_DAY_WARN = 0 # 45
|
||||||
|
var.TIME_LORD_NIGHT_LIMIT = 0 # 30
|
||||||
|
var.TIME_LORD_NIGHT_WARN = 0 # 20
|
||||||
|
|
||||||
|
|
||||||
def connect_callback(cli):
|
def connect_callback(cli):
|
||||||
@ -1209,7 +1220,7 @@ def join_player(cli, player, chan, who = None, forced = False):
|
|||||||
'Type "{1}wait" to increase the start wait time.').format(player, botconfig.CMD_CHAR))
|
'Type "{1}wait" to increase the start wait time.').format(player, botconfig.CMD_CHAR))
|
||||||
|
|
||||||
# Set join timer
|
# Set join timer
|
||||||
if var.JOIN_TIME_LIMIT and not botconfig.DEBUG_MODE:
|
if var.JOIN_TIME_LIMIT > 0:
|
||||||
t = threading.Timer(var.JOIN_TIME_LIMIT, kill_join, [cli, chan])
|
t = threading.Timer(var.JOIN_TIME_LIMIT, kill_join, [cli, chan])
|
||||||
var.TIMERS['join'] = (t, time.time(), var.JOIN_TIME_LIMIT)
|
var.TIMERS['join'] = (t, time.time(), var.JOIN_TIME_LIMIT)
|
||||||
t.daemon = True
|
t.daemon = True
|
||||||
|
@ -74,6 +74,12 @@ DEFAULT_SEEN_AS_VILL = True # non-wolves are seen as villager regardless of the
|
|||||||
|
|
||||||
IGNORE_NO_WOLF = False # set to True only when randomizing roles
|
IGNORE_NO_WOLF = False # set to True only when randomizing roles
|
||||||
|
|
||||||
|
# Debug mode settings, whether or not timers and stasis should apply during debug mode
|
||||||
|
DISABLE_DEBUG_MODE_TIMERS = True
|
||||||
|
DISABLE_DEBUG_MODE_TIME_LORD = False
|
||||||
|
DISABLE_DEBUG_MODE_REAPER = True
|
||||||
|
DISABLE_DEBUG_MODE_STASIS = True
|
||||||
|
|
||||||
# Minimum number of players needed for mad scientist to skip over dead people when determining who is next to them
|
# Minimum number of players needed for mad scientist to skip over dead people when determining who is next to them
|
||||||
# Set to 0 to always skip over dead players. Note this is number of players that !joined, NOT number of players currently alive
|
# Set to 0 to always skip over dead players. Note this is number of players that !joined, NOT number of players currently alive
|
||||||
MAD_SCIENTIST_SKIPS_DEAD_PLAYERS = 16
|
MAD_SCIENTIST_SKIPS_DEAD_PLAYERS = 16
|
||||||
|
Loading…
Reference in New Issue
Block a user