feat(multiplayer): support play

WIP
This commit is contained in:
MingxuanGame
2025-08-03 12:53:22 +00:00
parent b7bc87b8b6
commit 2600fa499f
11 changed files with 666 additions and 196 deletions

View File

@@ -5,8 +5,6 @@ from typing import Literal, NotRequired, TypedDict
from app.path import STATIC_DIR
from msgpack_lazer_api import APIMod as MsgpackAPIMod
class APIMod(TypedDict):
acronym: str
@@ -169,13 +167,3 @@ def mods_can_get_pp(ruleset_id: int, mods: list[APIMod]) -> bool:
if expected_value != NO_CHECK and value != expected_value:
return False
return True
def msgpack_to_apimod(mod: MsgpackAPIMod) -> APIMod:
"""
Convert a MsgpackAPIMod to an APIMod.
"""
return APIMod(
acronym=mod.acronym,
settings=mod.settings,
)