Remove the roles_check event
This commit is contained in:
parent
d8161271c7
commit
7f875d3b33
@ -5957,25 +5957,25 @@ def start(cli, nick, chan, forced = False, restart = ""):
|
||||
return
|
||||
|
||||
if var.ORIGINAL_SETTINGS and not restart: # Custom settings
|
||||
event = Event("roles_check", {"addroles": addroles})
|
||||
if event.dispatch(var):
|
||||
need_reset = True
|
||||
wvs = sum(addroles[r] for r in var.WOLFCHAT_ROLES)
|
||||
if len(villagers) < (sum(addroles.values()) - sum(addroles[r] for r in var.TEMPLATE_RESTRICTIONS.keys())):
|
||||
cli.msg(chan, "There are too few players in the "+
|
||||
"game to use the custom roles.")
|
||||
elif not wvs:
|
||||
cli.msg(chan, "There has to be at least one wolf!")
|
||||
elif wvs > (len(villagers) / 2):
|
||||
cli.msg(chan, "Too many wolves.")
|
||||
else:
|
||||
need_reset = False
|
||||
need_reset = True
|
||||
wvs = sum(addroles[r] for r in var.WOLFCHAT_ROLES)
|
||||
if len(villagers) < (sum(addroles.values()) - sum(addroles[r] for r in var.TEMPLATE_RESTRICTIONS.keys())):
|
||||
cli.msg(chan, "There are too few players in the "+
|
||||
"game to use the custom roles.")
|
||||
elif not wvs:
|
||||
cli.msg(chan, "There has to be at least one wolf!")
|
||||
elif wvs > (len(villagers) / 2):
|
||||
cli.msg(chan, "Too many wolves.")
|
||||
elif set(addroles) != set(var.ROLE_GUIDE):
|
||||
cli.msg(chan, "Error: Not all roles have defined player counts.")
|
||||
else:
|
||||
need_reset = False
|
||||
|
||||
if need_reset:
|
||||
reset_settings()
|
||||
cli.msg(chan, "The default settings have been restored. Please !start again.")
|
||||
var.PHASE = "join"
|
||||
return
|
||||
if need_reset:
|
||||
reset_settings()
|
||||
cli.msg(chan, "The default settings have been restored. Please !start again.")
|
||||
var.PHASE = "join"
|
||||
return
|
||||
|
||||
if var.ADMIN_TO_PING and not restart:
|
||||
for decor in (COMMANDS.get("join", []) + COMMANDS.get("start", [])):
|
||||
|
Loading…
x
Reference in New Issue
Block a user