architecture cleanup

This commit is contained in:
2024-04-04 21:46:51 +02:00
parent 45c6596914
commit 63d5a53701
+3 -2
View File
@@ -7,7 +7,7 @@ class Serializable:
uuid: UUID
listeners: List[Callable[[str, dict], Awaitable[Any]]]
listeners: List[Callable[[str, dict, Callable], Awaitable[Any]]]
def __init__(self):
self.uuid = uuid4()
@@ -26,6 +26,7 @@ class Serializable:
self,
notification_type: str,
game_object: dict,
client_filter: Callable = lambda _: True,
):
for l in self.listeners:
await l(notification_type, game_object)
await l(notification_type, game_object, client_filter)