From 86e8c07f098b5dd2743c48e743577cd94eca516d Mon Sep 17 00:00:00 2001 From: DarkWater Date: Sat, 27 Jul 2024 17:12:28 +0300 Subject: [PATCH 1/2] update by tauceti --- CNAME | 2 +- LICENSE | 2 +- package-lock.json | 108 ++++++++++++++++++++---------------- src/main/menu.ts | 2 +- src/parser/binary_parser.ts | 2 +- src/parser/text_parser.ts | 2 +- src/player/player.ts | 7 +-- 7 files changed, 65 insertions(+), 60 deletions(-) diff --git a/CNAME b/CNAME index 2c51d50..d7f8138 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -replays.yogstation.net \ No newline at end of file +replays.taucetistation.net \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9ab490a..a40f265 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 yogstation13 +Copyright (c) 2019 TauCetiStation/TauCetiClassic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package-lock.json b/package-lock.json index 0b51ef1..ba2d837 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "demo-viewer", + "name": "RViewer", "lockfileVersion": 2, "requires": true, "packages": { @@ -759,9 +759,9 @@ } }, "node_modules/ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, "dependencies": { "jake": "^10.8.5" @@ -903,9 +903,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -1470,9 +1470,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -1593,10 +1593,16 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -1746,9 +1752,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/picomatch": { @@ -1799,9 +1805,9 @@ } }, "node_modules/postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "version": "8.4.40", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz", + "integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==", "dev": true, "funding": [ { @@ -1811,12 +1817,16 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -2591,9 +2601,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3443,9 +3453,9 @@ } }, "ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, "requires": { "jake": "^10.8.5" @@ -3559,9 +3569,9 @@ } }, "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true }, "fs.realpath": { @@ -3953,9 +3963,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "lilconfig": { @@ -4052,9 +4062,9 @@ "dev": true }, "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true }, "node-releases": { @@ -4160,9 +4170,9 @@ "dev": true }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "picomatch": { @@ -4200,14 +4210,14 @@ } }, "postcss": { - "version": "8.4.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", - "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "version": "8.4.40", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz", + "integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==", "dev": true, "requires": { - "nanoid": "^3.3.4", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" } }, "postcss-calc": { @@ -4722,9 +4732,9 @@ "dev": true }, "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true }, "source-map-support": { diff --git a/src/main/menu.ts b/src/main/menu.ts index 35391a5..42640a6 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -116,7 +116,7 @@ export class ContextMenu extends Menu { subtext.textContent = `[0x${obj.ref.toString(16)}]`; fragment.appendChild(button); button.addEventListener("click", () => { - let submenu = new ContextActionMenu(ui, this, obj.ref, obj.clients); + let submenu = new ContextActionMenu(ui, this, obj.ref, obj.clients, true); submenu.put_to_right(button); submenu.open(true); }); diff --git a/src/parser/binary_parser.ts b/src/parser/binary_parser.ts index 821106a..89ae45c 100644 --- a/src/parser/binary_parser.ts +++ b/src/parser/binary_parser.ts @@ -43,7 +43,7 @@ export class DemoParserBinary extends DemoParser { if(commit_info[0] == '{') { this.set_rev_data(JSON.parse(commit_info) as RevData); } else { - this.set_rev_data({commit: commit_info, repo: 'yogstation13/Yogstation'}); + this.set_rev_data({commit: commit_info, repo: 'TauCetiStation/TauCetiClassic'}); } this.load_end = this.read_buffer[commit_hash_end+1] + (this.read_buffer[commit_hash_end+2]<<8) + (this.read_buffer[commit_hash_end+3]<<16) + (this.read_buffer[commit_hash_end+4]<<24); diff --git a/src/parser/text_parser.ts b/src/parser/text_parser.ts index 81eb91b..0d276fb 100644 --- a/src/parser/text_parser.ts +++ b/src/parser/text_parser.ts @@ -66,7 +66,7 @@ export class DemoParserText extends DemoParser { if(command == "commit") { console.log("Commit " + content); - this.set_rev_data({commit: content, repo: "yogstation13/Yogstation"}); + this.set_rev_data({commit: content, repo: "TauCetiStation/TauCetiClassic"}); } else if(command == "init") { [this.maxx,this.maxy,this.maxz] = content.split(" ").map(s=>parseInt(s)); this.resize(this.maxx,this.maxy,this.maxz); diff --git a/src/player/player.ts b/src/player/player.ts index 73c869a..32c5126 100644 --- a/src/player/player.ts +++ b/src/player/player.ts @@ -91,12 +91,7 @@ export class DemoPlayer { if(res_load.path) { res.path = res_load.path; if(!res.data) { - let paintings_pattern = "data/paintings/public/"; - if(res_load.path.startsWith(paintings_pattern) && this.rev_data?.repo == "yogstation13/Yogstation") { - res.load_url = "https://cdn.yogstation.net/paintings/" + res_load.path.substring(paintings_pattern.length); - } else { - res.load_url = `https://cdn.jsdelivr.net/gh/${this.rev_data?.repo || "yogstation13/Yogstation"}@${(this.rev_data?.commit || "master")}/${res_load.path}`; - } + res.load_url = `https://cdn.jsdelivr.net/gh/${this.rev_data?.repo || "TauCetiStation/TauCetiClassic"}@${(this.rev_data?.commit || "HEAD")}/${res_load.path}`; } } res.update(); From 5564cbc1f854f54b30cb33a2455f9c439ed060ab Mon Sep 17 00:00:00 2001 From: DarkWater Date: Sat, 27 Jul 2024 18:07:40 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D1=84=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B5=D0=BD=D0=B4=D0=B6?= =?UTF-8?q?=D0=B0=20=D0=B2=D0=B8=D0=B4=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/misc/constants.ts | 5 +++++ src/player/player.ts | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/misc/constants.ts b/src/misc/constants.ts index f0c58a5..f145ccd 100644 --- a/src/misc/constants.ts +++ b/src/misc/constants.ts @@ -175,4 +175,9 @@ export const enum RenderPlates{ EMISSIVE_SLATE, LIGHT_MASK_PLATE, NON_GAME_PLATE, +} + +export const enum RangeVision{ + RadiusVisionX = 7.5, + RadiusVisionY = 7.5, } \ No newline at end of file diff --git a/src/player/player.ts b/src/player/player.ts index 32c5126..1ea1a70 100644 --- a/src/player/player.ts +++ b/src/player/player.ts @@ -15,6 +15,7 @@ import { despam_promise } from "../misc/promise_despammer"; import { view_turfs } from "./view"; import { animate_appearance, appearance_interpolate } from "./rendering/animation"; import { not_null } from "../misc/gl_util"; +import { RangeVision } from "../misc/constants"; const empty_arr : [] = []; @@ -91,7 +92,7 @@ export class DemoPlayer { if(res_load.path) { res.path = res_load.path; if(!res.data) { - res.load_url = `https://cdn.jsdelivr.net/gh/${this.rev_data?.repo || "TauCetiStation/TauCetiClassic"}@${(this.rev_data?.commit || "HEAD")}/${res_load.path}`; + res.load_url = `https://cdn.jsdelivr.net/gh/${this.rev_data?.repo || "TauCetiStation/TauCetiClassic"}@${(this.rev_data?.commit || "master")}/${res_load.path}`; } } res.update(); @@ -182,8 +183,8 @@ export class DemoPlayer { } if(typeof ref == "string") { - view_dist_x = 9.5; - view_dist_y = 7.5; + view_dist_x = RangeVision.RadiusVisionX; + view_dist_y = RangeVision.RadiusVisionY; view_origin = atom.loc; }