keep track of last item checked time for clients
This commit is contained in:
parent
a4225d29e5
commit
ecc2b03aed
|
@ -10,6 +10,7 @@ import collections
|
||||||
import typing
|
import typing
|
||||||
import inspect
|
import inspect
|
||||||
import weakref
|
import weakref
|
||||||
|
import datetime
|
||||||
|
|
||||||
import ModuleUpdate
|
import ModuleUpdate
|
||||||
|
|
||||||
|
@ -80,6 +81,7 @@ class Context:
|
||||||
self.forfeit_allowed = forfeit_allowed
|
self.forfeit_allowed = forfeit_allowed
|
||||||
self.item_cheat = item_cheat
|
self.item_cheat = item_cheat
|
||||||
self.running = True
|
self.running = True
|
||||||
|
self.client_activity_timers = {}
|
||||||
self.commandprocessor = ServerCommandProcessor(self)
|
self.commandprocessor = ServerCommandProcessor(self)
|
||||||
|
|
||||||
def get_save(self) -> dict:
|
def get_save(self) -> dict:
|
||||||
|
@ -254,6 +256,7 @@ def forfeit_player(ctx: Context, team: int, slot: int):
|
||||||
|
|
||||||
|
|
||||||
def register_location_checks(ctx: Context, team: int, slot: int, locations):
|
def register_location_checks(ctx: Context, team: int, slot: int, locations):
|
||||||
|
ctx.client_activity_timers[team, slot] = datetime.datetime.now(datetime.timezone.utc)
|
||||||
found_items = False
|
found_items = False
|
||||||
for location in locations:
|
for location in locations:
|
||||||
if (location, slot) in ctx.locations:
|
if (location, slot) in ctx.locations:
|
||||||
|
|
Loading…
Reference in New Issue