!hint now points out all hints relating to the player issuing the command.

payed hints also retain that they were already found and don't need to be re-checked as items can't be unfound.
This commit is contained in:
Fabian Dill
2020-04-22 05:09:46 +02:00
parent b4d3b886df
commit fa2cf20b01
2 changed files with 41 additions and 14 deletions

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
__version__ = "2.0.2"
_version_tuple = tuple(int(piece, 10) for piece in __version__.split("."))
@@ -158,6 +160,14 @@ class Hint(typing.NamedTuple):
item: int
found: bool
def re_check(self, ctx, team) -> Hint:
if self.found:
return self
found = self.location in ctx.location_checks[team, self.finding_player]
if found:
return Hint(self.receiving_player, self.finding_player, self.location, self.item, found)
return self
def get_public_ipv4() -> str:
import socket
import urllib.request