UI: Share RAM to boost reputation gain (#1862)

This commit is contained in:
catloversg
2025-01-08 13:35:29 +07:00
committed by GitHub
parent 077d8e7080
commit 1cb2a83b4f
10 changed files with 169 additions and 36 deletions
+2 -1
View File
@@ -25,6 +25,7 @@ import { Settings } from "../Settings/Settings";
import type { ScriptKey } from "../utils/helpers/scriptKey";
import { objectAssert } from "../utils/helpers/typeAssertion";
import { clampNumber } from "../utils/helpers/clampNumber";
interface IConstructorParams {
adminRights?: boolean;
@@ -232,7 +233,7 @@ export abstract class BaseServer implements IServer {
}
updateRamUsed(ram: number): void {
this.ramUsed = ram;
this.ramUsed = clampNumber(ram, 0, this.maxRam);
}
pushProgram(program: ProgramFilePath | CompletedProgramName): void {