This commit is contained in:
Olivier Gagnon 2022-07-15 01:58:00 -04:00
parent 4bee746576
commit 1d4d86719e
2 changed files with 5 additions and 9 deletions

@ -17,6 +17,8 @@ import {
GangMemberAscension, GangMemberAscension,
EquipmentStats, EquipmentStats,
GangTaskStats, GangTaskStats,
GangTerritory,
GangOtherInfoObject,
} from "../ScriptEditor/NetscriptDefinitions"; } from "../ScriptEditor/NetscriptDefinitions";
import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper"; import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
@ -91,7 +93,7 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript): Inte
}, },
getOtherGangInformation: (ctx: NetscriptContext) => (): GangOtherInfo => { getOtherGangInformation: (ctx: NetscriptContext) => (): GangOtherInfo => {
checkGangApiAccess(ctx); checkGangApiAccess(ctx);
const cpy: any = {}; const cpy: Record<string, GangOtherInfoObject> = {};
for (const gang of Object.keys(AllGangs)) { for (const gang of Object.keys(AllGangs)) {
cpy[gang] = Object.assign({}, AllGangs[gang]); cpy[gang] = Object.assign({}, AllGangs[gang]);
} }
@ -232,7 +234,7 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript): Inte
}, },
getEquipmentCost: getEquipmentCost:
(ctx: NetscriptContext) => (ctx: NetscriptContext) =>
(_equipName: any): number => { (_equipName: unknown): number => {
const equipName = ctx.helper.string("equipName", _equipName); const equipName = ctx.helper.string("equipName", _equipName);
checkGangApiAccess(ctx); checkGangApiAccess(ctx);
const gang = player.gang; const gang = player.gang;

@ -825,13 +825,7 @@ export interface GangOtherInfoObject {
* @public * @public
*/ */
export interface GangOtherInfo { export interface GangOtherInfo {
"Slum Snakes": GangOtherInfoObject; [key: string]: GangOtherInfoObject;
Tetrads: GangOtherInfoObject;
"The Syndicate": GangOtherInfoObject;
"The Dark Army": GangOtherInfoObject;
"Speakers for the Dead": GangOtherInfoObject;
NiteSec: GangOtherInfoObject;
"The Black Hand": GangOtherInfoObject;
} }
/** /**