Loot (downloads/screenshots) is now sent by the teamserver either on client-connection or when new loot is added. For images, smaller thumbnails are used to reduce size of network packets.

This commit is contained in:
Jakob Friedl
2025-10-09 12:14:38 +02:00
parent bcf845288c
commit 4e0eae77b8
12 changed files with 230 additions and 97 deletions

View File

@@ -143,3 +143,12 @@ proc sendBuildlogItem*(client: WsConnection, logType: LogType, message: string)
)
if client != nil:
client.ws.sendEvent(event, client.sessionKey)
proc sendLoot*(client: WsConnection, loot: LootItem) =
let event = Event(
eventType: CLIENT_LOOT_ADD,
timestamp: now().toTime().toUnix(),
data: %loot
)
if client != nil:
client.ws.sendEvent(event, client.sessionKey)