mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
Some cleanup
This commit is contained in:
@@ -6,7 +6,7 @@ import { NetscriptContext } from "../Netscript/APIWrapper";
|
||||
type FlagType = StringConstructor | NumberConstructor | BooleanConstructor | StringConstructor[];
|
||||
type FlagsRet = { [key: string]: ScriptArg };
|
||||
export function Flags(ctx: NetscriptContext | string[]): (data: unknown) => FlagsRet {
|
||||
const vargs = Array.isArray(ctx) ? ctx : ctx.workerScript.args;
|
||||
const vargs = Array.isArray(ctx) ? ctx : ctx.workerScript.args;
|
||||
return (schema: unknown): FlagsRet => {
|
||||
schema = toNative(schema);
|
||||
if (!Array.isArray(schema)) throw new Error("flags schema passed in is invalid.");
|
||||
|
||||
@@ -276,7 +276,10 @@ export function NetscriptGang(): InternalAPI<IGang> {
|
||||
if (!equipment) return false;
|
||||
const res = member.buyUpgrade(equipment, player, gang);
|
||||
if (res) {
|
||||
ctx.workerScript.log("gang.purchaseEquipment", () => `Purchased '${equipName}' for Gang member '${memberName}'`);
|
||||
ctx.workerScript.log(
|
||||
"gang.purchaseEquipment",
|
||||
() => `Purchased '${equipName}' for Gang member '${memberName}'`,
|
||||
);
|
||||
} else {
|
||||
ctx.workerScript.log(
|
||||
"gang.purchaseEquipment",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Player as player} from "../Player";
|
||||
import { Player as player } from "../Player";
|
||||
import { purchaseAugmentation, joinFaction, getFactionAugmentationsFiltered } from "../Faction/FactionHelpers";
|
||||
import { startWorkerScript } from "../NetscriptWorker";
|
||||
import { Augmentation } from "../Augmentation/Augmentation";
|
||||
|
||||
Reference in New Issue
Block a user