mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 01:32:55 +02:00
prep v2
This commit is contained in:
@@ -795,14 +795,9 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
|
||||
workForCompany: (_ctx: NetscriptContext) =>
|
||||
function (_companyName: unknown, _focus: unknown = true): boolean {
|
||||
_ctx.helper.checkSingularityAccess();
|
||||
let companyName = _ctx.helper.string("companyName", _companyName);
|
||||
const companyName = _ctx.helper.string("companyName", _companyName);
|
||||
const focus = _ctx.helper.boolean(_focus);
|
||||
|
||||
// Sanitize input
|
||||
if (companyName == null) {
|
||||
companyName = player.companyName;
|
||||
}
|
||||
|
||||
// Make sure its a valid company
|
||||
if (companyName == null || companyName === "" || !(Companies[companyName] instanceof Company)) {
|
||||
_ctx.log(() => `Invalid company: '${companyName}'`);
|
||||
@@ -838,7 +833,7 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
|
||||
player.stopFocusing();
|
||||
Router.toTerminal();
|
||||
}
|
||||
_ctx.log(() => `Began working at '${player.companyName}' as a '${companyPositionName}'`);
|
||||
_ctx.log(() => `Began working at '${companyName}' as a '${companyPositionName}'`);
|
||||
return true;
|
||||
},
|
||||
applyToCompany: (_ctx: NetscriptContext) =>
|
||||
|
||||
Reference in New Issue
Block a user