From 78f4a499fa5fc184a21493d39fa2ced9d2ce7549 Mon Sep 17 00:00:00 2001 From: Holly Date: Wed, 4 Oct 2023 16:21:29 +0100 Subject: [PATCH] oops --- server/commands/BaseCommand.ts | 2 +- tooling/fileSmasher.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/commands/BaseCommand.ts b/server/commands/BaseCommand.ts index 1d91599..26c9d7e 100644 --- a/server/commands/BaseCommand.ts +++ b/server/commands/BaseCommand.ts @@ -6,7 +6,7 @@ import User from "../objects/User"; export default class BaseCommand implements ICommand { public shared:Shared; public readonly adminOnly:boolean = false; - public readonly helpText = "No help page was found for that command"; + public readonly helpText:string = "No help page was found for that command"; public readonly helpDescription:string = "Command has no description set"; public readonly helpArguments:Array = new Array(); diff --git a/tooling/fileSmasher.ts b/tooling/fileSmasher.ts index 2d49b83..3055cd9 100644 --- a/tooling/fileSmasher.ts +++ b/tooling/fileSmasher.ts @@ -5,6 +5,7 @@ import { readdirSync, lstatSync, readFileSync, writeFileSync } from "fs"; let tsFileData:Array = new Array(); +const tsHighPriorityData:Array = new Array(); const tsEvenFirsterData:Array = new Array(); const tsVeryFirstData:Array = new Array(); const tsFirstFileData:Array = new Array(); @@ -25,9 +26,11 @@ function readDir(nam:string) { } else if (file.endsWith(".ts")) { if (file == "Binato.ts") { tsLastFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); + } else if (file.includes("BaseCommand")) { + tsHighPriorityData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); } else if (nam.includes("commands") || file.includes("ConsoleHelper")) { tsEvenFirsterData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); - } else if (file.includes("FunkyArray") || file.includes("ChatManager") || file.includes("MultiplayerManager") || file === "Bot.ts") { + } else if (file.includes("FunkyArray") || file.includes("ChatManager") || file.includes("MultiplayerManager") || file === "BaseCommand.ts" || file.includes("Bot.ts")) { tsVeryFirstData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); } else if (nam.includes("enum") || nam.includes("packets") || (nam.includes("objects") && !file.includes("FunkyArray") ) || file.includes("SpectatorManager")) { tsFirstFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); @@ -40,7 +43,7 @@ function readDir(nam:string) { readDir("./"); -tsFileData = tsFileData.concat(tsEvenFirsterData).concat(tsVeryFirstData).concat(tsFirstFileData).concat(tsEverythingElse).concat(tsLastFileData); +tsFileData = tsFileData.concat(tsHighPriorityData).concat(tsEvenFirsterData).concat(tsVeryFirstData).concat(tsFirstFileData).concat(tsEverythingElse).concat(tsLastFileData); const combinedFiles = tsFileData.join("\n");