d3bed34c6c
Bundles several sessions' worth of previously uncommitted work: map categories with Domination/Conquest/King of the Hill mode stubs and a server-list mode filter; a procedurally-drawn character-creation screen replacing the old callsign-only PROFILE overlay; the on-foot groundwork (walkable station hub, ship interior, character controller) plus the RAM currency backend; and today's addition, an in-ship Helldivers-2-style navigation table that QUICK PLAY's queue/connect flow and the Belters/ Military hub travel now live behind, with hub-and-ship return paths and a context-aware pause menu usable both in-match and inside the ship. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
69 lines
1.6 KiB
Python
69 lines
1.6 KiB
Python
import uuid
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from app.models import Mode
|
|
|
|
|
|
class QueueJoinRequest(BaseModel):
|
|
callsign: str
|
|
mode: Mode
|
|
|
|
|
|
class QueueJoinResponse(BaseModel):
|
|
ticket_id: uuid.UUID
|
|
status: str
|
|
|
|
|
|
class QueueStatusResponse(BaseModel):
|
|
ticket_id: uuid.UUID
|
|
status: str
|
|
server_ip: str | None = None
|
|
server_port: int | None = None
|
|
team: int | None = None
|
|
|
|
|
|
class ServerRegisterRequest(BaseModel):
|
|
ip: str
|
|
port: int
|
|
mode: Mode
|
|
player_count: int = 0
|
|
max_players: int = 50
|
|
# See GameServer.game_mode/map_name in app/models.py -- the in-match
|
|
# GameMode id and map display name, distinct from `mode` (queue mode).
|
|
game_mode: str = "team_deathmatch"
|
|
map_name: str = "Sector Alpha"
|
|
|
|
|
|
class PlayerStatsResponse(BaseModel):
|
|
callsign: str
|
|
mmr: int
|
|
wins: int
|
|
losses: int
|
|
kills: int
|
|
deaths: int
|
|
hours_played: float
|
|
ram_kb: int
|
|
|
|
|
|
# Reported by the hosting game server (never a client directly -- see
|
|
# spacewar/autoload/network_manager.gd's register_server()/heartbeat being
|
|
# server-only-triggered the same way) once a match's MatchManager POST_MATCH
|
|
# phase begins. team here is a race_id (races double as teams, see
|
|
# menu/team_select.gd's RACES), not a 0/1 index.
|
|
class MatchPlayerResult(BaseModel):
|
|
callsign: str
|
|
team: int
|
|
kills: int
|
|
deaths: int
|
|
is_winner: bool
|
|
seconds_played: float
|
|
|
|
|
|
class MatchReportRequest(BaseModel):
|
|
server_ip: str
|
|
server_port: int
|
|
mode: Mode = Mode.casual
|
|
winner_team: int | None = None # None = draw
|
|
players: list[MatchPlayerResult]
|