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

View File

@@ -29,6 +29,7 @@ import { Go } from "./Go/Go";
import { calculateExp } from "./PersonObjects/formulas/skill";
import { currentNodeMults } from "./BitNode/BitNodeMultipliers";
import { canAccessBitNodeFeature } from "./BitNode/BitNodeUtils";
import { pendingUIShareJobIds } from "./NetworkShare/Share";
const BitNode8StartingMoney = 250e6;
function delayedDialog(message: string) {
@@ -75,6 +76,9 @@ export function prestigeAugmentation(): void {
AddToAllServers(homeComp);
prestigeHomeComputer(homeComp);
// Clear all pending share jobs created via UI
pendingUIShareJobIds.length = 0;
// Receive starting money and programs from installed augmentations
for (const ownedAug of Player.augmentations) {
const aug = Augmentations[ownedAug.name];
@@ -211,6 +215,10 @@ export function prestigeSourceFile(isFlume: boolean): void {
// Reset home computer (only the programs) and add to AllServers
AddToAllServers(homeComp);
prestigeHomeComputer(homeComp);
// Clear all pending share jobs created via UI
pendingUIShareJobIds.length = 0;
// Ram usage needs to be cleared for bitnode-level resets, due to possible change in singularity cost.
for (const script of homeComp.scripts.values()) script.ramUsage = null;