mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Merge pull request #1528 from danielyxie/dev
fix bug with workForFaction
This commit is contained in:
commit
961904d177
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2953,6 +2953,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
return true;
|
||||
},
|
||||
workForFaction: function (name: any, type: any): any {
|
||||
console.log(`${name} ${type}`);
|
||||
updateDynamicRam("workForFaction", getRamCost("workForFaction"));
|
||||
checkSingularityAccess("workForFaction", 2);
|
||||
getFaction("workForFaction", name);
|
||||
|
@ -516,6 +516,7 @@ export function resetWorkStatus(this: IPlayer, generalType?: string, group?: str
|
||||
this.currentWorkFactionDescription = "";
|
||||
this.createProgramName = "";
|
||||
this.className = "";
|
||||
this.workType = "";
|
||||
}
|
||||
|
||||
export function processWorkEarnings(this: IPlayer, numCycles = 1): void {
|
||||
@ -883,6 +884,7 @@ export function startFactionFieldWork(this: IPlayer, router: IRouter, faction: F
|
||||
}
|
||||
|
||||
export function startFactionSecurityWork(this: IPlayer, router: IRouter, faction: Faction): void {
|
||||
console.log(faction);
|
||||
this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkSecurity);
|
||||
|
||||
this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
|
||||
|
@ -361,5 +361,7 @@ export function WorkInProgressRoot(): React.ReactElement {
|
||||
);
|
||||
}
|
||||
|
||||
if (!player.workType) router.toTerminal();
|
||||
|
||||
return <></>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user