MISC: Add versionNumber to ns.ui.getGameInfo() (#2155)

This commit is contained in:
catloversg
2025-05-26 06:56:22 +07:00
committed by GitHub
parent bf7101c1b0
commit e31b174137
7 changed files with 41 additions and 15 deletions

View File

@@ -159,17 +159,12 @@ export function NetscriptUserInterface(): InternalAPI<IUserInterface> {
},
getGameInfo: () => () => {
const version = CONSTANTS.VersionString;
const commit = commitHash();
const platform = navigator.userAgent.toLowerCase().includes(" electron/") ? "Steam" : "Browser";
const gameInfo = {
version,
commit,
platform,
return {
version: CONSTANTS.VersionString,
versionNumber: CONSTANTS.VersionNumber,
commit: commitHash(),
platform: navigator.userAgent.toLowerCase().includes(" electron/") ? "Steam" : "Browser",
};
return gameInfo;
},
clearTerminal: (ctx) => () => {