mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
!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:
10
Utils.py
10
Utils.py
@@ -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
|
||||
|
Reference in New Issue
Block a user