mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-02 22:07:06 +02:00
NETSCRIPT: Add ns.formulas.work.companyGains function (#195)
* added ns.formulas.work.companyGains. * Removed Work/Formulas folder, added Work/Formulas.ts * CompanyPosition.calculateJobPerformance now takes in a Person instead of taking in a full set of stats, and it takes INT into account. * formulas.crimeGains takes in a person object. * Renamed ns Player type to Person. * added multWorkStats, which multiplies a WorkStats object with a multipliers object. * Remove unused types in NetscriptDefinitons.d.ts * reuse formulas code in other parts of game * getSleeveInformation also returns skills Co-authored-by: Alexey <alexey.kozhemiakin@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import { isSleeveCompanyWork } from "../PersonObjects/Sleeve/Work/SleeveCompanyW
|
||||
import { helpers } from "../Netscript/NetscriptHelpers";
|
||||
import { Crimes } from "../Crime/Crimes";
|
||||
import { CrimeType } from "../utils/WorkType";
|
||||
import { cloneDeep } from "lodash";
|
||||
|
||||
export function NetscriptSleeve(): InternalAPI<ISleeve> {
|
||||
const checkSleeveAPIAccess = function (ctx: NetscriptContext) {
|
||||
@@ -200,6 +201,7 @@ export function NetscriptSleeve(): InternalAPI<ISleeve> {
|
||||
strengthExp: sl.mults.strength_exp,
|
||||
workMoney: sl.mults.work_money,
|
||||
},
|
||||
skills: cloneDeep(sl.skills),
|
||||
};
|
||||
},
|
||||
getSleeveAugmentations: (ctx) => (_sleeveNumber) => {
|
||||
|
||||
Reference in New Issue
Block a user