mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 01:32:55 +02:00
Move player skills and exp to their struct
This commit is contained in:
@@ -15,13 +15,13 @@ import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
|
||||
function requireHackingLevel(lvl: number) {
|
||||
return function (p: IPlayer) {
|
||||
return p.hacking + p.intelligence / 2 >= lvl;
|
||||
return p.skills.hacking + p.skills.intelligence / 2 >= lvl;
|
||||
};
|
||||
}
|
||||
|
||||
function bitFlumeRequirements() {
|
||||
return function (p: IPlayer) {
|
||||
return p.sourceFiles.length > 0 && p.hacking >= 1;
|
||||
return p.sourceFiles.length > 0 && p.skills.hacking >= 1;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -308,11 +308,12 @@ export const programsMetadata: IProgramCreationParams[] = [
|
||||
create: null,
|
||||
run: (router: IRouter, terminal: ITerminal, player: IPlayer): void => {
|
||||
const numAugReq = BitNodeMultipliers.DaedalusAugsRequirement;
|
||||
const fulfilled = player.augmentations.length >= numAugReq && player.money > 1e11 && player.hacking >= 2500;
|
||||
const fulfilled =
|
||||
player.augmentations.length >= numAugReq && player.money > 1e11 && player.skills.hacking >= 2500;
|
||||
if (!fulfilled) {
|
||||
terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);
|
||||
terminal.print(`Money: ${numeralWrapper.formatMoney(player.money)} / $100b`);
|
||||
terminal.print(`Hacking skill: ${player.hacking} / 2500`);
|
||||
terminal.print(`Hacking skill: ${player.skills.hacking} / 2500`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ export function ProgramsRoot(): React.ReactElement {
|
||||
}, []);
|
||||
|
||||
const getHackingLevelRemaining = (lvl: number): number => {
|
||||
return Math.ceil(Math.max(lvl - (player.hacking + player.intelligence / 2), 0));
|
||||
return Math.ceil(Math.max(lvl - (player.skills.hacking + player.skills.intelligence / 2), 0));
|
||||
};
|
||||
|
||||
const getProgCompletion = (name: string): number => {
|
||||
|
||||
Reference in New Issue
Block a user