Start maybe working on a native app

This commit is contained in:
2026-11-22 17:38:28 -03:00
parent 681d3afb4d
commit a552883795
31 changed files with 1881 additions and 678 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import { ClientMessage, EntityInfo, MenuSlotInfo, PlayerInfo, ServerMessage } fr
import type { ModListing } from "@/common/mod_loader.ts";
import { WorldShape } from "@/common/world_shape.ts";
import type { Join, ServerSocket, Welcome } from "./handshake.ts";
import { platform } from "./platform.ts";
export class Connection {
#server: ServerSocket;
@@ -59,5 +60,5 @@ export class Connection {
// what the name field starts as, from ?name=
export function default_player_name(): string {
return new URLSearchParams(location.search).get("name") ?? "";
return platform.page.searchParams.get("name") ?? "";
}