bugfixes for hints

This commit is contained in:
Fabian Dill 2020-02-17 05:34:02 +01:00
parent e50b9e5ee2
commit 5c34119293
1 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ def notify_client(client: Client, text: str):
def notify_hints(ctx: Context, team: int, hints: typing.List[Utils.Hint]):
cmd = [["Hint", hints]]
texts = [['Print', format_hint(ctx, team, hint)] for hint in hints]
for cmd, text in texts:
for _, text in texts:
logging.info("Notice (Team #%d): %s" % (team + 1, text))
for client in ctx.clients:
if client.auth and client.team == team:
@ -390,7 +390,7 @@ async def process_client_cmd(ctx: Context, client: Client, cmd, args):
for hint in hints:
found += 1 - hint.found
if not found:
notify_hints(ctx, client.team, format_hint(ctx, client.team, hints))
notify_hints(ctx, client.team, hints)
notify_client(client, "No new items found, points refunded.")
else:
if ctx.hint_cost:
@ -400,7 +400,7 @@ async def process_client_cmd(ctx: Context, client: Client, cmd, args):
if can_pay:
ctx.hints_used[client.team, client.slot] += found
notify_hints(ctx, client.team, format_hint(ctx, client.team, hints))
notify_hints(ctx, client.team, hints)
save(ctx)
else:
notify_client(client, f"You can't afford the hint. "