mirror of
https://github.com/YuzuZensai/VRC-Circle.git
synced 2026-09-13 19:08:52 +00:00
✨ feat: Instance grouping and user count
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export interface Instance {
|
||||
id: string;
|
||||
location: string;
|
||||
worldId: string;
|
||||
instanceId: string;
|
||||
type: string;
|
||||
region?: string;
|
||||
ownerId?: string;
|
||||
userCount: number;
|
||||
capacity: number;
|
||||
recommendedCapacity?: number;
|
||||
full: boolean;
|
||||
queueEnabled: boolean;
|
||||
queueSize: number;
|
||||
}
|
||||
@@ -17,6 +17,7 @@ export type Location = "offline" | "private" | "traveling" | "" | string;
|
||||
export interface ParsedLocation {
|
||||
worldId: string;
|
||||
instanceId: string;
|
||||
instance: string;
|
||||
region?: string;
|
||||
}
|
||||
|
||||
@@ -26,7 +27,7 @@ export function parseLocation(loc?: string): ParsedLocation | null {
|
||||
if (!worldId?.startsWith("wrld_") || !rest) return null;
|
||||
const instanceId = rest.split("~")[0];
|
||||
const region = /~region\(([^)]+)\)/.exec(rest)?.[1];
|
||||
return { worldId, instanceId, region };
|
||||
return { worldId, instanceId, instance: rest, region };
|
||||
}
|
||||
|
||||
export interface Badge {
|
||||
|
||||
Reference in New Issue
Block a user