synchronize write and scp

This commit is contained in:
Snarling
2022-08-17 17:11:59 -04:00
parent ba5b0be7f4
commit 95a1c18139
3 changed files with 38 additions and 78 deletions
+2 -2
View File
@@ -113,8 +113,8 @@ export class Script {
* Calculates and updates the script's RAM usage based on its code
* @param {Script[]} otherScripts - Other scripts on the server. Used to process imports
*/
async updateRamUsage(player: IPlayer, otherScripts: Script[]): Promise<void> {
const res = await calculateRamUsage(player, this.code, otherScripts);
updateRamUsage(player: IPlayer, otherScripts: Script[]): void {
const res = calculateRamUsage(player, this.code, otherScripts);
if (res.cost > 0) {
this.ramUsage = roundToTwo(res.cost);
this.ramUsageEntries = res.entries;