This commit is contained in:
Olivier Gagnon
2021-11-09 23:57:44 -05:00
5 changed files with 17 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -312,7 +312,6 @@ function loadGame(saveString: string): boolean {
try { try {
const ver = JSON.parse(saveObj.VersionSave, Reviver); const ver = JSON.parse(saveObj.VersionSave, Reviver);
evaluateVersionCompatibility(ver); evaluateVersionCompatibility(ver);
if (window.location.href.toLowerCase().includes("bitburner-beta")) { if (window.location.href.toLowerCase().includes("bitburner-beta")) {
// Beta branch, always show changes // Beta branch, always show changes
createBetaUpdateText(); createBetaUpdateText();
@@ -328,15 +327,22 @@ function loadGame(saveString: string): boolean {
createNewUpdateText(); createNewUpdateText();
} }
createNewUpdateText();
createNewUpdateText();
createNewUpdateText();
return true; return true;
} }
function createNewUpdateText(): void { function createNewUpdateText(): void {
dialogBoxCreate( setTimeout(
"New update!<br>" + () =>
"Please report any bugs/issues through the github repository " + dialogBoxCreate(
"or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>" + "New update!<br>" +
CONSTANTS.LatestUpdate, "Please report any bugs/issues through the github repository " +
"or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>" +
CONSTANTS.LatestUpdate,
),
1000,
); );
} }

View File

@@ -354,7 +354,7 @@ export function Root(props: IProps): React.ReactElement {
.find((l: any) => l.id === "javascript") .find((l: any) => l.id === "javascript")
.loader(); .loader();
l.language.tokenizer.root.unshift(["ns", { token: "ns" }]); l.language.tokenizer.root.unshift(["ns", { token: "ns" }]);
for (const symbol of symbols) l.language.tokenizer.root.unshift(["\\." + symbol, { token: "netscriptfunction" }]); for (const symbol of symbols) l.language.tokenizer.root.unshift([symbol, { token: "netscriptfunction" }]);
const otherKeywords = ["let", "const", "var", "function"]; const otherKeywords = ["let", "const", "var", "function"];
const otherKeyvars = ["true", "false", "null", "undefined"]; const otherKeyvars = ["true", "false", "null", "undefined"];
otherKeywords.forEach((k) => l.language.tokenizer.root.unshift([k, { token: "otherkeywords" }])); otherKeywords.forEach((k) => l.language.tokenizer.root.unshift([k, { token: "otherkeywords" }]));

View File

@@ -7,5 +7,6 @@ export function dialogBoxCreate(txt: string | JSX.Element): void {
AlertEvents.emit(txt); AlertEvents.emit(txt);
} else { } else {
AlertEvents.emit(<span dangerouslySetInnerHTML={{ __html: txt }} />); AlertEvents.emit(<span dangerouslySetInnerHTML={{ __html: txt }} />);
console.log('emit"');
} }
} }