Improve input
This commit is contained in:
@@ -8,6 +8,7 @@ import { type Host, serve_static, start_host } from "../server/host.ts";
|
||||
import { PROTOCOL_VERSION } from "../common/protocol.ts";
|
||||
import { current_client, update_client } from "./client_updates.ts";
|
||||
import { guard_shortcuts } from "./shortcuts.ts";
|
||||
import { center_mouse } from "./center_mouse.ts";
|
||||
|
||||
// where the project was built from: build/ and server_mods/ (the .bmod files) are bundled into the app with --include
|
||||
const ROOT = fromFileUrl(new URL("../", import.meta.url));
|
||||
@@ -92,6 +93,11 @@ Deno.serve(async (req) => {
|
||||
start.searchParams.set("singleplayer", "");
|
||||
return Response.redirect(start, 302);
|
||||
}
|
||||
// the page let go of the mouse, see center_mouse.ts
|
||||
if (url.pathname === "/desktop/center_mouse" && req.method === "POST") {
|
||||
center_mouse();
|
||||
return new Response(null, { status: 204 });
|
||||
}
|
||||
// the singleplayer server's socket and its .bmod downloads
|
||||
if (url.pathname === "/ws" || url.pathname.startsWith("/mods/")) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user