Archived
architecture cleanup
This commit is contained in:
@@ -7,7 +7,7 @@ class Serializable:
|
|||||||
|
|
||||||
uuid: UUID
|
uuid: UUID
|
||||||
|
|
||||||
listeners: List[Callable[[str, dict], Awaitable[Any]]]
|
listeners: List[Callable[[str, dict, Callable], Awaitable[Any]]]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.uuid = uuid4()
|
self.uuid = uuid4()
|
||||||
@@ -26,6 +26,7 @@ class Serializable:
|
|||||||
self,
|
self,
|
||||||
notification_type: str,
|
notification_type: str,
|
||||||
game_object: dict,
|
game_object: dict,
|
||||||
|
client_filter: Callable = lambda _: True,
|
||||||
):
|
):
|
||||||
for l in self.listeners:
|
for l in self.listeners:
|
||||||
await l(notification_type, game_object)
|
await l(notification_type, game_object, client_filter)
|
||||||
|
|||||||
Reference in New Issue
Block a user