Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Обновление YogStation #27

Open
wants to merge 2 commits into
base: 2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
replays.yogstation.net
replays.taucetistation.net
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
108 changes: 59 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down
5 changes: 5 additions & 0 deletions src/misc/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
2 changes: 1 addition & 1 deletion src/parser/binary_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/parser/text_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 4 additions & 8 deletions src/player/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 : [] = [];

Expand Down Expand Up @@ -91,12 +92,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 || "master")}/${res_load.path}`;
}
}
res.update();
Expand Down Expand Up @@ -187,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;
}

Expand Down