mirror of
https://git.suyu.dev/suyu/website.git
synced 2026-01-02 04:34:33 +01:00
add bgs and rooms stuff
This commit is contained in:
parent
188e38c6ec
commit
7ad700c83d
11 changed files with 100 additions and 64 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import type { IRoom, IRoomConfig, RoomPlayer } from "$types/rooms";
|
||||
import { globalData, type SwitchGame } from "../other";
|
||||
import type { SuyuUser } from "../schema";
|
||||
import { v4 } from "uuid";
|
||||
|
||||
|
|
@ -52,6 +53,9 @@ export class Room {
|
|||
netVersion: 1,
|
||||
owner: this.host.username,
|
||||
port: parseInt(parsed[1]),
|
||||
game: globalData.games.find(
|
||||
(g) => g.name.toUpperCase().trim() === config.gameName.toUpperCase().trim(),
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
interface SwitchGame {
|
||||
export interface SwitchGame {
|
||||
bannerUrl: string;
|
||||
category: string[];
|
||||
description: string;
|
||||
developer: null;
|
||||
frontBoxArt: null;
|
||||
// developer: null;
|
||||
// frontBoxArt: null;
|
||||
iconUrl: string;
|
||||
id: string;
|
||||
intro: null | string;
|
||||
isDemo: boolean;
|
||||
key: null;
|
||||
// key: null;
|
||||
languages: string[];
|
||||
name: string;
|
||||
nsuId: number;
|
||||
|
|
@ -16,12 +16,12 @@ interface SwitchGame {
|
|||
publisher: string;
|
||||
rating: number;
|
||||
ratingContent: string[];
|
||||
region: null;
|
||||
// region: null;
|
||||
releaseDate: number;
|
||||
rightsId: string;
|
||||
screenshots: string[];
|
||||
size: number;
|
||||
version: null;
|
||||
// version: null;
|
||||
}
|
||||
export const globalData: {
|
||||
games: SwitchGame[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue