Force matchmaker selection if they didn't pick. matchmaker is not told who is matched in this instance

This commit is contained in:
skizzerz 2015-07-12 00:13:49 -05:00
parent e1832def6e
commit 3c8979295b

View File

@ -3094,6 +3094,12 @@ def transition_day(cli, gameid=0):
var.CLONED[clone] = target var.CLONED[clone] = target
pm(cli, clone, "Because you forgot to select someone to clone at night, you are now cloning \u0002{0}\u0002.".format(target)) pm(cli, clone, "Because you forgot to select someone to clone at night, you are now cloning \u0002{0}\u0002.".format(target))
for mm in var.ROLES["matchmaker"]:
if mm not in var.MATCHMAKERS:
lovers = random.sample(pl, 2)
choose.func(cli, mm, mm, lovers[0] + " " + lovers[1], sendmsg=False)
pm(cli, mm, "Because you forgot to choose lovers at night, two lovers have been selected for you.")
# Reset daytime variables # Reset daytime variables
var.VOTES = {} var.VOTES = {}
@ -4789,7 +4795,7 @@ def pass_cmd(cli, nick, chan, rest):
chk_nightdone(cli) chk_nightdone(cli)
@cmd("choose", "match", chan=False, pm=True, playing=True, phases=("night",), roles=("matchmaker",)) @cmd("choose", "match", chan=False, pm=True, playing=True, phases=("night",), roles=("matchmaker",))
def choose(cli, nick, chan, rest): def choose(cli, nick, chan, rest, sendmsg=True):
"""Select two players to fall in love. You may select yourself as one of the lovers.""" """Select two players to fall in love. You may select yourself as one of the lovers."""
if not var.FIRST_NIGHT: if not var.FIRST_NIGHT:
return return
@ -4834,6 +4840,8 @@ def choose(cli, nick, chan, rest):
else: else:
var.LOVERS[victim2] = [victim] var.LOVERS[victim2] = [victim]
var.ORIGINAL_LOVERS[victim2] = [victim] var.ORIGINAL_LOVERS[victim2] = [victim]
if sendmsg:
pm(cli, nick, "You have selected \u0002{0}\u0002 and \u0002{1}\u0002 to be lovers.".format(victim, victim2)) pm(cli, nick, "You have selected \u0002{0}\u0002 and \u0002{1}\u0002 to be lovers.".format(victim, victim2))
if victim in var.PLAYERS and not is_user_simple(victim): if victim in var.PLAYERS and not is_user_simple(victim):