Files
bitburner-src/src/Exploits/Exploit.ts
T
2021-03-08 20:31:34 -05:00

25 lines
640 B
TypeScript

/*
*/
export enum Exploit {
UndocumentedFunctionCall = 'UndocumentedFunctionCall',
EditSaveFile = 'EditSaveFile',
PrototypeTampering = 'PrototypeTampering'
}
const names: {
[key: string]: string;
} = {
'UndocumentedFunctionCall': 'by looking beyond the documentation.',
'EditSaveFile': 'by editing your save file.',
'PrototypeTampering': 'by tampering with Numbers prototype.',
}
export function ExploitName(exploit: string): string {
return names[exploit];
}
export function sanitizeExploits(exploits: string[]): string[] {
return exploits.filter((e: string) => Object.keys(Exploit).includes(e));
}