MultiServer:

implement a hint recheck that triggers on get_save()
Still torn if I want a single hint list per team and filter on demand, or have filtered lists and re_check on demand.
This commit is contained in:
Fabian Dill
2021-06-25 21:04:37 +02:00
parent 007f66d86e
commit f870bb3fad
2 changed files with 9 additions and 1 deletions

View File

@@ -244,7 +244,15 @@ class Context(Node):
import atexit
atexit.register(self._save, True) # make sure we save on exit too
def recheck_hints(self):
for team, slot in self.hints:
self.hints[team, slot] = {
hint.re_check(self, team) for hint in
self.hints[team, slot]
}
def get_save(self) -> dict:
self.recheck_hints()
d = {
"connect_names": self.connect_names,
"received_items": self.received_items,