!hint now properly gives you prior collection info without needing enough to pay for another hint
This commit is contained in:
parent
bdf95775ac
commit
baba4b7c02
|
@ -825,34 +825,31 @@ class ClientMessageProcessor(CommonCommandProcessor):
|
||||||
import random
|
import random
|
||||||
|
|
||||||
random.shuffle(not_found_hints)
|
random.shuffle(not_found_hints)
|
||||||
if can_pay:
|
|
||||||
hints = []
|
|
||||||
while can_pay > 0:
|
|
||||||
if not not_found_hints:
|
|
||||||
break
|
|
||||||
hint = not_found_hints.pop()
|
|
||||||
hints.append(hint)
|
|
||||||
can_pay -= 1
|
|
||||||
self.ctx.hints_used[self.client.team, self.client.slot] += 1
|
|
||||||
|
|
||||||
if not hint.found:
|
hints = found_hints
|
||||||
self.ctx.hints[self.client.team, hint.finding_player].add(hint)
|
while can_pay > 0:
|
||||||
self.ctx.hints[self.client.team, hint.receiving_player].add(hint)
|
if not not_found_hints:
|
||||||
|
break
|
||||||
|
hint = not_found_hints.pop()
|
||||||
|
hints.append(hint)
|
||||||
|
can_pay -= 1
|
||||||
|
self.ctx.hints_used[self.client.team, self.client.slot] += 1
|
||||||
|
|
||||||
|
if not hint.found:
|
||||||
|
self.ctx.hints[self.client.team, hint.finding_player].add(hint)
|
||||||
|
self.ctx.hints[self.client.team, hint.receiving_player].add(hint)
|
||||||
|
|
||||||
|
if not_found_hints:
|
||||||
|
if hints:
|
||||||
|
self.output(
|
||||||
|
"Could not pay for everything. Rerun the hint later with more points to get the remaining hints.")
|
||||||
else:
|
else:
|
||||||
if not_found_hints:
|
self.output(f"You can't afford the hint. "
|
||||||
self.output(
|
f"You have {points_available} points and need at least "
|
||||||
"Could not pay for everything. Rerun the hint later with more points to get the remaining hints.")
|
f"{self.ctx.hint_cost}")
|
||||||
notify_hints(self.ctx, self.client.team, found_hints + hints)
|
notify_hints(self.ctx, self.client.team, hints)
|
||||||
self.ctx.save()
|
self.ctx.save()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
else:
|
|
||||||
self.output(f"You can't afford the hint. "
|
|
||||||
f"You have {points_available} points and need at least "
|
|
||||||
f"{self.ctx.hint_cost}")
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.output("Nothing found. Item/Location may not exist.")
|
self.output("Nothing found. Item/Location may not exist.")
|
||||||
|
|
Loading…
Reference in New Issue