2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 4548
|
|
|
|
|
// Function ID: 4549
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: gameServerResponseToInstance
|
2026-07-23 10:11:24 +00:00
|
|
|
// Dependencies: [2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 4548 (gameServerResponseToInstance)
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/game_server/utils/gameServerResponseToInstance.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function gameServerResponseToInstance(id) {
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj = { id: id.id, name: id.name, regionId: id.region_id, regionName: id.region_name, planId: id.sku_id, planName: id.plan_name, onlineConnectionsCount: null, maxConnectionsCount: null, serverIP: null, port: null, entitlementId: null, subscriptionId: null, providerType: null, gameServerPanelUrl: null, status: null, gameId: null, gameConfig: null };
|
|
|
|
|
let num = id.players_count;
|
|
|
|
|
if (num == null) {
|
|
|
|
|
num = 0;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
obj.onlineConnectionsCount = num;
|
|
|
|
|
({ max_players_count: obj.maxConnectionsCount, ip: obj.serverIP, port: obj.port, entitlement_id: obj.entitlementId, subscription_id: obj.subscriptionId, provider_type: obj.providerType, provider_url: obj.gameServerPanelUrl, status: obj.status, game_id: obj.gameId, game_config: obj.gameConfig } = id);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
};
|