From 65cd14e33b0f9b78aa21b2929f3497dc064d7ec2 Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Sun, 20 Nov 2022 12:07:22 -0500 Subject: [PATCH] DOC: Add ns documentation for possible sleeve tasks (#217) * Add specific types for sleeve tasks * Moved LocationName enum to overall enums file * Add LocationName enum to those provided to player * remove trailing s on CompanyPosNames enum (now CompanyPosName, in line with LocationName) * Also regenerated all ns documentation. This leads to an expected error when checking for generated files, because PRs should not normally touch markdown files. Also leads to a lint failure in generated file bitburner.d.ts * also removed some exporting from NetscriptDefinitions.d.ts for anything that wasn't imported somewhere else. --- dist/bitburner.d.ts | 1397 ++++++++++------- markdown/bitburner.activefragment.md | 2 +- markdown/bitburner.augmentpair.md | 2 +- markdown/bitburner.basichgwoptions.md | 2 +- markdown/bitburner.bitnodemultipliers.md | 2 +- .../bitburner.bladeburner.inbladeburner.md | 23 + markdown/bitburner.bladeburner.md | 1 + markdown/bitburner.bladeburnercuraction.md | 2 +- markdown/bitburner.charactermult.agility.md | 13 - .../bitburner.charactermult.agilityexp.md | 13 - markdown/bitburner.charactermult.charisma.md | 13 - .../bitburner.charactermult.charismaexp.md | 13 - .../bitburner.charactermult.companyrep.md | 13 - .../bitburner.charactermult.crimemoney.md | 13 - .../bitburner.charactermult.crimesuccess.md | 13 - markdown/bitburner.charactermult.defense.md | 13 - .../bitburner.charactermult.defenseexp.md | 13 - markdown/bitburner.charactermult.dexterity.md | 13 - .../bitburner.charactermult.dexterityexp.md | 13 - .../bitburner.charactermult.factionrep.md | 13 - markdown/bitburner.charactermult.hacking.md | 13 - .../bitburner.charactermult.hackingexp.md | 13 - markdown/bitburner.charactermult.md | 35 - markdown/bitburner.charactermult.strength.md | 13 - .../bitburner.charactermult.strengthexp.md | 13 - markdown/bitburner.charactermult.workmoney.md | 13 - markdown/bitburner.codingattemptoptions.md | 2 +- markdown/bitburner.companyposname.md | 56 + ...bitburner.corporation.createcorporation.md | 2 +- markdown/bitburner.corporation.enums.md | 16 + .../bitburner.corporation.expandindustry.md | 4 +- .../bitburner.corporation.getbonustime.md | 6 +- ...urner.corporation.getexpandindustrycost.md | 4 +- .../bitburner.corporation.getindustrytypes.md | 19 - .../bitburner.corporation.hascorporation.md | 19 + markdown/bitburner.corporation.md | 10 +- markdown/bitburner.crimestats.md | 3 +- markdown/bitburner.crimestats.name.md | 13 - markdown/bitburner.crimetype.md | 30 + markdown/bitburner.employee.cha.md | 13 - markdown/bitburner.employee.cre.md | 13 - markdown/bitburner.employee.eff.md | 13 - markdown/bitburner.employee.ene.md | 13 - markdown/bitburner.employee.exp.md | 13 - markdown/bitburner.employee.hap.md | 13 - markdown/bitburner.employee.int.md | 13 - markdown/bitburner.employee.loc.md | 13 - markdown/bitburner.employee.md | 31 - markdown/bitburner.employee.mor.md | 13 - markdown/bitburner.employee.name.md | 13 - markdown/bitburner.employee.pos.md | 13 - markdown/bitburner.employee.sal.md | 13 - ...r.employeejobs._research___development_.md | 11 - markdown/bitburner.employeejobs.business.md | 11 - markdown/bitburner.employeejobs.engineer.md | 11 - markdown/bitburner.employeejobs.management.md | 11 - markdown/bitburner.employeejobs.md | 26 - markdown/bitburner.employeejobs.operations.md | 11 - markdown/bitburner.employeejobs.training.md | 11 - markdown/bitburner.employeejobs.unassigned.md | 11 - markdown/bitburner.employeepositions.md | 25 + markdown/bitburner.enums.md | 19 - markdown/bitburner.equipmentstats.md | 2 +- markdown/bitburner.factionworktype.md | 21 + markdown/bitburner.formulas.md | 1 + markdown/bitburner.formulas.mockperson.md | 15 + markdown/bitburner.fragment.md | 2 +- markdown/bitburner.gang.canrecruitmember.md | 4 +- markdown/bitburner.ganggeninfo.md | 2 +- markdown/bitburner.gangmemberascension.md | 2 +- markdown/bitburner.gangmemberinfo.md | 2 +- markdown/bitburner.gangotherinfo.md | 2 +- markdown/bitburner.gangotherinfoobject.md | 2 +- markdown/bitburner.gangtaskstats.md | 2 +- markdown/bitburner.gangterritory.md | 2 +- markdown/bitburner.gymtype.md | 22 + .../bitburner.hackingformulas.growpercent.md | 4 +- .../bitburner.hackingformulas.growtime.md | 4 +- .../bitburner.hackingformulas.hackchance.md | 4 +- markdown/bitburner.hackingformulas.hackexp.md | 4 +- .../bitburner.hackingformulas.hackpercent.md | 4 +- .../bitburner.hackingformulas.hacktime.md | 4 +- .../bitburner.hackingformulas.weakentime.md | 4 +- markdown/bitburner.hackingmultipliers.md | 2 +- markdown/bitburner.hacknetmultipliers.md | 2 +- markdown/bitburner.hacknetnodeconstants.md | 2 +- markdown/bitburner.hacknetserverconstants.md | 2 +- markdown/bitburner.hp.md | 2 +- markdown/bitburner.ilocation.md | 2 +- markdown/bitburner.industrytype.md | 32 + ...urner.infiltration.getpossiblelocations.md | 4 +- markdown/bitburner.infiltrationlocation.md | 2 +- markdown/bitburner.infiltrationreward.md | 2 +- markdown/bitburner.locationname.md | 75 + markdown/bitburner.md | 39 +- .../bitburner.moneysource.augmentations.md | 11 + markdown/bitburner.moneysource.bladeburner.md | 11 + markdown/bitburner.moneysource.casino.md | 11 + markdown/bitburner.moneysource.class.md | 11 + .../bitburner.moneysource.codingcontract.md | 11 + markdown/bitburner.moneysource.corporation.md | 11 + markdown/bitburner.moneysource.crime.md | 11 + markdown/bitburner.moneysource.gang.md | 11 + markdown/bitburner.moneysource.hacking.md | 11 + markdown/bitburner.moneysource.hacknet.md | 11 + .../bitburner.moneysource.hacknet_expenses.md | 11 + .../bitburner.moneysource.hospitalization.md | 11 + .../bitburner.moneysource.infiltration.md | 11 + markdown/bitburner.moneysource.md | 37 + markdown/bitburner.moneysource.other.md | 11 + markdown/bitburner.moneysource.servers.md | 11 + markdown/bitburner.moneysource.sleeves.md | 11 + markdown/bitburner.moneysource.stock.md | 11 + markdown/bitburner.moneysource.total.md | 11 + markdown/bitburner.moneysource.work.md | 11 + markdown/bitburner.moneysources.md | 20 + .../bitburner.moneysources.sinceinstall.md | 11 + markdown/bitburner.moneysources.sincestart.md | 11 + markdown/bitburner.multipliers.agility.md | 2 +- markdown/bitburner.multipliers.agility_exp.md | 2 +- ...burner.multipliers.bladeburner_analysis.md | 2 +- ...ner.multipliers.bladeburner_max_stamina.md | 2 +- ...er.multipliers.bladeburner_stamina_gain.md | 2 +- ....multipliers.bladeburner_success_chance.md | 2 +- markdown/bitburner.multipliers.charisma.md | 2 +- .../bitburner.multipliers.charisma_exp.md | 2 +- markdown/bitburner.multipliers.company_rep.md | 2 +- markdown/bitburner.multipliers.crime_money.md | 2 +- .../bitburner.multipliers.crime_success.md | 2 +- markdown/bitburner.multipliers.defense.md | 2 +- markdown/bitburner.multipliers.defense_exp.md | 2 +- markdown/bitburner.multipliers.dexterity.md | 2 +- .../bitburner.multipliers.dexterity_exp.md | 2 +- markdown/bitburner.multipliers.faction_rep.md | 2 +- markdown/bitburner.multipliers.hacking.md | 2 +- .../bitburner.multipliers.hacking_chance.md | 2 +- markdown/bitburner.multipliers.hacking_exp.md | 2 +- .../bitburner.multipliers.hacking_grow.md | 2 +- .../bitburner.multipliers.hacking_money.md | 2 +- .../bitburner.multipliers.hacking_speed.md | 2 +- ...rner.multipliers.hacknet_node_core_cost.md | 2 +- ...ner.multipliers.hacknet_node_level_cost.md | 2 +- ...itburner.multipliers.hacknet_node_money.md | 2 +- ....multipliers.hacknet_node_purchase_cost.md | 2 +- ...urner.multipliers.hacknet_node_ram_cost.md | 2 +- markdown/bitburner.multipliers.md | 62 +- markdown/bitburner.multipliers.strength.md | 2 +- .../bitburner.multipliers.strength_exp.md | 2 +- markdown/bitburner.multipliers.work_money.md | 2 +- markdown/bitburner.netscriptport.md | 3 +- markdown/bitburner.netscriptport.nextwrite.md | 21 + markdown/bitburner.netscriptport.peek.md | 4 +- markdown/bitburner.netscriptport.read.md | 4 +- markdown/bitburner.netscriptport.write.md | 4 +- markdown/bitburner.nodestats.md | 2 +- markdown/bitburner.ns.closetail.md | 2 +- markdown/bitburner.ns.deleteserver.md | 2 +- markdown/bitburner.ns.disablelog.md | 2 - markdown/bitburner.ns.flags.md | 2 +- .../bitburner.ns.getbitnodemultipliers.md | 12 +- markdown/bitburner.ns.getgrowtime.md | 2 +- markdown/bitburner.ns.gethacktime.md | 6 +- markdown/bitburner.ns.gethostname.md | 2 +- markdown/bitburner.ns.getmoneysources.md | 25 + markdown/bitburner.ns.getscriptlogs.md | 2 +- markdown/bitburner.ns.getscriptram.md | 2 +- markdown/bitburner.ns.getservergrowth.md | 2 +- markdown/bitburner.ns.getservermaxmoney.md | 4 +- markdown/bitburner.ns.getservermaxram.md | 4 +- .../bitburner.ns.getserverminsecuritylevel.md | 2 +- .../bitburner.ns.getservermoneyavailable.md | 2 +- .../bitburner.ns.getservernumportsrequired.md | 2 +- ...burner.ns.getserverrequiredhackinglevel.md | 2 +- .../bitburner.ns.getserversecuritylevel.md | 2 +- markdown/bitburner.ns.getserverusedram.md | 2 +- .../bitburner.ns.gettotalscriptexpgain.md | 4 +- markdown/bitburner.ns.gettotalscriptincome.md | 4 +- markdown/bitburner.ns.getweakentime.md | 6 +- markdown/bitburner.ns.grow.md | 10 +- markdown/bitburner.ns.growthanalyze.md | 6 +- .../bitburner.ns.growthanalyzesecurity.md | 4 +- markdown/bitburner.ns.hack.md | 2 +- markdown/bitburner.ns.hackanalyzesecurity.md | 4 +- markdown/bitburner.ns.hasrootaccess.md | 4 +- markdown/bitburner.ns.hastorrouter.md | 39 + markdown/bitburner.ns.islogenabled.md | 2 +- markdown/bitburner.ns.isrunning.md | 4 +- markdown/bitburner.ns.kill.md | 4 +- markdown/bitburner.ns.kill_1.md | 4 +- markdown/bitburner.ns.ls.md | 2 +- markdown/bitburner.ns.md | 42 +- markdown/bitburner.ns.movetail.md | 4 +- markdown/bitburner.ns.mv.md | 4 +- markdown/bitburner.ns.nformat.md | 4 +- markdown/bitburner.ns.nuke.md | 2 +- markdown/bitburner.ns.print.md | 20 +- markdown/bitburner.ns.prompt.md | 72 +- markdown/bitburner.ns.purchaseserver.md | 6 +- markdown/bitburner.ns.readport.md | 2 +- .../bitburner.ns.renamepurchasedserver.md | 6 +- markdown/bitburner.ns.resizetail.md | 8 +- markdown/bitburner.ns.rm.md | 2 +- markdown/bitburner.ns.scan.md | 44 +- markdown/bitburner.ns.scp.md | 4 +- markdown/bitburner.ns.scriptkill.md | 4 +- markdown/bitburner.ns.scriptrunning.md | 4 +- markdown/bitburner.ns.serverexists.md | 4 +- markdown/bitburner.ns.sleeve.md | 2 +- markdown/bitburner.ns.spawn.md | 2 +- markdown/bitburner.ns.tformat.md | 4 +- markdown/bitburner.ns.toast.md | 6 +- markdown/bitburner.ns.trywriteport.md | 2 +- .../bitburner.ns.upgradepurchasedserver.md | 4 +- markdown/bitburner.ns.weaken.md | 6 +- markdown/bitburner.ns.wget.md | 2 +- markdown/bitburner.ns.write.md | 6 +- markdown/bitburner.ns.writeport.md | 8 +- markdown/bitburner.nsenums.md | 12 +- markdown/bitburner.office.avgene.md | 13 + markdown/bitburner.office.avghap.md | 13 + markdown/bitburner.office.avgmor.md | 13 + markdown/bitburner.office.employeejobs.md | 2 +- markdown/bitburner.office.employeeprod.md | 2 +- markdown/bitburner.office.employees.md | 4 +- markdown/bitburner.office.md | 9 +- markdown/bitburner.officeapi.assignjob.md | 27 - markdown/bitburner.officeapi.getemployee.md | 28 - .../bitburner.officeapi.gethireadvertcost.md | 4 +- markdown/bitburner.officeapi.hireemployee.md | 11 +- markdown/bitburner.officeapi.md | 6 +- markdown/bitburner.ordertypes.md | 2 +- markdown/bitburner.person.city.md | 11 + markdown/bitburner.person.exp.md | 11 + markdown/bitburner.person.hp.md | 11 + markdown/bitburner.person.md | 23 + markdown/bitburner.person.mults.md | 11 + markdown/bitburner.person.skills.md | 11 + markdown/bitburner.player.city.md | 11 - markdown/bitburner.player.exp.md | 11 - markdown/bitburner.player.hascorporation.md | 11 - markdown/bitburner.player.hp.md | 11 - markdown/bitburner.player.inbladeburner.md | 11 - markdown/bitburner.player.md | 11 +- markdown/bitburner.player.mults.md | 11 - markdown/bitburner.player.skills.md | 11 - markdown/bitburner.player.tor.md | 11 - markdown/bitburner.positiontypes.md | 2 +- ...urner.possibleinfiltrationlocation.city.md | 11 - .../bitburner.possibleinfiltrationlocation.md | 20 - ...urner.possibleinfiltrationlocation.name.md | 11 - markdown/bitburner.processinfo.md | 2 +- markdown/bitburner.recentscript.md | 2 +- ...rner.reputationformulas.repfromdonation.md | 4 +- markdown/bitburner.runningscript.md | 2 +- markdown/bitburner.server.md | 2 +- markdown/bitburner.singularity.commitcrime.md | 8 +- ...tburner.singularity.getaugmentationcost.md | 2 +- .../bitburner.singularity.getcrimechance.md | 4 +- .../bitburner.singularity.getcrimestats.md | 4 +- .../bitburner.singularity.workforcompany.md | 30 +- .../bitburner.singularity.workforfaction.md | 36 +- markdown/bitburner.skills.md | 2 +- markdown/bitburner.sleeve.getinformation.md | 32 - markdown/bitburner.sleeve.getnumsleeves.md | 4 +- markdown/bitburner.sleeve.getsleeve.md | 32 + ...urner.sleeve.getsleeveaugmentationprice.md | 4 +- ...rner.sleeve.getsleeveaugmentationrepreq.md | 4 +- ...bitburner.sleeve.getsleeveaugmentations.md | 4 +- ...tburner.sleeve.getsleevepurchasableaugs.md | 4 +- markdown/bitburner.sleeve.getsleevestats.md | 32 - markdown/bitburner.sleeve.gettask.md | 12 +- markdown/bitburner.sleeve.md | 35 +- ...s.memory.md => bitburner.sleeve.memory.md} | 6 +- .../bitburner.sleeve.purchasesleeveaug.md | 4 +- ...bitburner.sleeve.settobladeburneraction.md | 4 +- markdown/bitburner.sleeve.settocommitcrime.md | 20 +- markdown/bitburner.sleeve.settocompanywork.md | 4 +- markdown/bitburner.sleeve.settofactionwork.md | 12 +- markdown/bitburner.sleeve.settogymworkout.md | 4 +- .../bitburner.sleeve.settoshockrecovery.md | 4 +- markdown/bitburner.sleeve.settosynchronize.md | 4 +- .../bitburner.sleeve.settouniversitycourse.md | 4 +- ...lls.shock.md => bitburner.sleeve.shock.md} | 6 +- ...kills.sync.md => bitburner.sleeve.sync.md} | 6 +- markdown/bitburner.sleeve.travel.md | 4 +- markdown/bitburner.sleevebladeburnertask.md | 16 + markdown/bitburner.sleeveclasstask.md | 18 + ...n.hp.md => bitburner.sleevecompanytask.md} | 7 +- markdown/bitburner.sleevecrimetask.md | 14 + markdown/bitburner.sleevefactiontask.md | 18 + ...y.md => bitburner.sleeveinfiltratetask.md} | 7 +- markdown/bitburner.sleeveinformation.city.md | 13 - markdown/bitburner.sleeveinformation.jobs.md | 13 - .../bitburner.sleeveinformation.jobtitle.md | 13 - markdown/bitburner.sleeveinformation.md | 25 - markdown/bitburner.sleeveinformation.mult.md | 13 - markdown/bitburner.sleeveinformation.tor.md | 13 - ...nse.md => bitburner.sleeverecoverytask.md} | 7 +- markdown/bitburner.sleeveskills.charisma.md | 13 - markdown/bitburner.sleeveskills.dexterity.md | 13 - markdown/bitburner.sleeveskills.hacking.md | 13 - markdown/bitburner.sleeveskills.md | 28 - markdown/bitburner.sleeveskills.strength.md | 13 - markdown/bitburner.sleevesupporttask.md | 12 + markdown/bitburner.sleevesynchrotask.md | 12 + markdown/bitburner.sleevetask.md | 13 +- markdown/bitburner.sleeveworkgains.md | 25 - ...itburner.sleeveworkgains.workagiexpgain.md | 13 - ...itburner.sleeveworkgains.workchaexpgain.md | 13 - ...itburner.sleeveworkgains.workdefexpgain.md | 13 - ...itburner.sleeveworkgains.workdexexpgain.md | 13 - ...tburner.sleeveworkgains.workhackexpgain.md | 13 - ...bitburner.sleeveworkgains.workmoneygain.md | 13 - ...itburner.sleeveworkgains.workstrexpgain.md | 13 - markdown/bitburner.sourcefilelvl.md | 2 +- markdown/bitburner.stockorder.md | 2 +- markdown/bitburner.stockorderobject.md | 2 +- markdown/bitburner.toastvariant.md | 14 +- markdown/bitburner.universityclasstype.md | 24 + markdown/bitburner.valuesfrom.md | 12 - markdown/bitburner.workformulas.classgains.md | 24 - .../bitburner.workformulas.companygains.md | 32 + markdown/bitburner.workformulas.crimegains.md | 7 +- ...tburner.workformulas.crimesuccesschance.md | 23 + .../bitburner.workformulas.factiongains.md | 8 +- markdown/bitburner.workformulas.gymgains.md | 26 + markdown/bitburner.workformulas.md | 9 +- .../bitburner.workformulas.universitygains.md | 30 + markdown/bitburner.workstats.md | 2 +- src/Company/data/CompaniesMetadata.ts | 2 +- src/Locations/City.ts | 2 +- src/Locations/Location.ts | 2 +- src/Locations/data/LocationNames.ts | 74 - src/Locations/data/LocationsMetadata.ts | 2 +- src/Locations/ui/City.tsx | 2 +- src/Locations/ui/CompanyLocation.tsx | 2 +- src/Locations/ui/SpecialLocation.tsx | 2 +- src/NetscriptFunctions.ts | 5 +- src/NetscriptFunctions/Formulas.ts | 7 +- src/NetscriptFunctions/Infiltration.ts | 2 +- src/NetscriptFunctions/Singularity.ts | 2 +- .../Grafting/ui/GraftingRoot.tsx | 2 +- src/PersonObjects/Player/PlayerObject.ts | 2 +- .../Player/PlayerObjectGeneralMethods.ts | 2 +- src/PersonObjects/Sleeve/Sleeve.ts | 2 +- .../Sleeve/SleeveTaskTypesEnum.ts | 13 - .../Sleeve/Work/SleeveBladeburnerWork.ts | 7 +- .../Sleeve/Work/SleeveClassWork.ts | 6 +- .../Sleeve/Work/SleeveCompanyWork.ts | 6 +- .../Sleeve/Work/SleeveCrimeWork.ts | 4 +- .../Sleeve/Work/SleeveFactionWork.ts | 4 +- .../Sleeve/Work/SleeveInfiltrateWork.ts | 4 +- .../Sleeve/Work/SleeveRecoveryWork.ts | 4 +- .../Sleeve/Work/SleeveSupportWork.ts | 4 +- .../Sleeve/Work/SleeveSynchroWork.ts | 4 +- src/PersonObjects/Sleeve/Work/Work.ts | 3 +- src/PersonObjects/Sleeve/ui/TaskSelector.tsx | 2 +- src/SaveObject.tsx | 2 +- src/ScriptEditor/NetscriptDefinitions.d.ts | 235 ++- src/Server/data/servers.ts | 2 +- src/StockMarket/data/InitStockMetadata.ts | 2 +- src/StockMarket/data/StockSymbols.ts | 2 +- src/Work/ClassWork.tsx | 2 +- src/Work/CompanyWork.tsx | 2 +- src/Work/Formulas.ts | 2 +- src/ui/GameRoot.tsx | 2 +- src/ui/WorkInProgressRoot.tsx | 2 +- src/utils/enums.ts | 69 +- ...neAllPossibilitiesForTabCompletion.test.ts | 2 +- 369 files changed, 2767 insertions(+), 2449 deletions(-) create mode 100644 markdown/bitburner.bladeburner.inbladeburner.md delete mode 100644 markdown/bitburner.charactermult.agility.md delete mode 100644 markdown/bitburner.charactermult.agilityexp.md delete mode 100644 markdown/bitburner.charactermult.charisma.md delete mode 100644 markdown/bitburner.charactermult.charismaexp.md delete mode 100644 markdown/bitburner.charactermult.companyrep.md delete mode 100644 markdown/bitburner.charactermult.crimemoney.md delete mode 100644 markdown/bitburner.charactermult.crimesuccess.md delete mode 100644 markdown/bitburner.charactermult.defense.md delete mode 100644 markdown/bitburner.charactermult.defenseexp.md delete mode 100644 markdown/bitburner.charactermult.dexterity.md delete mode 100644 markdown/bitburner.charactermult.dexterityexp.md delete mode 100644 markdown/bitburner.charactermult.factionrep.md delete mode 100644 markdown/bitburner.charactermult.hacking.md delete mode 100644 markdown/bitburner.charactermult.hackingexp.md delete mode 100644 markdown/bitburner.charactermult.md delete mode 100644 markdown/bitburner.charactermult.strength.md delete mode 100644 markdown/bitburner.charactermult.strengthexp.md delete mode 100644 markdown/bitburner.charactermult.workmoney.md create mode 100644 markdown/bitburner.companyposname.md create mode 100644 markdown/bitburner.corporation.enums.md delete mode 100644 markdown/bitburner.corporation.getindustrytypes.md create mode 100644 markdown/bitburner.corporation.hascorporation.md delete mode 100644 markdown/bitburner.crimestats.name.md create mode 100644 markdown/bitburner.crimetype.md delete mode 100644 markdown/bitburner.employee.cha.md delete mode 100644 markdown/bitburner.employee.cre.md delete mode 100644 markdown/bitburner.employee.eff.md delete mode 100644 markdown/bitburner.employee.ene.md delete mode 100644 markdown/bitburner.employee.exp.md delete mode 100644 markdown/bitburner.employee.hap.md delete mode 100644 markdown/bitburner.employee.int.md delete mode 100644 markdown/bitburner.employee.loc.md delete mode 100644 markdown/bitburner.employee.md delete mode 100644 markdown/bitburner.employee.mor.md delete mode 100644 markdown/bitburner.employee.name.md delete mode 100644 markdown/bitburner.employee.pos.md delete mode 100644 markdown/bitburner.employee.sal.md delete mode 100644 markdown/bitburner.employeejobs._research___development_.md delete mode 100644 markdown/bitburner.employeejobs.business.md delete mode 100644 markdown/bitburner.employeejobs.engineer.md delete mode 100644 markdown/bitburner.employeejobs.management.md delete mode 100644 markdown/bitburner.employeejobs.md delete mode 100644 markdown/bitburner.employeejobs.operations.md delete mode 100644 markdown/bitburner.employeejobs.training.md delete mode 100644 markdown/bitburner.employeejobs.unassigned.md create mode 100644 markdown/bitburner.employeepositions.md delete mode 100644 markdown/bitburner.enums.md create mode 100644 markdown/bitburner.factionworktype.md create mode 100644 markdown/bitburner.formulas.mockperson.md create mode 100644 markdown/bitburner.gymtype.md create mode 100644 markdown/bitburner.industrytype.md create mode 100644 markdown/bitburner.locationname.md create mode 100644 markdown/bitburner.moneysource.augmentations.md create mode 100644 markdown/bitburner.moneysource.bladeburner.md create mode 100644 markdown/bitburner.moneysource.casino.md create mode 100644 markdown/bitburner.moneysource.class.md create mode 100644 markdown/bitburner.moneysource.codingcontract.md create mode 100644 markdown/bitburner.moneysource.corporation.md create mode 100644 markdown/bitburner.moneysource.crime.md create mode 100644 markdown/bitburner.moneysource.gang.md create mode 100644 markdown/bitburner.moneysource.hacking.md create mode 100644 markdown/bitburner.moneysource.hacknet.md create mode 100644 markdown/bitburner.moneysource.hacknet_expenses.md create mode 100644 markdown/bitburner.moneysource.hospitalization.md create mode 100644 markdown/bitburner.moneysource.infiltration.md create mode 100644 markdown/bitburner.moneysource.md create mode 100644 markdown/bitburner.moneysource.other.md create mode 100644 markdown/bitburner.moneysource.servers.md create mode 100644 markdown/bitburner.moneysource.sleeves.md create mode 100644 markdown/bitburner.moneysource.stock.md create mode 100644 markdown/bitburner.moneysource.total.md create mode 100644 markdown/bitburner.moneysource.work.md create mode 100644 markdown/bitburner.moneysources.md create mode 100644 markdown/bitburner.moneysources.sinceinstall.md create mode 100644 markdown/bitburner.moneysources.sincestart.md create mode 100644 markdown/bitburner.netscriptport.nextwrite.md create mode 100644 markdown/bitburner.ns.getmoneysources.md create mode 100644 markdown/bitburner.ns.hastorrouter.md create mode 100644 markdown/bitburner.office.avgene.md create mode 100644 markdown/bitburner.office.avghap.md create mode 100644 markdown/bitburner.office.avgmor.md delete mode 100644 markdown/bitburner.officeapi.assignjob.md delete mode 100644 markdown/bitburner.officeapi.getemployee.md create mode 100644 markdown/bitburner.person.city.md create mode 100644 markdown/bitburner.person.exp.md create mode 100644 markdown/bitburner.person.hp.md create mode 100644 markdown/bitburner.person.md create mode 100644 markdown/bitburner.person.mults.md create mode 100644 markdown/bitburner.person.skills.md delete mode 100644 markdown/bitburner.player.city.md delete mode 100644 markdown/bitburner.player.exp.md delete mode 100644 markdown/bitburner.player.hascorporation.md delete mode 100644 markdown/bitburner.player.hp.md delete mode 100644 markdown/bitburner.player.inbladeburner.md delete mode 100644 markdown/bitburner.player.mults.md delete mode 100644 markdown/bitburner.player.skills.md delete mode 100644 markdown/bitburner.player.tor.md delete mode 100644 markdown/bitburner.possibleinfiltrationlocation.city.md delete mode 100644 markdown/bitburner.possibleinfiltrationlocation.md delete mode 100644 markdown/bitburner.possibleinfiltrationlocation.name.md delete mode 100644 markdown/bitburner.sleeve.getinformation.md create mode 100644 markdown/bitburner.sleeve.getsleeve.md delete mode 100644 markdown/bitburner.sleeve.getsleevestats.md rename markdown/{bitburner.sleeveskills.memory.md => bitburner.sleeve.memory.md} (55%) rename markdown/{bitburner.sleeveskills.shock.md => bitburner.sleeve.shock.md} (56%) rename markdown/{bitburner.sleeveskills.sync.md => bitburner.sleeve.sync.md} (57%) create mode 100644 markdown/bitburner.sleevebladeburnertask.md create mode 100644 markdown/bitburner.sleeveclasstask.md rename markdown/{bitburner.sleeveinformation.hp.md => bitburner.sleevecompanytask.md} (55%) create mode 100644 markdown/bitburner.sleevecrimetask.md create mode 100644 markdown/bitburner.sleevefactiontask.md rename markdown/{bitburner.sleeveskills.agility.md => bitburner.sleeveinfiltratetask.md} (52%) delete mode 100644 markdown/bitburner.sleeveinformation.city.md delete mode 100644 markdown/bitburner.sleeveinformation.jobs.md delete mode 100644 markdown/bitburner.sleeveinformation.jobtitle.md delete mode 100644 markdown/bitburner.sleeveinformation.md delete mode 100644 markdown/bitburner.sleeveinformation.mult.md delete mode 100644 markdown/bitburner.sleeveinformation.tor.md rename markdown/{bitburner.sleeveskills.defense.md => bitburner.sleeverecoverytask.md} (52%) delete mode 100644 markdown/bitburner.sleeveskills.charisma.md delete mode 100644 markdown/bitburner.sleeveskills.dexterity.md delete mode 100644 markdown/bitburner.sleeveskills.hacking.md delete mode 100644 markdown/bitburner.sleeveskills.md delete mode 100644 markdown/bitburner.sleeveskills.strength.md create mode 100644 markdown/bitburner.sleevesupporttask.md create mode 100644 markdown/bitburner.sleevesynchrotask.md delete mode 100644 markdown/bitburner.sleeveworkgains.md delete mode 100644 markdown/bitburner.sleeveworkgains.workagiexpgain.md delete mode 100644 markdown/bitburner.sleeveworkgains.workchaexpgain.md delete mode 100644 markdown/bitburner.sleeveworkgains.workdefexpgain.md delete mode 100644 markdown/bitburner.sleeveworkgains.workdexexpgain.md delete mode 100644 markdown/bitburner.sleeveworkgains.workhackexpgain.md delete mode 100644 markdown/bitburner.sleeveworkgains.workmoneygain.md delete mode 100644 markdown/bitburner.sleeveworkgains.workstrexpgain.md create mode 100644 markdown/bitburner.universityclasstype.md delete mode 100644 markdown/bitburner.valuesfrom.md delete mode 100644 markdown/bitburner.workformulas.classgains.md create mode 100644 markdown/bitburner.workformulas.companygains.md create mode 100644 markdown/bitburner.workformulas.crimesuccesschance.md create mode 100644 markdown/bitburner.workformulas.gymgains.md create mode 100644 markdown/bitburner.workformulas.universitygains.md delete mode 100644 src/Locations/data/LocationNames.ts delete mode 100644 src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index 25d927e04..d4bc7285b 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -9,7 +9,7 @@ export declare interface ActiveFragment { } /** - * Return value of {@link Sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs} + * Return value of {@link sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs} * @public */ export declare interface AugmentPair { @@ -631,6 +631,13 @@ export declare interface Bladeburner { * @returns Amount of accumulated “bonus time” (milliseconds) for the Bladeburner mechanic. */ getBonusTime(): number; + + /** Returns whether player is a member of bladeburner division. Does not require API access. + * @remarks + * RAM cost: 1 GB + * + * @returns whether player is a member of bladeburner division. */ + inBladeburner(): boolean; } /** @@ -644,44 +651,6 @@ export declare interface BladeburnerCurAction { name: string; } -/** @public */ -export declare interface CharacterMult { - /** Agility stat */ - agility: number; - /** Agility exp */ - agilityExp: number; - /** Charisma stat */ - charisma: number; - /** Charisma exp */ - charismaExp: number; - /** Company reputation */ - companyRep: number; - /** Money earned from crimes */ - crimeMoney: number; - /** Crime success chance */ - crimeSuccess: number; - /** Defense stat */ - defense: number; - /** Defense exp */ - defenseExp: number; - /** Dexterity stat */ - dexterity: number; - /** Dexterity exp */ - dexterityExp: number; - /** Faction reputation */ - factionRep: number; - /** Hacking stat */ - hacking: number; - /** Hacking exp */ - hackingExp: number; - /** Strength stat */ - strength: number; - /** Strength exp */ - strengthExp: number; - /** Money earned from jobs */ - workMoney: number; -} - /** * Options to affect the behavior of {@link CodingContract} attempt. * @public @@ -796,162 +765,178 @@ export declare interface CodingContract { */ export declare type CodingContractData = any; +/** @public */ +export declare enum CompanyPosName { + sw0 = "Software Engineering Intern", + sw1 = "Junior Software Engineer", + sw2 = "Senior Software Engineer", + sw3 = "Lead Software Developer", + sw4 = "Head of Software", + sw5 = "Head of Engineering", + sw6 = "Vice President of Technology", + sw7 = "Chief Technology Officer", + IT0 = "IT Intern", + IT1 = "IT Analyst", + IT2 = "IT Manager", + IT3 = "Systems Administrator", + secEng = "Security Engineer", + netEng0 = "Network Engineer", + netEng1 = "Network Administrator", + bus0 = "Business Intern", + bus1 = "Business Analyst", + bus2 = "Business Manager", + bus3 = "Operations Manager", + bus4 = "Chief Financial Officer", + bus5 = "Chief Executive Officer", + sec0 = "Police Officer", + sec1 = "Police Chief", + sec2 = "Security Guard", + sec3 = "Security Officer", + sec4 = "Security Supervisor", + sec5 = "Head of Security", + agent0 = "Field Agent", + agent1 = "Secret Agent", + agent2 = "Special Operative", + waiter = "Waiter", + employee = "Employee", + softCons0 = "Software Consultant", + softCons1 = "Senior Software Consultant", + busCons0 = "Business Consultant", + busCons1 = "Senior Business Consultant", + waiterPT = "Part-time Waiter", + employeePT = "Part-time Employee", +} + /** * Corporation API * @public */ export declare interface Corporation extends WarehouseAPI, OfficeAPI { - /** - * Create a Corporation - * @param divisionName - Name of the division + /** Enums specific to the corporation game mechanic. */ + enums: { + EmployeePositions: typeof EmployeePositions; + IndustryType: typeof IndustryType; + }; + + /** Returns whether the player has a corporation. Does not require API access. + * @returns whether the player has a corporation */ + hasCorporation(): boolean; + + /** Create a Corporation + * @param corporationName - Name of the corporation * @param selfFund - If you should self fund, defaults to true, false will only work on Bitnode 3 - * @returns true if created and false if not - */ + * @returns true if created and false if not */ createCorporation(corporationName: string, selfFund: boolean): boolean; - /** - * Check if you have a one time unlockable upgrade + + /** Check if you have a one time unlockable upgrade * @param upgradeName - Name of the upgrade - * @returns true if unlocked and false if not - */ + * @returns true if unlocked and false if not */ hasUnlockUpgrade(upgradeName: string): boolean; - /** - * Gets the cost to unlock a one time unlockable upgrade + + /** Gets the cost to unlock a one time unlockable upgrade * @param upgradeName - Name of the upgrade - * @returns cost of the upgrade - */ + * @returns cost of the upgrade */ getUnlockUpgradeCost(upgradeName: string): number; - /** - * Get the level of a levelable upgrade + + /** Get the level of a levelable upgrade * @param upgradeName - Name of the upgrade - * @returns the level of the upgrade - */ + * @returns the level of the upgrade */ getUpgradeLevel(upgradeName: string): number; - /** - * Gets the cost to unlock the next level of a levelable upgrade + + /** Gets the cost to unlock the next level of a levelable upgrade * @param upgradeName - Name of the upgrade - * @returns cost of the upgrade - */ + * @returns cost of the upgrade */ getUpgradeLevelCost(upgradeName: string): number; - /** - * Gets the cost to expand into a new industry + + /** Gets the cost to expand into a new industry * @param industryName - Name of the industry - * @returns cost - */ - getExpandIndustryCost(industryName: string): number; - /** - * Gets the cost to expand into a new city - * @returns cost - */ + * @returns cost */ + getExpandIndustryCost(industryName: IndustryType | `${IndustryType}`): number; + + /** Gets the cost to expand into a new city + * @returns cost */ getExpandCityCost(): number; - /** - * Get an offer for investment based on you companies current valuation - * @returns An offer of investment - */ + + /** Get an offer for investment based on you companies current valuation + * @returns An offer of investment */ getInvestmentOffer(): InvestmentOffer; - /** - * Get list of materials - * @returns material names - */ + + /** Get list of materials + * @returns material names */ getMaterialNames(): string[]; - /** - * Get list of industry types - * @returns industry names - */ - getIndustryTypes(): string[]; - /** - * Get list of one-time unlockable upgrades - * @returns unlockable upgrades names - */ + + /** Get list of one-time unlockable upgrades + * @returns unlockable upgrades names */ getUnlockables(): string[]; - /** - * Get list of upgrade names - * @returns upgrade names - */ + + /** Get list of upgrade names + * @returns upgrade names */ getUpgradeNames(): string[]; - /** - * Get list of research names - * @returns research names - */ + + /** Get list of research names + * @returns research names */ getResearchNames(): string[]; - /** - * Accept investment based on you companies current valuation + + /** Accept investment based on you companies current valuation * @remarks * Is based on current valuation and will not honer a specific Offer - * @returns An offer of investment - */ + * @returns An offer of investment */ acceptInvestmentOffer(): boolean; - /** - * Go public + + /** Go public * @param numShares - number of shares you would like to issue for your IPO - * @returns true if you successfully go public, false if not - */ + * @returns true if you successfully go public, false if not */ goPublic(numShares: number): boolean; - /** - * Bribe a faction + + /** Bribe a faction * @param factionName - Faction name * @param amountCash - Amount of money to bribe - * @returns True if successful, false if not - */ + * @returns True if successful, false if not */ bribe(factionName: string, amountCash: number): boolean; - /** - * Get corporation data - * @returns Corporation data - */ + + /** Get corporation data + * @returns Corporation data */ getCorporation(): CorporationInfo; - /** - * Get division data + + /** Get division data * @param divisionName - Name of the division - * @returns Division data - */ + * @returns Division data */ getDivision(divisionName: string): Division; - /** - * Expand to a new industry + + /** Expand to a new industry * @param industryType - Name of the industry + * @param divisionName - Name of the division */ + expandIndustry(industryType: IndustryType | `${IndustryType}`, divisionName: string): void; + + /** Expand to a new city * @param divisionName - Name of the division - */ - expandIndustry(industryType: string, divisionName: string): void; - /** - * Expand to a new city - * @param divisionName - Name of the division - * @param cityName - Name of the city - */ + * @param cityName - Name of the city */ expandCity(divisionName: string, cityName: string): void; - /** - * Unlock an upgrade - * @param upgradeName - Name of the upgrade - */ + + /** Unlock an upgrade + * @param upgradeName - Name of the upgrade */ unlockUpgrade(upgradeName: string): void; - /** - * Level an upgrade. - * @param upgradeName - Name of the upgrade - */ + + /** Level an upgrade. + * @param upgradeName - Name of the upgrade */ levelUpgrade(upgradeName: string): void; - /** - * Issue dividends - * @param rate - Fraction of profit to issue as dividends. - */ + + /** Issue dividends + * @param rate - Fraction of profit to issue as dividends. */ issueDividends(rate: number): void; - /** - * Buyback Shares - * @param amount - Amount of shares to buy back. - * - */ + + /** Buyback Shares + * @param amount - Amount of shares to buy back. */ buyBackShares(amount: number): void; - /** - * Sell Shares - * @param amount - Amount of shares to sell. - * - */ + + /** Sell Shares + * @param amount - Amount of shares to sell. */ sellShares(amount: number): void; - /** - * Get bonus time. - * + + /** Get bonus time. * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser. - * * “Bonus time” makes the game progress faster. - * - * @returns Bonus time for the Corporation mechanic in milliseconds. - */ + * @returns Bonus time for the Corporation mechanic in milliseconds. */ getBonusTime(): number; } @@ -1005,8 +990,6 @@ export declare interface CrimeStats { kills: number; /** How much money is given */ money: number; - /** Name of crime */ - name: string; /** Milliseconds it takes to attempt the crime */ time: number; /** Description of the crime activity */ @@ -1039,6 +1022,22 @@ export declare interface CrimeStats { intelligence_exp: number; } +/** @public */ +export declare enum CrimeType { + shoplift = "Shoplift", + robStore = "Rob Store", + mug = "Mug", + larceny = "Larceny", + dealDrugs = "Deal Drugs", + bondForgery = "Bond Forgery", + traffickArms = "Traffick Arms", + homicide = "Homicide", + grandTheftAuto = "Grand Theft Auto", + kidnap = "Kidnap", + assassination = "Assassination", + heist = "Heist", +} + /** * Corporation division * @public @@ -1074,60 +1073,16 @@ export declare interface Division { makesProducts: boolean; } -/** - * Employee in an office - * @public - */ -export declare interface Employee { - /** Name of the employee */ - name: string; - /** Morale of the employee */ - mor: number; - /** Happiness of the employee */ - hap: number; - /** Energy of the employee */ - ene: number; - /** Intelligence of the employee */ - int: number; - /** Charisma of the employee */ - cha: number; - /** Experience of the employee */ - exp: number; - /** Creativity of the employee */ - cre: number; - /** Efficiency of the employee */ - eff: number; - /** Salary of the employee */ - sal: number; - /** Current Location (city) */ - loc: string; - /** Current job position */ - pos: string; -} - -/** - * Object representing the number of employee in each job. - * @public - */ -export declare interface EmployeeJobs { - Operations: number; - Engineer: number; - Business: number; - Management: number; - "Research & Development": number; - Training: number; - Unassigned: number; -} - /** @public */ -export declare const enums = { - toast: { - SUCCESS: "success", - WARNING: "warning", - ERROR: "error", - INFO: "info", - }, -}; +export declare enum EmployeePositions { + Operations = "Operations", + Engineer = "Engineer", + Business = "Business", + Management = "Management", + RandD = "Research & Development", + Training = "Training", + Unassigned = "Unassigned", +} /** * Object representing data representing a gang member equipment. @@ -1161,6 +1116,13 @@ export declare interface Export { amt: string; } +/** @public */ +export declare enum FactionWorkType { + hacking = "hacking", + field = "field", + security = "security", +} + /** @public */ export declare type FilenameOrPID = number | string; @@ -1173,6 +1135,7 @@ export declare type FilenameOrPID = number | string; export declare interface Formulas { mockServer(): Server; mockPlayer(): Player; + mockPerson(): Person; /** Reputation formulas */ reputation: ReputationFormulas; /** Skills formulas */ @@ -1283,7 +1246,15 @@ export declare interface Gang { * @remarks * RAM cost: 1 GB * - * Returns boolean indicating whether a member can currently be recruited + * Returns a boolean indicating whether a member can currently be recruited. + * + * Once you have successfully created a gang by using the function + * {@link Gang.createGang | createGang}, you can immediately recruit a small + * number of members to your gang. After you have recruited the founding + * members, to recruit another member you must increase your respect. The + * more members you want to recruit, the more respect you require. If your + * gang has the maximum number of members, then this function would return + * false. * * @returns True if a member can currently be recruited, false otherwise. */ @@ -1763,6 +1734,14 @@ export declare interface Grafting { graftAugmentation(augName: string, focus?: boolean): boolean; } +/** @public */ +export declare enum GymType { + strength = "str", + defense = "def", + dexterity = "dex", + agility = "agi", +} + /** * Hacking formulas * @public @@ -1775,7 +1754,7 @@ export declare interface HackingFormulas { * @param player - Player info from {@link NS.getPlayer | getPlayer} * @returns The calculated hack chance. */ - hackChance(server: Server, player: Player): number; + hackChance(server: Server, player: Person): number; /** * Calculate hack exp for one thread. * @remarks @@ -1784,7 +1763,7 @@ export declare interface HackingFormulas { * @param player - Player info from {@link NS.getPlayer | getPlayer} * @returns The calculated hack exp. */ - hackExp(server: Server, player: Player): number; + hackExp(server: Server, player: Person): number; /** * Calculate hack percent for one thread. * (Ex: 0.25 would steal 25% of the server's current value.) @@ -1794,7 +1773,7 @@ export declare interface HackingFormulas { * @param player - Player info from {@link NS.getPlayer | getPlayer} * @returns The calculated hack percent. */ - hackPercent(server: Server, player: Player): number; + hackPercent(server: Server, player: Person): number; /** * Calculate the percent a server would grow to. * (Ex: 3.0 would would grow the server to 300% of its current value.) @@ -1804,28 +1783,28 @@ export declare interface HackingFormulas { * @param cores - Number of cores on the computer that will execute grow. * @returns The calculated grow percent. */ - growPercent(server: Server, threads: number, player: Player, cores?: number): number; + growPercent(server: Server, threads: number, player: Person, cores?: number): number; /** * Calculate hack time. * @param server - Server info from {@link NS.getServer | getServer} * @param player - Player info from {@link NS.getPlayer | getPlayer} * @returns The calculated hack time. */ - hackTime(server: Server, player: Player): number; + hackTime(server: Server, player: Person): number; /** * Calculate grow time. * @param server - Server info from {@link NS.getServer | getServer} * @param player - Player info from {@link NS.getPlayer | getPlayer} * @returns The calculated grow time. */ - growTime(server: Server, player: Player): number; + growTime(server: Server, player: Person): number; /** * Calculate weaken time. * @param server - Server info from {@link NS.getServer | getServer} * @param player - Player info from {@link NS.getPlayer | getPlayer} * @returns The calculated weaken time. */ - weakenTime(server: Server, player: Player): number; + weakenTime(server: Server, player: Person): number; } /** @@ -2418,6 +2397,24 @@ export declare interface ILocation { name: string; } +/** @public */ +export declare enum IndustryType { + Energy = "Energy", + Utilities = "Water Utilities", + Agriculture = "Agriculture", + Fishing = "Fishing", + Mining = "Mining", + Food = "Food", + Tobacco = "Tobacco", + Chemical = "Chemical", + Pharmaceutical = "Pharmaceutical", + Computers = "Computer Hardware", + Robotics = "Robotics", + Software = "Software", + Healthcare = "Healthcare", + RealEstate = "RealEstate", +} + /** * Infiltration API. * @public @@ -2430,7 +2427,7 @@ export declare interface Infiltration { * * @returns all locations that can be infiltrated. */ - getPossibleLocations(): PossibleInfiltrationLocation[]; + getPossibleLocations(): ILocation[]; /** * Get all infiltrations with difficulty, location and rewards. * @remarks @@ -2477,6 +2474,74 @@ export declare interface IStyleSettings { lineHeight: number; } +/** Names of all locations + * @public */ +export declare enum LocationName { + AevumAeroCorp = "AeroCorp", + AevumBachmanAndAssociates = "Bachman & Associates", + AevumClarkeIncorporated = "Clarke Incorporated", + AevumCrushFitnessGym = "Crush Fitness Gym", + AevumECorp = "ECorp", + AevumFulcrumTechnologies = "Fulcrum Technologies", + AevumGalacticCybersystems = "Galactic Cybersystems", + AevumNetLinkTechnologies = "NetLink Technologies", + AevumPolice = "Aevum Police Headquarters", + AevumRhoConstruction = "Rho Construction", + AevumSnapFitnessGym = "Snap Fitness Gym", + AevumSummitUniversity = "Summit University", + AevumWatchdogSecurity = "Watchdog Security", + AevumCasino = "Iker Molina Casino", + + ChongqingKuaiGongInternational = "KuaiGong International", + ChongqingSolarisSpaceSystems = "Solaris Space Systems", + ChongqingChurchOfTheMachineGod = "Church of the Machine God", + + Sector12AlphaEnterprises = "Alpha Enterprises", + Sector12BladeIndustries = "Blade Industries", + Sector12CIA = "Central Intelligence Agency", + Sector12CarmichaelSecurity = "Carmichael Security", + Sector12CityHall = "Sector-12 City Hall", + Sector12DeltaOne = "DeltaOne", + Sector12FoodNStuff = "FoodNStuff", + Sector12FourSigma = "Four Sigma", + Sector12IcarusMicrosystems = "Icarus Microsystems", + Sector12IronGym = "Iron Gym", + Sector12JoesGuns = "Joe's Guns", + Sector12MegaCorp = "MegaCorp", + Sector12NSA = "National Security Agency", + Sector12PowerhouseGym = "Powerhouse Gym", + Sector12RothmanUniversity = "Rothman University", + Sector12UniversalEnergy = "Universal Energy", + + NewTokyoDefComm = "DefComm", + NewTokyoGlobalPharmaceuticals = "Global Pharmaceuticals", + NewTokyoNoodleBar = "Noodle Bar", + NewTokyoVitaLife = "VitaLife", + NewTokyoArcade = "Arcade", + + IshimaNovaMedical = "Nova Medical", + IshimaOmegaSoftware = "Omega Software", + IshimaStormTechnologies = "Storm Technologies", + IshimaGlitch = "0x6C1", + + VolhavenCompuTek = "CompuTek", + VolhavenHeliosLabs = "Helios Labs", + VolhavenLexoCorp = "LexoCorp", + VolhavenMilleniumFitnessGym = "Millenium Fitness Gym", + VolhavenNWO = "NWO", + VolhavenOmniTekIncorporated = "OmniTek Incorporated", + VolhavenOmniaCybersystems = "Omnia Cybersystems", + VolhavenSysCoreSecurities = "SysCore Securities", + VolhavenZBInstituteOfTechnology = "ZB Institute of Technology", + + Hospital = "Hospital", + Slums = "The Slums", + TravelAgency = "Travel Agency", + WorldStockExchange = "World Stock Exchange", + + Void = "The Void", +} + /** * Material in a warehouse * @public @@ -2504,68 +2569,97 @@ export declare interface Material { exp: Export[]; } +/** @public */ +export declare interface MoneySource { + bladeburner: number; + casino: number; + class: number; + codingcontract: number; + corporation: number; + crime: number; + gang: number; + hacking: number; + hacknet: number; + hacknet_expenses: number; + hospitalization: number; + infiltration: number; + sleeves: number; + stock: number; + total: number; + work: number; + servers: number; + other: number; + augmentations: number; +} + +/** @public */ +export declare interface MoneySources { + sinceInstall: MoneySource; + sinceStart: MoneySource; +} + /** @public */ export declare interface Multipliers { /** Multiplier to hacking skill */ - hacking?: number; + hacking: number; /** Multiplier to strength skill */ - strength?: number; + strength: number; /** Multiplier to defense skill */ - defense?: number; + defense: number; /** Multiplier to dexterity skill */ - dexterity?: number; + dexterity: number; /** Multiplier to agility skill */ - agility?: number; + agility: number; /** Multiplier to charisma skill */ - charisma?: number; + charisma: number; /** Multiplier to hacking experience gain rate */ - hacking_exp?: number; + hacking_exp: number; /** Multiplier to strength experience gain rate */ - strength_exp?: number; + strength_exp: number; /** Multiplier to defense experience gain rate */ - defense_exp?: number; + defense_exp: number; /** Multiplier to dexterity experience gain rate */ - dexterity_exp?: number; + dexterity_exp: number; /** Multiplier to agility experience gain rate */ - agility_exp?: number; + agility_exp: number; /** Multiplier to charisma experience gain rate */ - charisma_exp?: number; + charisma_exp: number; /** Multiplier to chance of successfully performing a hack */ - hacking_chance?: number; + hacking_chance: number; /** Multiplier to hacking speed */ - hacking_speed?: number; + hacking_speed: number; /** Multiplier to amount of money the player gains from hacking */ - hacking_money?: number; + hacking_money: number; /** Multiplier to amount of money injected into servers using grow */ - hacking_grow?: number; + hacking_grow: number; /** Multiplier to amount of reputation gained when working */ - company_rep?: number; + company_rep: number; /** Multiplier to amount of reputation gained when working */ - faction_rep?: number; + faction_rep: number; /** Multiplier to amount of money gained from crimes */ - crime_money?: number; + crime_money: number; /** Multiplier to crime success rate */ - crime_success?: number; + crime_success: number; /** Multiplier to amount of money gained from working */ - work_money?: number; + work_money: number; /** Multiplier to amount of money produced by Hacknet Nodes */ - hacknet_node_money?: number; + hacknet_node_money: number; /** Multiplier to cost of purchasing a Hacknet Node */ - hacknet_node_purchase_cost?: number; + hacknet_node_purchase_cost: number; /** Multiplier to cost of ram for a Hacknet Node */ - hacknet_node_ram_cost?: number; + hacknet_node_ram_cost: number; /** Multiplier to cost of core for a Hacknet Node */ - hacknet_node_core_cost?: number; + hacknet_node_core_cost: number; /** Multiplier to cost of leveling up a Hacknet Node */ - hacknet_node_level_cost?: number; + hacknet_node_level_cost: number; /** Multiplier to Bladeburner max stamina */ - bladeburner_max_stamina?: number; + bladeburner_max_stamina: number; /** Multiplier to Bladeburner stamina gain rate */ - bladeburner_stamina_gain?: number; + bladeburner_stamina_gain: number; /** Multiplier to effectiveness in Bladeburner Field Analysis */ - bladeburner_analysis?: number; + bladeburner_analysis: number; /** Multiplier to success chance in Bladeburner contracts/operations */ - bladeburner_success_chance?: number; + bladeburner_success_chance: number; } /** @@ -2580,7 +2674,7 @@ export declare interface NetscriptPort { * * @returns The data popped off the queue if it was full. */ - write(value: string | number): null | string | number; + write(value: string | number): PortData | null; /** * Attempt to write data to the port. @@ -2591,6 +2685,13 @@ export declare interface NetscriptPort { */ tryWrite(value: string | number): boolean; + /** + * Sleeps until the port is written to. + * @remarks + * RAM cost: 0 GB + */ + nextWrite(): Promise; + /** * Shift an element out of the port. * @remarks @@ -2600,7 +2701,7 @@ export declare interface NetscriptPort { * If the port is empty, then the string “NULL PORT DATA” will be returned. * @returns the data read. */ - read(): string | number; + read(): PortData; /** * Retrieve the first element from the port without removing it. @@ -2612,7 +2713,7 @@ export declare interface NetscriptPort { * the port is empty, the string “NULL PORT DATA” will be returned. * @returns the data read */ - peek(): string | number; + peek(): PortData; /** * Check if the port is full. @@ -2723,7 +2824,7 @@ export declare interface NS { * Namespace for sleeve functions. * @remarks RAM cost: 0 GB */ - readonly sleeve: Sleeve; + readonly sleeve: sleeve; /** * Namespace for stock functions. @@ -2788,7 +2889,7 @@ export declare interface NS { readonly args: (string | number | boolean)[]; /** - * Steal a servers money. + * Steal a server's money. * @remarks * RAM cost: 0.1 GB * @@ -2820,7 +2921,7 @@ export declare interface NS { hack(host: string, opts?: BasicHGWOptions): Promise; /** - * Spoof money in a servers bank account, increasing the amount available. + * Spoof money in a server's bank account, increasing the amount available. * @remarks * RAM cost: 0.15 GB * @@ -2829,10 +2930,10 @@ export declare interface NS { * security level. When `grow` completes, the money available on a target server will * be increased by a certain, fixed percentage. This percentage is determined by the * target server’s growth rate (which varies between servers) and security level. Generally, - * higher-level servers have higher growth rates. The getServerGrowth() function can be used + * higher-level servers have higher growth rates. The {@link NS.getServerGrowth | getServerGrowth} function can be used * to obtain a server’s growth rate. * - * Like hack, `grow` can be called on any server, regardless of where the script is running. + * Like {@link NS.hack | hack}, `grow` can be called on any server, regardless of where the script is running. * The grow() command requires root access to the target server, but there is no required hacking * level to run the command. It also raises the security level of the target server by 0.004. * @@ -2840,13 +2941,13 @@ export declare interface NS { * ```ts * // NS1: * var currentMoney = getServerMoneyAvailable("foodnstuff"); - * currentMoney = currentMoney * (1 + grow("foodnstuff")); + * currentMoney = currentMoney * grow("foodnstuff"); * ``` * @example * ```ts * // NS2: * let currentMoney = ns.getServerMoneyAvailable("foodnstuff"); - * currentMoney *= (1 + await ns.grow("foodnstuff")); + * currentMoney *= await ns.grow("foodnstuff"); * ``` * @param host - Hostname of the target server to grow. * @param opts - Optional parameters for configuring function behavior. @@ -2855,17 +2956,17 @@ export declare interface NS { grow(host: string, opts?: BasicHGWOptions): Promise; /** - * Reduce a server security level. + * Reduce a server's security level. * @remarks * RAM cost: 0.15 GB * * Use your hacking skills to attack a server’s security, lowering the server’s security level. - * The runtime for this command depends on your hacking level and the target server’s security + * The runtime for this function depends on your hacking level and the target server’s security * level when this function is called. This function lowers the security level of the target server by 0.05. * - * Like hack and grow, `weaken` can be called on any server, regardless of - * where the script is running. This command requires root access to the target server, but - * there is no required hacking level to run the command. + * Like {@link NS.hack | hack} and {@link NS.grow| grow}, `weaken` can be called on any server, regardless of + * where the script is running. This function requires root access to the target server, but + * there is no required hacking level to run the function. * * @example * ```ts @@ -2949,14 +3050,14 @@ export declare interface NS { hackAnalyze(host: string): number; /** - * Get the security increase for a number of thread. + * Get the security increase for a number of threads. * @remarks * RAM cost: 1 GB * * Returns the security increase that would occur if a hack with this many threads happened. * * @param threads - Amount of threads that will be used. - * @param hostname - Hostname of the target server. The number of threads is limited to the number needed to hack the servers maximum amount of money. + * @param hostname - Hostname of the target server. The number of threads is limited to the number needed to hack the server's maximum amount of money. * @returns The security increase. */ hackAnalyzeSecurity(threads: number, hostname?: string): number; @@ -2976,7 +3077,7 @@ export declare interface NS { hackAnalyzeChance(host: string): number; /** - * Calculate the number of grow thread needed to grow a server by a certain multiplier. + * Calculate the number of grow threads needed to grow a server by a certain multiplier. * @remarks * RAM cost: 1 GB * @@ -3001,20 +3102,20 @@ export declare interface NS { * //If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads). * ``` * @param host - Hostname of the target server. - * @param growthAmount - Multiplicative factor by which the server is grown. Decimal form.. - * @returns The amount of grow calls needed to grow the specified server by the specified amount + * @param growthAmount - Multiplicative factor by which the server is grown. Decimal form. + * @returns The amount of grow calls needed to grow the specified server by the specified amount. */ growthAnalyze(host: string, growthAmount: number, cores?: number): number; /** - * Calculate the security increase for a number of thread. + * Calculate the security increase for a number of threads. * @remarks * RAM cost: 1 GB * * Returns the security increase that would occur if a grow with this many threads happened. * * @param threads - Amount of threads that will be used. - * @param hostname - Optional. Hostname of the target server. The number of threads is limited to the number needed to hack the servers maximum amount of money. + * @param hostname - Optional. Hostname of the target server. The number of threads is limited to the number needed to hack the server's maximum amount of money. * @param cores - Optional. The number of cores of the server that would run grow. * @returns The security increase. */ @@ -3060,7 +3161,7 @@ export declare interface NS { asleep(millis: number): Promise; /** - * Prints one or move values or variables to the script’s logs. + * Prints one or more values or variables to the script’s logs. * @remarks * RAM cost: 0 GB * @@ -3102,12 +3203,9 @@ export declare interface NS { * var green = "\u001b[32m"; * var red = "\u001b[31m"; * var reset = "\u001b[0m"; - * var msgError = red + "Ugh! What a mess." + reset; - * var msgSuccess = green + "Well done!" + reset; - * var msgMixed = cyan + "ERROR Should this be in red?" + reset; - * print(msgError); - * print(msgSuccess); - * print(msgMixed); + * print(red + "Ugh! What a mess." + reset); + * print(green + "Well done!" + reset); + * print(cyan + "ERROR Should this be in red?" + reset); * tail(); * ``` * @example @@ -3126,12 +3224,9 @@ export declare interface NS { * const green = "\u001b[32m"; * const red = "\u001b[31m"; * const reset = "\u001b[0m"; - * const msgError = "Ugh! What a mess."; - * const msgSuccess = "Well done!"; - * const msgMixed = "ERROR Should this be in red?"; - * ns.print(`${red + msgError + reset}`); - * ns.print(`${green + msgSuccess + reset}`); - * ns.print(`${cyan + msgMixed + reset}`); + * ns.print(`${red}Ugh! What a mess.${reset}`); + * ns.print(`${green}Well done!${reset}`); + * ns.print(`${cyan}ERROR Should this be in red?${reset}`); * ns.tail(); * ``` * @@ -3221,10 +3316,6 @@ export declare interface NS { * * Logging can be disabled for all functions by passing `ALL` as the argument. * - * Note that this does not completely remove all logging functionality. - * This only stops a function from logging when the function is successful. - * If the function fails, it will still log the reason for failure. - * * @param fn - Name of function for which to disable logging. */ disableLog(fn: string): void; @@ -3247,7 +3338,7 @@ export declare interface NS { * RAM cost: 0 GB * * @param fn - Name of function to check. - * @returns Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`) + * @returns Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`). */ isLogEnabled(fn: string): boolean; @@ -3291,7 +3382,7 @@ export declare interface NS { * @param fn - Optional. Filename of script to get logs from. * @param host - Optional. Hostname of the server that the script is on. * @param args - Arguments to identify which scripts to get logs for. - * @returns Returns an string array, where each line is an element in the array. The most recently logged line is at the end of the array. + * @returns Returns a string array, where each line is an element in the array. The most recently logged line is at the end of the array. */ getScriptLogs(fn?: string, host?: string, ...args: (string | number | boolean)[]): string[]; @@ -3359,11 +3450,11 @@ export declare interface NS { tail(fn?: FilenameOrPID, host?: string, ...args: (string | number | boolean)[]): void; /** - * Move a tail window + * Move a tail window. * @remarks * RAM cost: 0 GB * - * Moves a tail window. Coordinates are in screenspace pixels (top left is 0,0) + * Moves a tail window. Coordinates are in screenspace pixels (top left is 0,0). * * @param x - x coordinate. * @param y - y coordinate. @@ -3372,14 +3463,14 @@ export declare interface NS { moveTail(x: number, y: number, pid?: number): void; /** - * Resize a tail window + * Resize a tail window. * @remarks * RAM cost: 0 GB * - * Resize a tail window. Size are in pixel + * Resize a tail window. Size are in pixel. * - * @param width - width of the window. - * @param height - height of the window. + * @param width - Width of the window. + * @param height - Height of the window. * @param pid - Optional. PID of the script having its tail resized. If omitted, the current script is used. */ resizeTail(width: number, height: number, pid?: number): void; @@ -3389,7 +3480,7 @@ export declare interface NS { * @remarks * RAM cost: 0 GB * - * Closes a script’s logs. This is functionally the same pressing the "Close" button on the tail window. + * Closes a script’s logs. This is functionally the same as pressing the "Close" button on the tail window. * * If the function is called with no arguments, it will close the current script’s logs. * @@ -3408,17 +3499,71 @@ export declare interface NS { * node way from the specified target server. The hostnames in the returned * array are strings. * - * @param host - Optional, Hostname of the server to scan, default to current server. - * @returns Returns an string of hostnames. + * @example + * ```ts + * // NS1 + * // All servers that are one hop from the current server. + * tprint("Neighbors of current server."); + * var neighbor = scan(); + * for (var i = 0; i < neighbor.length; i++) { + * tprint(neighbor[i]); + * } + * // All neighbors of n00dles. + * var target = "n00dles"; + * neighbor = scan(target); + * tprintf("Neighbors of %s.", target); + * for (var i = 0; i < neighbor.length; i++) { + * tprint(neighbor[i]); + * } + * ``` + * @example + * ```ts + * // NS2 + * // All servers that are one hop from the current server. + * ns.tprint("Neighbors of current server."); + * let neighbor = ns.scan(); + * for (let i = 0; i < neighbor.length; i++) { + * ns.tprint(neighbor[i]); + * } + * // All neighbors of n00dles. + * const target = "n00dles"; + * neighbor = ns.scan(target); + * ns.tprintf("Neighbors of %s.", target); + * for (let i = 0; i < neighbor.length; i++) { + * ns.tprint(neighbor[i]); + * } + * ``` + * + * @param host - Optional. Hostname of the server to scan, default to current server. + * @returns Returns an array of hostnames. */ scan(host?: string): string[]; + /** Returns whether the player has access to the darkweb. + * @remarks + * RAM cost: 0.05GB + * + * @example + * ```js + * // NS1: + * if (hasTorRouter()) tprint("TOR router detected."); + * ``` + * + * @example + * ```js + * // NS2: + * if (ns.hasTorRouter()) tprint("TOR router detected."); + * ``` + * + * @returns Whether player has access to the dark web. */ + hasTorRouter(): boolean; + /** * Runs NUKE.exe on a server. * @remarks * RAM cost: 0.05 GB * - * Running NUKE.exe on a target server gives you root access which means you can executes scripts on said server. NUKE.exe must exist on your home computer. + * Running NUKE.exe on a target server gives you root access which means you can execute scripts on said server. NUKE.exe must exist on your home computer. * * @example * ```ts @@ -3647,7 +3792,7 @@ export declare interface NS { exec(script: string, host: string, numThreads?: number, ...args: (string | number | boolean)[]): number; /** - * Terminate current script and start another in 10s. + * Terminate current script and start another in 10 seconds. * @remarks * RAM cost: 2 GB * @@ -3684,9 +3829,9 @@ export declare interface NS { * RAM cost: 0.5 GB * * Kills the script on the target server specified by the script’s name and arguments. - * Remember that scripts are uniquely identified by both their name and arguments. + * Remember that scripts are uniquely identified by both their names and arguments. * For example, if `foo.script` is run with the argument 1, then this is not the same as - * `foo.script` run with the argument 2, even though they have the same code. + * `foo.script` run with the argument 2, even though they have the same name. * * @example * ```ts @@ -3712,7 +3857,7 @@ export declare interface NS { * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”: * ns.kill("foo.script", getHostname(), 1, "foodnstuff"); * ``` - * @param script - Filename or pid of the script to kill + * @param script - Filename or PID of the script to kill. * @param host - Hostname of the server on which to kill the script. * @param args - Arguments to identify which script to kill. * @returns True if the script is successfully killed, and false otherwise. @@ -3807,8 +3952,8 @@ export declare interface NS { * ns.scp(files, server, "home"); * ``` * @param files - Filename or an array of filenames of script/literature files to copy. - * @param destination - Host of the destination server, which is the server to which the file will be copied. - * @param source - Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server. + * @param destination - Hostname of the destination server, which is the server to which the file will be copied. + * @param source - Hostname of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server. * @returns True if the file is successfully copied over and false otherwise. If the files argument is an array then this function will return false if any of the operations failed. */ scp(files: string | string[], destination: string, source?: string): boolean; @@ -3821,7 +3966,7 @@ export declare interface NS { * Returns an array with the filenames of all files on the specified server * (as strings). The returned array is sorted in alphabetic order. * - * @param host - Host of the target server. + * @param host - Hostname of the target server. * @param grep - A substring to search for in the filename. * @returns Array with the filenames of all files on the specified server. */ @@ -3858,7 +4003,7 @@ export declare interface NS { ps(host?: string): ProcessInfo[]; /** - * Check if your have root access on a server. + * Check if you have root access on a server. * @remarks * RAM cost: 0.05 GB * @@ -3878,7 +4023,7 @@ export declare interface NS { * ns.nuke("foodnstuff"); * } * ``` - * @param host - Host of the target server + * @param host - Hostname of the target server. * @returns True if player has root access to the specified target server, and false otherwise. */ hasRootAccess(host: string): boolean; @@ -3888,7 +4033,7 @@ export declare interface NS { * * @remarks * RAM cost: 0.05 GB - * @returns Hostname of the server that the script is on. + * @returns Hostname of the server that the script runs on. */ getHostname(): string; @@ -3989,19 +4134,19 @@ export declare interface NS { * ns.getServerMoneyAvailable("foodnstuff"); * ns.getServerMoneyAvailable("home"); // Returns player's money * ``` - * @param host - Host of target server + * @param host - Hostname of target server. * @returns Amount of money available on the server. */ getServerMoneyAvailable(host: string): number; /** - * Get maximum money available on a server. + * Get the maximum money available on a server. * @remarks * RAM cost: 0.1 GB * * Returns the maximum amount of money that can be available on a server. * - * @param host - Host of target server. + * @param host - Hostname of target server. * @returns Maximum amount of money available on the server. */ getServerMaxMoney(host: string): number; @@ -4018,7 +4163,7 @@ export declare interface NS { * grow function. A higher growth parameter will result in a * higher percentage increase from grow. * - * @param host - Host of target server. + * @param host - Hostname of target server. * @returns Parameter that affects the percentage by which the server’s money is increased when using the grow function. */ getServerGrowth(host: string): number; @@ -4032,7 +4177,7 @@ export declare interface NS { * level is denoted by a number, typically between 1 and 100 * (but it can go above 100). * - * @param host - Host of target server. + * @param host - Hostname of target server. * @returns Security level of the target server. */ getServerSecurityLevel(host: string): number; @@ -4041,7 +4186,7 @@ export declare interface NS { * Returns the minimum security level of the target server. * * @remarks RAM cost: 0.1 GB - * @param host - Host of target server. + * @param host - Hostname of target server. * @returns Minimum security level of the target server. */ getServerMinSecurityLevel(host: string): number; @@ -4091,12 +4236,12 @@ export declare interface NS { getServerRam(host: string): [number, number]; /** - * Get the max RAM on a server. + * Get the maximum amount of RAM on a server. * @remarks * RAM cost: 0.05 GB * * @param host - Hostname of the target server. - * @returns max ram (GB) + * @returns The maximum amount of RAM (GB) a server can have. */ getServerMaxRam(host: string): number; /** @@ -4105,7 +4250,7 @@ export declare interface NS { * RAM cost: 0.05 GB * * @param host - Hostname of the target server. - * @returns used ram (GB) + * @returns The amount of used RAM (GB) on the specified server. */ getServerUsedRam(host: string): number; @@ -4113,7 +4258,7 @@ export declare interface NS { * Returns the required hacking level of the target server. * * @remarks RAM cost: 0.1 GB - * @param host - Host of target server. + * @param host - Hostname of target server. * @returns The required hacking level of the target server. */ getServerRequiredHackingLevel(host: string): number; @@ -4122,7 +4267,7 @@ export declare interface NS { * Returns the number of open ports required to successfully run NUKE.exe on the specified server. * * @remarks RAM cost: 0.1 GB - * @param host - Host of target server. + * @param host - Hostname of target server. * @returns The number of open ports required to successfully run NUKE.exe on the specified server. */ getServerNumPortsRequired(host: string): number; @@ -4131,8 +4276,8 @@ export declare interface NS { * Returns a boolean denoting whether or not the specified server exists. * * @remarks RAM cost: 0.1 GB - * @param host - Host of target server. - * @returns True if specified server exists, and false otherwise. + * @param host - Hostname of target server. + * @returns True if the specified server exists, and false otherwise. */ serverExists(host: string): boolean; @@ -4207,9 +4352,9 @@ export declare interface NS { * ns.isRunning("foo.script", "joesguns", 1, 5, "test"); * ``` * @param script - Filename or PID of script to check. This is case-sensitive. - * @param host - Host of target server. + * @param host - Hostname of target server. * @param args - Arguments to specify/identify which scripts to search for. - * @returns True if specified script is running on the target server, and false otherwise. + * @returns True if the specified script is running on the target server, and false otherwise. */ isRunning(script: FilenameOrPID, host?: string, ...args: (string | number | boolean)[]): boolean; @@ -4263,14 +4408,14 @@ export declare interface NS { * @remarks * 2.25 GB * - * Purchased a server with the specified hostname and amount of RAM. + * Purchase a server with the specified hostname and amount of RAM. * * The hostname argument can be any data type, but it will be converted to a string * and have whitespace removed. Anything that resolves to an empty string will cause * the function to fail. If there is already a server with the specified hostname, * then the function will automatically append a number at the end of the hostname * argument value until it finds a unique hostname. For example, if the script calls - * `purchaseServer(“foo”, 4)` but a server named “foo” already exists, the it will + * `purchaseServer(“foo”, 4)` but a server named “foo” already exists, then it will * automatically change the hostname to `foo-0`. If there is already a server with the * hostname `foo-0`, then it will change the hostname to `foo-1`, and so on. * @@ -4300,7 +4445,7 @@ export declare interface NS { * ns.purchaseServer(prefix + i, ram); * } * ``` - * @param hostname - Host of the purchased server. + * @param hostname - Hostname of the purchased server. * @param ram - Amount of RAM of the purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20). * @returns The hostname of the newly purchased server. */ @@ -4318,13 +4463,13 @@ export declare interface NS { getPurchasedServerUpgradeCost(hostname: string, ram: number): number; /** - * Upgrade a purchased servers ram. + * Upgrade a purchased server's RAM. * @remarks * RAM cost: 0.25 GB * * @param hostname - Hostname of the server to upgrade. * @param ram - Amount of RAM of the purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20). - * @returns True if the upgrade succeeded. + * @returns True if the upgrade succeeded, and false otherwise. */ upgradePurchasedServer(hostname: string, ram: number): boolean; @@ -4333,9 +4478,9 @@ export declare interface NS { * @remarks * RAM cost: 2.00 GB * - * @param hostname - current server hostname - * @param newName - new server hostname - * @returns True if the upgrade succeeded. + * @param hostname - Current server hostname. + * @param newName - New server hostname. + * @returns True if the upgrade succeeded, and false otherwise. */ renamePurchasedServer(hostname: string, newName: string): boolean; @@ -4350,7 +4495,7 @@ export declare interface NS { * Whitespace is automatically removed from the string. This function will not delete a * server that still has scripts running on it. * - * @param host - Host of the server to delete. + * @param host - Hostname of the server to delete. * @returns True if successful, and false otherwise. */ deleteServer(host: string): boolean; @@ -4387,8 +4532,8 @@ export declare interface NS { * This function can be used to write data to a text file (.txt) or a script (.js or .script). * * This function will write data to that file. If the specified file does not exist, - * then it will be created. The third argument mode, defines how the data will be written to - * the file. If *mode is set to “w”, then the data is written in “write” mode which means + * then it will be created. The third argument mode defines how the data will be written to + * the file. If mode is set to “w”, then the data is written in “write” mode which means * that it will overwrite all existing data on the file. If mode is set to any other value * then the data will be written in “append” mode which means that the data will be added at the * end of the file. @@ -4397,14 +4542,14 @@ export declare interface NS { * @param data - Data to write. * @param mode - Defines the write mode. */ - write(filename: string, data?: string[] | number | string, mode?: "w" | "a"): void; + write(filename: string, data?: string, mode?: "w" | "a"): void; /** * Attempt to write to a port. * @remarks * RAM cost: 0 GB * - * Attempts to write data to the specified Netscript Port. + * Attempts to write data to the specified Netscript port. * If the port is full, the data will not be written. * Otherwise, the data will be written normally. * @@ -4470,10 +4615,10 @@ export declare interface NS { * @remarks * RAM cost: 0 GB * - * Write data to that netscript port. - * @returns The data popped off the queue if it was full. + * Write data to the given Netscript port. + * @returns The data popped off the queue if it was full, or null if it was not full. */ - writePort(port: number, data: string | number): Promise; + writePort(port: number, data: string | number): PortData | null; /** * Read data from a port. * @remarks @@ -4482,7 +4627,7 @@ export declare interface NS { * Read data from that port. A port is a serialized queue. * This function will remove the first element from that queue and return it. * If the queue is empty, then the string “NULL PORT DATA” will be returned. - * @returns the data read. + * @returns The data read. */ readPort(port: number): PortData; @@ -4509,7 +4654,7 @@ export declare interface NS { * type except message (.msg) files. * * @param name - Filename of file to remove. Must include the extension. - * @param host - Host Address of the server on which to delete the file. Optional. Defaults to current server. + * @param host - Hostname of the server on which to delete the file. Optional. Defaults to current server. * @returns True if it successfully deletes the file, and false otherwise. */ rm(name: string, host?: string): boolean; @@ -4522,7 +4667,7 @@ export declare interface NS { * Returns a boolean indicating whether any instance of the specified script is running * on the target server, regardless of its arguments. * - * This is different than the isRunning function because it does not try to + * This is different than the {@link NS.isRunning | isRunning} function because it does not try to * identify a specific instance of a running script by its arguments. * * @example @@ -4544,7 +4689,7 @@ export declare interface NS { * ns.scriptRunning("foo.script", ns.getHostname()); * ``` * @param script - Filename of script to check. This is case-sensitive. - * @param host - Host of target server. + * @param host - Hostname of target server. * @returns True if the specified script is running, and false otherwise. */ scriptRunning(script: string, host: string): boolean; @@ -4558,8 +4703,8 @@ export declare interface NS { * regardless of arguments. * * @param script - Filename of script to kill. This is case-sensitive. - * @param host - Host of target server. - * @returns true if one or more scripts were successfully killed, and false if none were. + * @param host - Hostname of target server. + * @returns True if one or more scripts were successfully killed, and false if none were. */ scriptKill(script: string, host: string): boolean; @@ -4580,7 +4725,7 @@ export declare interface NS { * Returns 0 if the script does not exist. * * @param script - Filename of script. This is case-sensitive. - * @param host - Host of target server the script is located on. This is optional, if it is not specified then the function will use the current server as the target server. + * @param host - Hostname of target server the script is located on. This is optional. If it is not specified then the function will use the current server as the target server. * @returns Amount of RAM (in GB) required to run the specified script on the target server, and 0 if the script does not exist. */ getScriptRam(script: string, host?: string): number; @@ -4591,11 +4736,11 @@ export declare interface NS { * RAM cost: 0.05 GB * * When `hack` completes an amount of money is stolen depending on the player's skills. - * Returns the amount of time in milliseconds it takes to execute the hack Netscript function on the target server. + * Returns the amount of time in milliseconds it takes to execute the {@link NS.hack | hack} Netscript function on the target server. * The required time is increased by the security level of the target server and decreased by the player's hacking level. * - * @param host - Host of target server. - * @returns Returns the amount of time in milliseconds it takes to execute the hack Netscript function. + * @param host - Hostname of target server. + * @returns Returns the amount of time in milliseconds it takes to execute the {@link NS.hack | hack} Netscript function. */ getHackTime(host: string): number; @@ -4607,7 +4752,7 @@ export declare interface NS { * Returns the amount of time in milliseconds it takes to execute the grow Netscript function on the target server. * The required time is increased by the security level of the target server and decreased by the player's hacking level. * - * @param host - Host of target server. + * @param host - Hostname of target server. * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. */ getGrowTime(host: string): number; @@ -4617,20 +4762,20 @@ export declare interface NS { * @remarks * RAM cost: 0.05 GB * - * Returns the amount of time in milliseconds it takes to execute the weaken Netscript function on the target server. + * Returns the amount of time in milliseconds it takes to execute the {@link NS.weaken | weaken} Netscript function on the target server. * The required time is increased by the security level of the target server and decreased by the player's hacking level. * - * @param host - Host of target server. - * @returns Returns the amount of time in milliseconds it takes to execute the weaken Netscript function. + * @param host - Hostname of target server. + * @returns Returns the amount of time in milliseconds it takes to execute the {@link NS.weaken | weaken} Netscript function. */ getWeakenTime(host: string): number; /** - * Get the income of all script. + * Get the income of all scripts. * @remarks * RAM cost: 0.1 GB * - * @returns an array of two values. + * @returns An array of two values. * The first value is the total income (dollar / second) of all of your active scripts * (scripts that are currently running on any server). * The second value is the total income (dollar / second) that you’ve earned from scripts @@ -4658,11 +4803,11 @@ export declare interface NS { getScriptIncome(script: string, host: string, ...args: (string | number | boolean)[]): number; /** - * Get the exp gain of all script. + * Get the exp gain of all scripts. * @remarks * RAM cost: 0.1 GB * - * @returns total experience gain rate of all of your active scripts. + * @returns Total experience gain rate of all of your active scripts. */ getTotalScriptExpGain(): number; @@ -4719,7 +4864,7 @@ export declare interface NS { vsprintf(format: string, args: any[]): string; /** - * Format a number + * Format a number. * @remarks * RAM cost: 0 GB * @@ -4727,7 +4872,8 @@ export declare interface NS { * This uses the numeral.js library, so the formatters must be compatible with that. * This is the same function that the game itself uses to display numbers. * - * see: http://numeraljs.com/ + * For more information, see: http://numeraljs.com/ + * * @param n - Number to format. * @param format - Formatter. * @returns Formatted number. @@ -4735,12 +4881,12 @@ export declare interface NS { nFormat(n: number, format: string): string; /** - * Format time to readable string + * Format time to a readable string. * @remarks * RAM cost: 0 GB * * @param milliseconds - Number of millisecond to format. - * @param milliPrecision - Format time with subsecond precision, defaults to false. + * @param milliPrecision - Format time with subsecond precision. Defaults to false. * @returns The formatted time. */ tFormat(milliseconds: number, milliPrecision?: boolean): string; @@ -4750,20 +4896,88 @@ export declare interface NS { * @remarks * RAM cost: 0 GB * - * Prompts the player with a dialog box. If `options.type` is undefined or "boolean", - * the player is shown "Yes" and "No" prompts, which return true and false respectively. - * Passing a type of "text" will give the player a text field and a value of "select" - * will show a drop-down field. Choosing type "select" will require an array or object - * to be passed via the `options.choices` property. - * The script’s execution is halted until the player selects one of the options. + * Prompts the player with a dialog box. Here is an explanation of the various options. + * + * - `options.type` is not provided to the function. If `options.type` is left out and + * only a string is passed to the function, then the default behavior is to create a + * boolean dialog box. + * + * - `options.type` has value `undefined` or `"boolean"`. A boolean dialog box is + * created. The player is shown "Yes" and "No" prompts, which return true and false + * respectively. The script's execution is halted until the player presses either the + * "Yes" or "No" button. + * + * - `options.type` has value `"text"`. The player is given a text field to enter + * free-form text. The script's execution is halted until the player enters some text + * and/or presses the "Confirm" button. + * + * - `options.type` has value `"select"`. The player is shown a drop-down field. + * Choosing type `"select"` will require an array to be passed via the + * `options.choices` property. The array can be an array of strings, an array of + * numbers (not BigInt numbers), or a mixture of both numbers and strings. Any other + * types of array elements will result in an error or an undefined/unexpected + * behavior. The `options.choices` property will be ignored if `options.type` has a + * value other than `"select"`. The script's execution is halted until the player + * chooses one of the provided options and presses the "Confirm" button. + * + * @example + * ```ts + * // NS1 + * // A Yes/No question. The default is to create a boolean dialog box. + * var queryA = "Do you enjoy Bitburner?"; + * var resultA = prompt(queryA); + * tprint(queryA + " " + resultA); + * + * // Another Yes/No question. Can also create a boolean dialog box by explicitly + * // passing the option {"type": "boolean"}. + * var queryB = "Is programming fun?"; + * var resultB = prompt(queryB, { type: "boolean" }); + * tprint(queryB + " " + resultB); + * + * // Free-form text box. + * var resultC = prompt("Please enter your name.", { type: "text" }); + * tprint("Hello, " + resultC + "."); + * + * // A drop-down list. + * var resultD = prompt("Please select your favorite fruit.", { + * type: "select", + * choices: ["Apple", "Banana", "Orange", "Pear", "Strawberry"] + * }); + * tprint("Your favorite fruit is " + resultD.toLowerCase() + "."); + * ``` + * @example + * ```ts + * // NS2 + * // A Yes/No question. The default is to create a boolean dialog box. + * const queryA = "Do you enjoy Bitburner?"; + * const resultA = await ns.prompt(queryA); + * ns.tprint(`${queryA} ${resultA}`); + * + * // Another Yes/No question. Can also create a boolean dialog box by explicitly + * // passing the option {"type": "boolean"}. + * const queryB = "Is programming fun?"; + * const resultB = await ns.prompt(queryB, { type: "boolean" }); + * ns.tprint(`${queryB} ${resultB}`); + * + * // Free-form text box. + * const resultC = await ns.prompt("Please enter your name.", { type: "text" }); + * ns.tprint(`Hello, ${resultC}.`); + * + * // A drop-down list. + * const resultD = await ns.prompt("Please select your favorite fruit.", { + * type: "select", + * choices: ["Apple", "Banana", "Orange", "Pear", "Strawberry"] + * }); + * ns.tprint(`Your favorite fruit is ${resultD.toLowerCase()}.`); + * ``` * * @param txt - Text to appear in the prompt dialog box. * @param options - Options to modify the prompt the player is shown. - * @returns True if the player click “Yes”; false if the player clicks “No”; or the value entered by the player. + * @returns True if the player clicks “Yes”; false if the player clicks “No”; or the value entered by the player. */ prompt( txt: string, - options?: { type?: "boolean" | "text" | "select" | undefined; choices?: string[] }, + options?: { type?: "boolean" | "text" | "select"; choices?: string[] }, ): Promise; /** @@ -4775,10 +4989,10 @@ export declare interface NS { /** * Queue a toast (bottom-right notification). * @param msg - Message in the toast. - * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success. - * @param duration - Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000 + * @param variant - Type of toast. Must be one of success, info, warning, error. Defaults to success. + * @param duration - Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000. */ - toast(msg: string, variant?: ToastVariant, duration?: number | null): void; + toast(msg: string, variant?: ToastVariant | `${ToastVariant}`, duration?: number | null): void; /** * Download a file from the internet. @@ -4796,8 +5010,8 @@ export declare interface NS { * successfully retrieved from the URL. Because the function is async and returns a Promise, * it is recommended you use wget in NetscriptJS (Netscript 2.0). * - * In NetscriptJS, you must preface any call to wget with the await keyword (like you would hack or sleep). - * wget will still work in Netscript 1.0, but the functions execution will not be synchronous + * In NetscriptJS, you must preface any call to wget with the await keyword (like you would {@link NS.hack | hack} or {@link NS.sleep | sleep}). + * wget will still work in Netscript 1.0, but the function's execution will not be synchronous * (i.e. it may not execute when you expect/want it to). * Furthermore, since Promises are not supported in ES5, * you will not be able to process the returned value of wget in Netscript 1.0. @@ -4832,7 +5046,7 @@ export declare interface NS { * @remarks * RAM cost: 4 GB * - * Returns an object containing the current BitNode multipliers. + * Returns an object containing the current (or supplied) BitNode multipliers. * This function requires you to be in Bitnode 5 or have Source-File 5 in order to run. * The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%). * The multipliers represent the difference between the current BitNode and @@ -4858,7 +5072,7 @@ export declare interface NS { * ``` * @returns Object containing the current BitNode multipliers. */ - getBitNodeMultipliers(): BitNodeMultipliers; + getBitNodeMultipliers(n?: number, lvl?: number): BitNodeMultipliers; /** * Get information about the player. @@ -4871,6 +5085,17 @@ export declare interface NS { */ getPlayer(): Player; + /** + * Get information about the sources of income for this run. + * @remarks + * RAM cost: 1.0 GB + * + * Returns an object with information on the income sources for this run + * + * @returns Money sources + */ + getMoneySources(): MoneySources; + /** * Add callback function when the script dies * @remarks @@ -4887,7 +5112,7 @@ export declare interface NS { * @remarks * RAM cost: 0 GB * - * NS2 exclusive + * NS2 exclusive. * * Move the source file to the specified destination on the target server. * @@ -4896,7 +5121,7 @@ export declare interface NS { * * This function can also be used to rename files. * - * @param host - Host of target server. + * @param host - Hostname of target server. * @param source - Filename of the source file. * @param destination - Filename of the destination file. */ @@ -4907,7 +5132,7 @@ export declare interface NS { * @remarks * RAM cost: 0 GB * - * Allows unix like flag parsing. + * Allows Unix-like flag parsing. * @example * ```ts * // example.script @@ -4967,7 +5192,15 @@ export declare interface NS { } /** @public */ -export declare type NSEnums = typeof enums; +export declare type NSEnums = { + toast: typeof ToastVariant; + CrimeType: typeof CrimeType; + FactionWorkType: typeof FactionWorkType; + GymType: typeof GymType; + UniversityClassType: typeof UniversityClassType; + CompanyPosName: typeof CompanyPosName; + LocationName: typeof LocationName; +}; /** * Office for a division in a city. @@ -4990,12 +5223,18 @@ export declare interface Office { minMor: number; /** Maximum morale of the employees */ maxMor: number; - /** Name of all the employees */ - employees: string[]; + /** Amount of employees */ + employees: number; + /** Average energy of the employees */ + avgEne: number; + /** Average happiness of the employees */ + avgHap: number; + /** Average morale of the employees */ + avgMor: number; /** Production of the employees */ - employeeProd: EmployeeJobs; + employeeProd: Record<`${EmployeePositions}`, number>; /** Positions of the employees */ - employeeJobs: EmployeeJobs; + employeeJobs: Record<`${EmployeePositions}`, number>; } /** @@ -5004,22 +5243,20 @@ export declare interface Office { * requires the Office API upgrade from your corporation. * @public */ + export declare interface OfficeAPI { - /** - * Assign an employee to a job. - * @param divisionName - Name of the division - * @param cityName - Name of the city - * @param employeeName - name of the employee - * @param job - Name of the job. - */ - assignJob(divisionName: string, cityName: string, employeeName: string, job: string): void; /** * Hire an employee. * @param divisionName - Name of the division * @param cityName - Name of the city - * @returns The newly hired employee, if any + * @param employeePosition - Position to place into. Defaults to "Unassigned". + * @returns True if an employee was hired, false otherwise */ - hireEmployee(divisionName: string, cityName: string): Employee | undefined; + hireEmployee( + divisionName: string, + cityName: string, + employeePosition?: EmployeePositions | `${EmployeePositions}`, + ): boolean; /** * Upgrade office size. * @param divisionName - Name of the division @@ -5067,12 +5304,6 @@ export declare interface OfficeAPI { * @param employeeName - Name of the employee * @returns Employee data */ - getEmployee(divisionName: string, cityName: string, employeeName: string): Employee; - /** - * Get the cost to Hire AdVert - * @param divisionName - Name of the division - * @returns Cost - */ getHireAdVertCost(divisionName: string): number; /** * Get the number of times you have Hired AdVert @@ -5122,25 +5353,26 @@ export declare enum OrderTypes { } /** @public */ -export declare interface Player { +export declare interface Person { hp: HP; skills: Skills; exp: Skills; mults: Multipliers; - numPeopleKilled: number; - money: number; city: string; - location: string; +} + +/** @public */ +export declare interface Player extends Person { + money: number; + numPeopleKilled: number; + entropy: number; + jobs: Record; + factions: string[]; bitNodeN: number; totalPlaytime: number; playtimeSinceLastAug: number; playtimeSinceLastBitnode: number; - jobs: Record; - factions: string[]; - tor: boolean; - hasCorporation: boolean; - inBladeburner: boolean; - entropy: number; + location: string; } /** @public */ @@ -5152,12 +5384,6 @@ export declare enum PositionTypes { Short = "S", } -/** @public */ -export declare interface PossibleInfiltrationLocation { - city: string; - name: string; -} - /** * A single process on a server. * @public @@ -5230,7 +5456,7 @@ export declare interface ReputationFormulas { * @param amount - Amount of money donated * @param player - Player info from {@link NS.getPlayer | getPlayer} */ - repFromDonation(amount: number, player: Player): number; + repFromDonation(amount: number, player: Person): number; } /** @public */ @@ -5362,7 +5588,8 @@ export declare interface Server { /** * Singularity API * @remarks - * This API requires Source-File 4 to use. The RAM cost of all these functions is multiplied by 16/4/1 based on Source-File 4 levels. + * This API requires Source-File 4 to use. The RAM cost of all these functions is multiplied by 16/4/1 based on + * Source-File 4 levels. * @public */ export declare interface Singularity { @@ -5584,37 +5811,30 @@ export declare interface Singularity { * RAM cost: 3 GB * 16/4/1 * * - * This function will automatically set you to start working at the company - * at which you are employed. If you are already in the middle of some “working” - * action (such as working for a faction, training at a gym, or creating a program), - * then running this function will automatically cancel that action and give you - * your earnings. + * This function will set you to start working at your current job at a specified company at which you are employed. + * If you are already in the middle of some “working” action (such as working for a faction, training at a gym, or + * creating a program), then running this function will cancel that action. * * This function will return true if the player starts working, and false otherwise. * - * Note that when you are working for a company, you will not actually receive your earnings (reputation, money, experience) until you FINISH the action. - * * @example - * ```ts + * ```js * // NS1: - * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings: - * while (getCompanyRep(COMPANY HERE) < VALUE) { - * workForCompany(); - * sleep(60000); - * } - * //This way, your company reputation will be updated every minute. + * var COMPANY_NAME = "Noodle Bar"; + * + * var success = singularity.workForCompany(COMPANY_NAME); + * if (!success) tprint("ERROR: Failed to start work at " + COMPANY_NAME + "."); * ``` * @example - * ```ts + * ```js * // NS2: - * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings: - * while (ns.getCompanyRep(COMPANY HERE) < VALUE) { - * ns.workForCompany(); - * await ns.sleep(60000); - * } - * //This way, your company reputation will be updated every minute. + * const COMPANY_NAME = "Noodle Bar"; + * + * let success = ns.singularity.workForCompany(COMPANY_NAME); + * if (!success) ns.tprint(`ERROR: Failed to start work at ${COMPANY_NAME].`); * ``` - * @param companyName - Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked + * @param companyName - Name of company to work for. Must be an exact match. Optional. If not specified, this + * argument defaults to the last job that you worked. * @param focus - Acquire player focus on this work operation. Optional. Defaults to true. * @returns True if the player starts working, and false otherwise. */ @@ -5726,42 +5946,35 @@ export declare interface Singularity { * RAM cost: 3 GB * 16/4/1 * * - * This function will automatically set you to start working for the specified faction. - * Obviously, you must be a member of the faction or else this function will fail. If - * you are already in the middle of some “working” action (such as working for a company, - * training at a gym, or creating a program), then running this function will automatically - * cancel that action and give you your earnings. + * This function will set you to start working for the specified faction. You must be a member of the faction and + * that faction must have the specified work type, or else this function will fail. If you are already in the + * middle of some “working” action (such as working for a company, training at a gym, or creating a program), then + * running this function will cancel that action. * * This function will return true if you successfully start working for the specified faction, and false otherwise. * - * Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) until you FINISH the action. - * * @example - * ```ts - * // NS1: - * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings: - * while (getFactionRep(FACTION NAME) < VALUE) { - * workForFaction(FACNAME, WORKTYPE); - * sleep(60000); - * } - * //This way, your faction reputation will be updated every minute. + * ```js + * // NS1 + * var FACTION_NAME = "CyberSec", WORK_TYPE = "hacking"; + * + * var success = singularity.workForFaction(FACTION_NAME, WORK_TYPE); + * if (!success) tprint("ERROR: Failed to start work for " + FACTION_NAME + " with work type " + WORK_TYPE); * ``` * @example - * ```ts - * // NS2: - * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings: - * while (ns.getFactionRep(FACTION NAME) < VALUE) { - * ns.workForFaction(FACNAME, WORKTYPE); - * await ns.sleep(60000); - * } - * //This way, your faction reputation will be updated every minute. + * ```js + * // NS2 + * const FACTION_NAME = "CyberSec", WORK_TYPE = "hacking"; + * + * let success = ns.singularity.workForFaction(FACTION_NAME, WORK_TYPE); + * if (!success) ns.tprint(`ERROR: Failed to start work for ${FACTION_NAME} with work type ${WORK_TYPE}.`) * ``` * @param faction - Name of faction to work for. * @param workType - Type of work to perform for the faction. * @param focus - Acquire player focus on this work operation. Optional. Defaults to true. * @returns True if the player starts working, and false otherwise. */ - workForFaction(faction: string, workType: string, focus?: boolean): boolean; + workForFaction(faction: string, workType: FactionWorkType | `${FactionWorkType}`, focus?: boolean): boolean; /** * Get faction reputation. @@ -5832,7 +6045,8 @@ export declare interface Singularity { * * This function returns true if you successfully start working on the specified program, and false otherwise. * - * Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are: + * Note that creating a program using this function has the same hacking level requirements as it normally would. + * These level requirements are: * * BruteSSH.exe: 50 * * FTPCrack.exe: 100 * * relaySMTP.exe: 250 @@ -5873,19 +6087,13 @@ export declare interface Singularity { * * This function returns the number of milliseconds it takes to attempt the * specified crime (e.g It takes 60 seconds to attempt the ‘Rob Store’ crime, - * so running `commitCrime('rob store')` will return 60,000). - * - * Warning: I do not recommend using the time returned from this function to try - * and schedule your crime attempts. Instead, I would use the isBusy Singularity - * function to check whether you have finished attempting a crime. This is because - * although the game sets a certain crime to be X amount of seconds, there is no - * guarantee that your browser will follow that time limit. + * so running `commitCrime('ROBSTORE')` will return 60,000). * * @param crime - Name of crime to attempt. * @param focus - Acquire player focus on this crime. Optional. Defaults to true. * @returns The number of milliseconds it takes to attempt the specified crime. */ - commitCrime(crime: string, focus?: boolean): number; + commitCrime(crime: CrimeType | `${CrimeType}`, focus?: boolean): number; /** * Get chance to successfully commit a crime. @@ -5898,7 +6106,7 @@ export declare interface Singularity { * @param crime - Name of crime. * @returns Chance of success at committing the specified crime. */ - getCrimeChance(crime: string): number; + getCrimeChance(crime: CrimeType | `${CrimeType}`): number; /** * Get stats related to a crime. @@ -5908,10 +6116,10 @@ export declare interface Singularity { * * Returns the stats of the crime. * - * @param crime - Name of crime. Not case-sensitive + * @param crime - Name of crime. * @returns The stats of the crime. */ - getCrimeStats(crime: string): CrimeStats; + getCrimeStats(crime: CrimeType | `${CrimeType}`): CrimeStats; /** * Get a list of owned augmentation. @@ -5921,7 +6129,9 @@ export declare interface Singularity { * * This function returns an array containing the names (as strings) of all Augmentations you have. * - * @param purchased - Specifies whether the returned array should include Augmentations you have purchased but not yet installed. By default, this argument is false which means that the return value will NOT have the purchased Augmentations. + * @param purchased - Specifies whether the returned array should include Augmentations you have purchased but not + * yet installed. By default, this argument is false which means that the return value will NOT have the purchased + * Augmentations. * @returns Array containing the names (as strings) of all Augmentations you have. */ getOwnedAugmentations(purchased?: boolean): string[]; @@ -5931,6 +6141,7 @@ export declare interface Singularity { * @remarks * RAM cost: 5 GB * + * * Returns an array of source files * * @returns Array containing an object with number and level of the source file. @@ -5967,7 +6178,7 @@ export declare interface Singularity { /** * Get the price and reputation of an augmentation. - * @deprecated use getAugmentationPrice getAugmentationRepCost + * @deprecated use getAugmentationPrice getAugmentationRepReq * @remarks * RAM cost: 5 GB * 16/4/1 * @@ -6279,13 +6490,20 @@ export declare interface SkillsFormulas { calculateExp(skill: number, skillMult?: number): number; } +/** @public */ +export declare interface Sleeve extends Person { + shock: number; + sync: number; + memory: number; +} + /** * Sleeve API * @remarks * If you are not in BitNode-10, then you must have Source-File 10 in order to use this API. * @public */ -export declare interface Sleeve { +export declare interface sleeve { /** * Get the number of sleeves you own. * @remarks @@ -6297,41 +6515,30 @@ export declare interface Sleeve { */ getNumSleeves(): number; - /** - * Get the stats of a sleeve. - * @remarks - * RAM cost: 4 GB - * - * Return a structure containing the stats of the sleeve. - * - * @param sleeveNumber - Index of the sleeve to get stats of. - * @returns Object containing the stats of the sleeve. - */ - getSleeveStats(sleeveNumber: number): SleeveSkills; - /** * Get information about a sleeve. * @remarks * RAM cost: 4 GB * - * Return a struct containing tons of information about this sleeve + * Return a person object for this sleeve * * @param sleeveNumber - Index of the sleeve to retrieve information. - * @returns Object containing tons of information about this sleeve. + * @returns Object containing information about this sleeve. */ - getInformation(sleeveNumber: number): SleeveInformation; + getSleeve(sleeveNumber: number): Sleeve; /** * Get task of a sleeve. * @remarks * RAM cost: 4 GB * - * Return the current task that the sleeve is performing. type is set to “Idle” if the sleeve isn’t doing anything. + * Return the current task that the sleeve is performing, or null if the sleeve is idle. All tasks have a "type" + * property, and other available properties depend on the type of task. * * @param sleeveNumber - Index of the sleeve to retrieve task from. - * @returns Object containing information the current task that the sleeve is performing. + * @returns Object containing information for the current task that the sleeve is performing. */ - getTask(sleeveNumber: number): SleeveTask; + getTask(sleeveNumber: number): SleeveTask | null; /** * Set a sleeve to shock recovery. @@ -6362,32 +6569,13 @@ export declare interface Sleeve { * @remarks * RAM cost: 4 GB * - * Return a boolean indicating whether or not this action was set successfully. - * - * Returns false if an invalid action is specified. - * - * You can set a sleeve to commit one of the following crimes. The crime names are not - * case sensitive. For example, you can pass in the crime name as `"Shoplift"`, - * `"shoplift"`, `"shopLift"`, or even `"SHOPLIFT"`. - * - * - Assassination - * - Bond forgery - * - Deal drugs - * - Grand theft auto - * - Heist - * - Homicide - * - Kidnap - * - Larceny - * - Mug - * - Rob store - * - Shoplift - * - Traffick arms + * Return a boolean indicating whether or not this action was set successfully (false if an invalid action is specified). * * @example * ```ts * // NS1 * // Assign the first 3 sleeves to commit various crimes. - * var crime = ["mug", "rob store", "shoplift"]; + * var crime = ["MUG", "ROBSTORE", "SHOPLIFT"]; * for (var i = 0; i < crime.length; i++) { * tprintf("Sleeve %d commits crime: %s", i, crime[i]); * sleeve.setToCommitCrime(i, crime[i]); @@ -6397,7 +6585,7 @@ export declare interface Sleeve { * ```ts * // NS2 * // Assign the first 3 sleeves to commit various crimes. - * const crime = ["mug", "rob store", "shoplift"]; + * const crime = ["MUG", "ROBSTORE", "SHOPLIFT"]; * for (let i = 0; i < crime.length; i++) { * ns.tprintf("Sleeve %d commits crime: %s", i, crime[i]); * ns.sleeve.setToCommitCrime(i, crime[i]); @@ -6405,10 +6593,10 @@ export declare interface Sleeve { * ``` * * @param sleeveNumber - Index of the sleeve to start committing crime. Sleeves are numbered starting from 0. - * @param name - Name of the crime. Must be an exact match. Refer to the list of crimes. + * @param name - Name of the crime. * @returns True if this action was set successfully, false otherwise. */ - setToCommitCrime(sleeveNumber: number, name: string): boolean; + setToCommitCrime(sleeveNumber: number, crimeType: CrimeType | `${CrimeType}`): boolean; /** * Set a sleeve to work for a faction. @@ -6422,7 +6610,11 @@ export declare interface Sleeve { * @param factionWorkType - Name of the action to perform for this faction. * @returns True if the sleeve started working on this faction, false otherwise, can also throw on errors */ - setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean | undefined; + setToFactionWork( + sleeveNumber: number, + factionName: string, + factionWorkType: FactionWorkType | `${FactionWorkType}`, + ): boolean | undefined; /** * Set a sleeve to work for a company. @@ -6552,73 +6744,57 @@ export declare interface Sleeve { setToBladeburnerAction(sleeveNumber: number, action: string, contract?: string): boolean; } -/** - * Object representing sleeve information. - * @public - */ -export declare interface SleeveInformation { - /** Location of the sleeve */ - city: string; - /** hp of the sleeve */ - hp: HP; - /** Jobs available to the sleeve */ - jobs: string[]; - /** Job titles available to the sleeve */ - jobTitle: string[]; - /** Does this sleeve have access to the tor router */ - tor: boolean; - /** Sleeve multipliers */ - mult: CharacterMult; -} - -/** - * Object representing a sleeve stats. - * @public - */ -export declare interface SleeveSkills { - /** Current shock of the sleeve [0-100] */ - shock: number; - /** Current sync of the sleeve [0-100] */ - sync: number; - /** Current memory of the sleeve [1-100] */ - memory: number; - /** Current hacking skill of the sleeve */ - hacking: number; - /** Current strength of the sleeve */ - strength: number; - /** Current defense of the sleeve */ - defense: number; - /** Current dexterity of the sleeve */ - dexterity: number; - /** Current agility of the sleeve */ - agility: number; - /** Current charisma of the sleeve */ - charisma: number; -} - -/** - * Object representing a sleeve current task. - * @public - */ -export declare type SleeveTask = any; +/** @public */ +export declare type SleeveBladeburnerTask = { + type: "BLADEBURNER"; + actionType: "General" | "Contracts"; + actionName: string; +}; /** @public */ -export declare interface SleeveWorkGains { - /** Hacking exp gained from work */ - workHackExpGain: number; - /** Strength exp gained from work */ - workStrExpGain: number; - /** Defense exp gained from work, */ - workDefExpGain: number; - /** Dexterity exp gained from work */ - workDexExpGain: number; - /** Agility exp gained from work */ - workAgiExpGain: number; - /** Charisma exp gained from work */ - workChaExpGain: number; - /** Money gained from work */ - workMoneyGain: number; -} +export declare type SleeveClassTask = { + type: "CLASS"; + classType: UniversityClassType | GymType | `${UniversityClassType}` | `${GymType}`; + location: LocationName | `${LocationName}`; +}; + +/** @public */ +export declare type SleeveCompanyTask = { type: "COMPANY"; companyName: string }; + +/** @public */ +export declare type SleeveCrimeTask = { type: "CRIME"; crimeType: CrimeType | `${CrimeType}` }; + +/** @public */ +export declare type SleeveFactionTask = { + type: "FACTION"; + factionWorkType: FactionWorkType | `${FactionWorkType}`; + factionName: string; +}; + +/** @public */ +export declare type SleeveInfiltrateTask = { type: "INFILTRATE" }; + +/** @public */ +export declare type SleeveRecoveryTask = { type: "RECOVERY" }; + +/** @public */ +export declare type SleeveSupportTask = { type: "SUPPORT" }; + +/** @public */ +export declare type SleeveSynchroTask = { type: "SYNCHRO" }; + +/** Object representing a sleeve current task. + * @public */ +export declare type SleeveTask = +| SleeveBladeburnerTask +| SleeveClassTask +| SleeveCompanyTask +| SleeveCrimeTask +| SleeveFactionTask +| SleeveInfiltrateTask +| SleeveRecoveryTask +| SleeveSupportTask +| SleeveSynchroTask; /** @public */ export declare interface SourceFileLvl { @@ -7084,7 +7260,8 @@ export declare interface TIX { * ... * } * ``` - * The “Order type” property can have one of the following four values: "Limit Buy Order", "Limit Sell Order", "Stop Buy Order", "Stop Sell Order". + * The “Order type” property can have one of the following four values: "Limit Buy Order", "Limit Sell Order", + * "Stop Buy Order", "Stop Sell Order". * Note that the order book will only contain information for stocks that you actually have orders in. * * @example @@ -7135,7 +7312,8 @@ export declare interface TIX { getVolatility(sym: string): number; /** - * Returns the probability that the specified stock’s price will increase (as opposed to decrease) during the next tick. + * Returns the probability that the specified stock’s price will increase (as opposed to decrease) during the next + * tick. * @remarks * RAM cost: 2.5 GB * The probability is returned as a decimal value, NOT a percentage @@ -7181,7 +7359,22 @@ export declare interface TIX { } /** @public */ -export declare type ToastVariant = ValuesFrom; +export declare enum ToastVariant { + SUCCESS = "success", + WARNING = "warning", + ERROR = "error", + INFO = "info", +} + +/** @public */ +export declare enum UniversityClassType { + computerScience = "Computer Science", + dataStructures = "Data Structures", + networks = "Networks", + algorithms = "Algorithms", + management = "Management", + leadership = "Leadership", +} /** * User Interface API. @@ -7313,9 +7506,6 @@ export declare interface UserInterfaceTheme { button: string; } -/** @public */ -export declare type ValuesFrom = T[keyof T]; - /** * Warehouse for a division in a city * @public @@ -7557,9 +7747,26 @@ export declare interface WarehouseAPI { * @public */ export declare interface WorkFormulas { - crimeGains(crimeType: string): WorkStats; - classGains(player: Player, classType: string, locationName: string): WorkStats; - factionGains(player: Player, workType: string, favor: number): WorkStats; + crimeSuccessChance(person: Person, crimeType: CrimeType | `${CrimeType}`): number; + /** @returns The WorkStats gained when completing one instance of the specified crime. */ + crimeGains(person: Person, crimeType: CrimeType | `${CrimeType}`): WorkStats; + /** @returns The WorkStats applied every game cycle (200ms) by taking the specified gym class. */ + gymGains(person: Person, gymType: GymType | `${GymType}`, locationName: string): WorkStats; + /** @returns The WorkStats applied every game cycle (200ms) by taking the specified university class. */ + universityGains( + person: Person, + classType: UniversityClassType | `${UniversityClassType}`, + locationName: string, + ): WorkStats; + /** @returns The WorkStats applied every game cycle (200ms) by performing the specified faction work. */ + factionGains(person: Person, workType: FactionWorkType | `${FactionWorkType}`, favor: number): WorkStats; + /** @returns The WorkStats applied every game cycle (200ms) by performing the specified company work. */ + companyGains( + person: Person, + companyName: string, + workType: CompanyPosName | `${CompanyPosName}`, + favor: number, + ): WorkStats; } /** @public */ diff --git a/markdown/bitburner.activefragment.md b/markdown/bitburner.activefragment.md index bce58a63e..952baba26 100644 --- a/markdown/bitburner.activefragment.md +++ b/markdown/bitburner.activefragment.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface ActiveFragment +interface ActiveFragment ``` ## Properties diff --git a/markdown/bitburner.augmentpair.md b/markdown/bitburner.augmentpair.md index 473f5811b..c78d64415 100644 --- a/markdown/bitburner.augmentpair.md +++ b/markdown/bitburner.augmentpair.md @@ -9,7 +9,7 @@ Return value of [getSleevePurchasableAugs](./bitburner.sleeve.getsleevepurchasab Signature: ```typescript -export interface AugmentPair +interface AugmentPair ``` ## Properties diff --git a/markdown/bitburner.basichgwoptions.md b/markdown/bitburner.basichgwoptions.md index 7b85718cc..b56b86809 100644 --- a/markdown/bitburner.basichgwoptions.md +++ b/markdown/bitburner.basichgwoptions.md @@ -9,7 +9,7 @@ Options to affect the behavior of [hack](./bitburner.ns.hack.md), [grow] Signature: ```typescript -export interface BasicHGWOptions +interface BasicHGWOptions ``` ## Properties diff --git a/markdown/bitburner.bitnodemultipliers.md b/markdown/bitburner.bitnodemultipliers.md index fe18b2f2f..fc15711f2 100644 --- a/markdown/bitburner.bitnodemultipliers.md +++ b/markdown/bitburner.bitnodemultipliers.md @@ -9,7 +9,7 @@ All multipliers affecting the difficulty of the current challenge. Signature: ```typescript -export interface BitNodeMultipliers +interface BitNodeMultipliers ``` ## Properties diff --git a/markdown/bitburner.bladeburner.inbladeburner.md b/markdown/bitburner.bladeburner.inbladeburner.md new file mode 100644 index 000000000..d999a75dc --- /dev/null +++ b/markdown/bitburner.bladeburner.inbladeburner.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Bladeburner](./bitburner.bladeburner.md) > [inBladeburner](./bitburner.bladeburner.inbladeburner.md) + +## Bladeburner.inBladeburner() method + +Returns whether player is a member of bladeburner division. Does not require API access. + +Signature: + +```typescript +inBladeburner(): boolean; +``` +Returns: + +boolean + +whether player is a member of bladeburner division. + +## Remarks + +RAM cost: 1 GB + diff --git a/markdown/bitburner.bladeburner.md b/markdown/bitburner.bladeburner.md index 987465c7f..c4a8173d7 100644 --- a/markdown/bitburner.bladeburner.md +++ b/markdown/bitburner.bladeburner.md @@ -46,6 +46,7 @@ You have to be employed in the Bladeburner division and be in BitNode-7 or have | [getSkillUpgradeCost(name, count)](./bitburner.bladeburner.getskillupgradecost.md) | Get cost to upgrade skill. | | [getStamina()](./bitburner.bladeburner.getstamina.md) | Get bladeburner stamina. | | [getTeamSize(type, name)](./bitburner.bladeburner.getteamsize.md) | Get team size. | +| [inBladeburner()](./bitburner.bladeburner.inbladeburner.md) | Returns whether player is a member of bladeburner division. Does not require API access. | | [joinBladeburnerDivision()](./bitburner.bladeburner.joinbladeburnerdivision.md) | Join the bladeburner division. | | [joinBladeburnerFaction()](./bitburner.bladeburner.joinbladeburnerfaction.md) | Join the bladeburner faction. | | [setActionAutolevel(type, name, autoLevel)](./bitburner.bladeburner.setactionautolevel.md) | Set an action autolevel. | diff --git a/markdown/bitburner.bladeburnercuraction.md b/markdown/bitburner.bladeburnercuraction.md index abf2ceabb..596804d5f 100644 --- a/markdown/bitburner.bladeburnercuraction.md +++ b/markdown/bitburner.bladeburnercuraction.md @@ -9,7 +9,7 @@ Bladeburner current action. Signature: ```typescript -export interface BladeburnerCurAction +interface BladeburnerCurAction ``` ## Properties diff --git a/markdown/bitburner.charactermult.agility.md b/markdown/bitburner.charactermult.agility.md deleted file mode 100644 index cc7c326db..000000000 --- a/markdown/bitburner.charactermult.agility.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [agility](./bitburner.charactermult.agility.md) - -## CharacterMult.agility property - -Agility stat - -Signature: - -```typescript -agility: number; -``` diff --git a/markdown/bitburner.charactermult.agilityexp.md b/markdown/bitburner.charactermult.agilityexp.md deleted file mode 100644 index 2221c4f9a..000000000 --- a/markdown/bitburner.charactermult.agilityexp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [agilityExp](./bitburner.charactermult.agilityexp.md) - -## CharacterMult.agilityExp property - -Agility exp - -Signature: - -```typescript -agilityExp: number; -``` diff --git a/markdown/bitburner.charactermult.charisma.md b/markdown/bitburner.charactermult.charisma.md deleted file mode 100644 index 9a96106df..000000000 --- a/markdown/bitburner.charactermult.charisma.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [charisma](./bitburner.charactermult.charisma.md) - -## CharacterMult.charisma property - -Charisma stat - -Signature: - -```typescript -charisma: number; -``` diff --git a/markdown/bitburner.charactermult.charismaexp.md b/markdown/bitburner.charactermult.charismaexp.md deleted file mode 100644 index 9c4ecea68..000000000 --- a/markdown/bitburner.charactermult.charismaexp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [charismaExp](./bitburner.charactermult.charismaexp.md) - -## CharacterMult.charismaExp property - -Charisma exp - -Signature: - -```typescript -charismaExp: number; -``` diff --git a/markdown/bitburner.charactermult.companyrep.md b/markdown/bitburner.charactermult.companyrep.md deleted file mode 100644 index e12e6b4c1..000000000 --- a/markdown/bitburner.charactermult.companyrep.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [companyRep](./bitburner.charactermult.companyrep.md) - -## CharacterMult.companyRep property - -Company reputation - -Signature: - -```typescript -companyRep: number; -``` diff --git a/markdown/bitburner.charactermult.crimemoney.md b/markdown/bitburner.charactermult.crimemoney.md deleted file mode 100644 index 4e3608874..000000000 --- a/markdown/bitburner.charactermult.crimemoney.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [crimeMoney](./bitburner.charactermult.crimemoney.md) - -## CharacterMult.crimeMoney property - -Money earned from crimes - -Signature: - -```typescript -crimeMoney: number; -``` diff --git a/markdown/bitburner.charactermult.crimesuccess.md b/markdown/bitburner.charactermult.crimesuccess.md deleted file mode 100644 index 2660f01cc..000000000 --- a/markdown/bitburner.charactermult.crimesuccess.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [crimeSuccess](./bitburner.charactermult.crimesuccess.md) - -## CharacterMult.crimeSuccess property - -Crime success chance - -Signature: - -```typescript -crimeSuccess: number; -``` diff --git a/markdown/bitburner.charactermult.defense.md b/markdown/bitburner.charactermult.defense.md deleted file mode 100644 index 1165811f2..000000000 --- a/markdown/bitburner.charactermult.defense.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [defense](./bitburner.charactermult.defense.md) - -## CharacterMult.defense property - -Defense stat - -Signature: - -```typescript -defense: number; -``` diff --git a/markdown/bitburner.charactermult.defenseexp.md b/markdown/bitburner.charactermult.defenseexp.md deleted file mode 100644 index 9b1b55e5e..000000000 --- a/markdown/bitburner.charactermult.defenseexp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [defenseExp](./bitburner.charactermult.defenseexp.md) - -## CharacterMult.defenseExp property - -Defense exp - -Signature: - -```typescript -defenseExp: number; -``` diff --git a/markdown/bitburner.charactermult.dexterity.md b/markdown/bitburner.charactermult.dexterity.md deleted file mode 100644 index 56a6fb1e5..000000000 --- a/markdown/bitburner.charactermult.dexterity.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [dexterity](./bitburner.charactermult.dexterity.md) - -## CharacterMult.dexterity property - -Dexterity stat - -Signature: - -```typescript -dexterity: number; -``` diff --git a/markdown/bitburner.charactermult.dexterityexp.md b/markdown/bitburner.charactermult.dexterityexp.md deleted file mode 100644 index 8adadcad4..000000000 --- a/markdown/bitburner.charactermult.dexterityexp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [dexterityExp](./bitburner.charactermult.dexterityexp.md) - -## CharacterMult.dexterityExp property - -Dexterity exp - -Signature: - -```typescript -dexterityExp: number; -``` diff --git a/markdown/bitburner.charactermult.factionrep.md b/markdown/bitburner.charactermult.factionrep.md deleted file mode 100644 index ee97e45f4..000000000 --- a/markdown/bitburner.charactermult.factionrep.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [factionRep](./bitburner.charactermult.factionrep.md) - -## CharacterMult.factionRep property - -Faction reputation - -Signature: - -```typescript -factionRep: number; -``` diff --git a/markdown/bitburner.charactermult.hacking.md b/markdown/bitburner.charactermult.hacking.md deleted file mode 100644 index b1a9d4c8f..000000000 --- a/markdown/bitburner.charactermult.hacking.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [hacking](./bitburner.charactermult.hacking.md) - -## CharacterMult.hacking property - -Hacking stat - -Signature: - -```typescript -hacking: number; -``` diff --git a/markdown/bitburner.charactermult.hackingexp.md b/markdown/bitburner.charactermult.hackingexp.md deleted file mode 100644 index 3d715cdeb..000000000 --- a/markdown/bitburner.charactermult.hackingexp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [hackingExp](./bitburner.charactermult.hackingexp.md) - -## CharacterMult.hackingExp property - -Hacking exp - -Signature: - -```typescript -hackingExp: number; -``` diff --git a/markdown/bitburner.charactermult.md b/markdown/bitburner.charactermult.md deleted file mode 100644 index 92018ee12..000000000 --- a/markdown/bitburner.charactermult.md +++ /dev/null @@ -1,35 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) - -## CharacterMult interface - - -Signature: - -```typescript -export interface CharacterMult -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [agility](./bitburner.charactermult.agility.md) | number | Agility stat | -| [agilityExp](./bitburner.charactermult.agilityexp.md) | number | Agility exp | -| [charisma](./bitburner.charactermult.charisma.md) | number | Charisma stat | -| [charismaExp](./bitburner.charactermult.charismaexp.md) | number | Charisma exp | -| [companyRep](./bitburner.charactermult.companyrep.md) | number | Company reputation | -| [crimeMoney](./bitburner.charactermult.crimemoney.md) | number | Money earned from crimes | -| [crimeSuccess](./bitburner.charactermult.crimesuccess.md) | number | Crime success chance | -| [defense](./bitburner.charactermult.defense.md) | number | Defense stat | -| [defenseExp](./bitburner.charactermult.defenseexp.md) | number | Defense exp | -| [dexterity](./bitburner.charactermult.dexterity.md) | number | Dexterity stat | -| [dexterityExp](./bitburner.charactermult.dexterityexp.md) | number | Dexterity exp | -| [factionRep](./bitburner.charactermult.factionrep.md) | number | Faction reputation | -| [hacking](./bitburner.charactermult.hacking.md) | number | Hacking stat | -| [hackingExp](./bitburner.charactermult.hackingexp.md) | number | Hacking exp | -| [strength](./bitburner.charactermult.strength.md) | number | Strength stat | -| [strengthExp](./bitburner.charactermult.strengthexp.md) | number | Strength exp | -| [workMoney](./bitburner.charactermult.workmoney.md) | number | Money earned from jobs | - diff --git a/markdown/bitburner.charactermult.strength.md b/markdown/bitburner.charactermult.strength.md deleted file mode 100644 index 57369507e..000000000 --- a/markdown/bitburner.charactermult.strength.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [strength](./bitburner.charactermult.strength.md) - -## CharacterMult.strength property - -Strength stat - -Signature: - -```typescript -strength: number; -``` diff --git a/markdown/bitburner.charactermult.strengthexp.md b/markdown/bitburner.charactermult.strengthexp.md deleted file mode 100644 index 760e17669..000000000 --- a/markdown/bitburner.charactermult.strengthexp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [strengthExp](./bitburner.charactermult.strengthexp.md) - -## CharacterMult.strengthExp property - -Strength exp - -Signature: - -```typescript -strengthExp: number; -``` diff --git a/markdown/bitburner.charactermult.workmoney.md b/markdown/bitburner.charactermult.workmoney.md deleted file mode 100644 index 0232e0f19..000000000 --- a/markdown/bitburner.charactermult.workmoney.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CharacterMult](./bitburner.charactermult.md) > [workMoney](./bitburner.charactermult.workmoney.md) - -## CharacterMult.workMoney property - -Money earned from jobs - -Signature: - -```typescript -workMoney: number; -``` diff --git a/markdown/bitburner.codingattemptoptions.md b/markdown/bitburner.codingattemptoptions.md index 22dfd0301..f8b5bca22 100644 --- a/markdown/bitburner.codingattemptoptions.md +++ b/markdown/bitburner.codingattemptoptions.md @@ -9,7 +9,7 @@ Options to affect the behavior of [CodingContract](./bitburner.codingcontract.md Signature: ```typescript -export interface CodingAttemptOptions +interface CodingAttemptOptions ``` ## Properties diff --git a/markdown/bitburner.companyposname.md b/markdown/bitburner.companyposname.md new file mode 100644 index 000000000..deb2ac365 --- /dev/null +++ b/markdown/bitburner.companyposname.md @@ -0,0 +1,56 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CompanyPosName](./bitburner.companyposname.md) + +## CompanyPosName enum + + +Signature: + +```typescript +declare enum CompanyPosName +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| agent0 | "Field Agent" | | +| agent1 | "Secret Agent" | | +| agent2 | "Special Operative" | | +| bus0 | "Business Intern" | | +| bus1 | "Business Analyst" | | +| bus2 | "Business Manager" | | +| bus3 | "Operations Manager" | | +| bus4 | "Chief Financial Officer" | | +| bus5 | "Chief Executive Officer" | | +| busCons0 | "Business Consultant" | | +| busCons1 | "Senior Business Consultant" | | +| employee | "Employee" | | +| employeePT | "Part-time Employee" | | +| IT0 | "IT Intern" | | +| IT1 | "IT Analyst" | | +| IT2 | "IT Manager" | | +| IT3 | "Systems Administrator" | | +| netEng0 | "Network Engineer" | | +| netEng1 | "Network Administrator" | | +| sec0 | "Police Officer" | | +| sec1 | "Police Chief" | | +| sec2 | "Security Guard" | | +| sec3 | "Security Officer" | | +| sec4 | "Security Supervisor" | | +| sec5 | "Head of Security" | | +| secEng | "Security Engineer" | | +| softCons0 | "Software Consultant" | | +| softCons1 | "Senior Software Consultant" | | +| sw0 | "Software Engineering Intern" | | +| sw1 | "Junior Software Engineer" | | +| sw2 | "Senior Software Engineer" | | +| sw3 | "Lead Software Developer" | | +| sw4 | "Head of Software" | | +| sw5 | "Head of Engineering" | | +| sw6 | "Vice President of Technology" | | +| sw7 | "Chief Technology Officer" | | +| waiter | "Waiter" | | +| waiterPT | "Part-time Waiter" | | + diff --git a/markdown/bitburner.corporation.createcorporation.md b/markdown/bitburner.corporation.createcorporation.md index 9e9cdb585..30de005fa 100644 --- a/markdown/bitburner.corporation.createcorporation.md +++ b/markdown/bitburner.corporation.createcorporation.md @@ -16,7 +16,7 @@ createCorporation(corporationName: string, selfFund: boolean): boolean; | Parameter | Type | Description | | --- | --- | --- | -| corporationName | string | | +| corporationName | string | Name of the corporation | | selfFund | boolean | If you should self fund, defaults to true, false will only work on Bitnode 3 | Returns: diff --git a/markdown/bitburner.corporation.enums.md b/markdown/bitburner.corporation.enums.md new file mode 100644 index 000000000..1700462e2 --- /dev/null +++ b/markdown/bitburner.corporation.enums.md @@ -0,0 +1,16 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [enums](./bitburner.corporation.enums.md) + +## Corporation.enums property + +Enums specific to the corporation game mechanic. + +Signature: + +```typescript +enums: { + EmployeePositions: typeof EmployeePositions; + IndustryType: typeof IndustryType; + }; +``` diff --git a/markdown/bitburner.corporation.expandindustry.md b/markdown/bitburner.corporation.expandindustry.md index 49cf37cdb..bc9f8f7cf 100644 --- a/markdown/bitburner.corporation.expandindustry.md +++ b/markdown/bitburner.corporation.expandindustry.md @@ -9,14 +9,14 @@ Expand to a new industry Signature: ```typescript -expandIndustry(industryType: string, divisionName: string): void; +expandIndustry(industryType: IndustryType | `${IndustryType}`, divisionName: string): void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| industryType | string | Name of the industry | +| industryType | [IndustryType](./bitburner.industrytype.md) \| \`${[IndustryType](./bitburner.industrytype.md)}\` | Name of the industry | | divisionName | string | Name of the division | Returns: diff --git a/markdown/bitburner.corporation.getbonustime.md b/markdown/bitburner.corporation.getbonustime.md index 49b5ff0b5..f848218a7 100644 --- a/markdown/bitburner.corporation.getbonustime.md +++ b/markdown/bitburner.corporation.getbonustime.md @@ -4,11 +4,7 @@ ## Corporation.getBonusTime() method -Get bonus time. - -“Bonus time” is accumulated when the game is offline or if the game is inactive in the browser. - -“Bonus time” makes the game progress faster. +Get bonus time. “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser. “Bonus time” makes the game progress faster. Signature: diff --git a/markdown/bitburner.corporation.getexpandindustrycost.md b/markdown/bitburner.corporation.getexpandindustrycost.md index 335e99775..ab6bcd583 100644 --- a/markdown/bitburner.corporation.getexpandindustrycost.md +++ b/markdown/bitburner.corporation.getexpandindustrycost.md @@ -9,14 +9,14 @@ Gets the cost to expand into a new industry Signature: ```typescript -getExpandIndustryCost(industryName: string): number; +getExpandIndustryCost(industryName: IndustryType | `${IndustryType}`): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| industryName | string | Name of the industry | +| industryName | [IndustryType](./bitburner.industrytype.md) \| \`${[IndustryType](./bitburner.industrytype.md)}\` | Name of the industry | Returns: diff --git a/markdown/bitburner.corporation.getindustrytypes.md b/markdown/bitburner.corporation.getindustrytypes.md deleted file mode 100644 index 518d10464..000000000 --- a/markdown/bitburner.corporation.getindustrytypes.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [getIndustryTypes](./bitburner.corporation.getindustrytypes.md) - -## Corporation.getIndustryTypes() method - -Get list of industry types - -Signature: - -```typescript -getIndustryTypes(): string[]; -``` -Returns: - -string\[\] - -industry names - diff --git a/markdown/bitburner.corporation.hascorporation.md b/markdown/bitburner.corporation.hascorporation.md new file mode 100644 index 000000000..1cfb2594b --- /dev/null +++ b/markdown/bitburner.corporation.hascorporation.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [hasCorporation](./bitburner.corporation.hascorporation.md) + +## Corporation.hasCorporation() method + +Returns whether the player has a corporation. Does not require API access. + +Signature: + +```typescript +hasCorporation(): boolean; +``` +Returns: + +boolean + +whether the player has a corporation + diff --git a/markdown/bitburner.corporation.md b/markdown/bitburner.corporation.md index 83cfcb358..8139ad688 100644 --- a/markdown/bitburner.corporation.md +++ b/markdown/bitburner.corporation.md @@ -13,6 +13,12 @@ export interface Corporation extends WarehouseAPI, OfficeAPI ``` Extends: [WarehouseAPI](./bitburner.warehouseapi.md), [OfficeAPI](./bitburner.officeapi.md) +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [enums](./bitburner.corporation.enums.md) | { EmployeePositions: typeof [EmployeePositions](./bitburner.employeepositions.md); IndustryType: typeof [IndustryType](./bitburner.industrytype.md); } | Enums specific to the corporation game mechanic. | + ## Methods | Method | Description | @@ -23,12 +29,11 @@ export interface Corporation extends WarehouseAPI, OfficeAPI | [createCorporation(corporationName, selfFund)](./bitburner.corporation.createcorporation.md) | Create a Corporation | | [expandCity(divisionName, cityName)](./bitburner.corporation.expandcity.md) | Expand to a new city | | [expandIndustry(industryType, divisionName)](./bitburner.corporation.expandindustry.md) | Expand to a new industry | -| [getBonusTime()](./bitburner.corporation.getbonustime.md) | Get bonus time.“Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.“Bonus time” makes the game progress faster. | +| [getBonusTime()](./bitburner.corporation.getbonustime.md) | Get bonus time. “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser. “Bonus time” makes the game progress faster. | | [getCorporation()](./bitburner.corporation.getcorporation.md) | Get corporation data | | [getDivision(divisionName)](./bitburner.corporation.getdivision.md) | Get division data | | [getExpandCityCost()](./bitburner.corporation.getexpandcitycost.md) | Gets the cost to expand into a new city | | [getExpandIndustryCost(industryName)](./bitburner.corporation.getexpandindustrycost.md) | Gets the cost to expand into a new industry | -| [getIndustryTypes()](./bitburner.corporation.getindustrytypes.md) | Get list of industry types | | [getInvestmentOffer()](./bitburner.corporation.getinvestmentoffer.md) | Get an offer for investment based on you companies current valuation | | [getMaterialNames()](./bitburner.corporation.getmaterialnames.md) | Get list of materials | | [getResearchNames()](./bitburner.corporation.getresearchnames.md) | Get list of research names | @@ -38,6 +43,7 @@ export interface Corporation extends WarehouseAPI, OfficeAPI | [getUpgradeLevelCost(upgradeName)](./bitburner.corporation.getupgradelevelcost.md) | Gets the cost to unlock the next level of a levelable upgrade | | [getUpgradeNames()](./bitburner.corporation.getupgradenames.md) | Get list of upgrade names | | [goPublic(numShares)](./bitburner.corporation.gopublic.md) | Go public | +| [hasCorporation()](./bitburner.corporation.hascorporation.md) | Returns whether the player has a corporation. Does not require API access. | | [hasUnlockUpgrade(upgradeName)](./bitburner.corporation.hasunlockupgrade.md) | Check if you have a one time unlockable upgrade | | [issueDividends(rate)](./bitburner.corporation.issuedividends.md) | Issue dividends | | [levelUpgrade(upgradeName)](./bitburner.corporation.levelupgrade.md) | Level an upgrade. | diff --git a/markdown/bitburner.crimestats.md b/markdown/bitburner.crimestats.md index ea96891d0..facf715f7 100644 --- a/markdown/bitburner.crimestats.md +++ b/markdown/bitburner.crimestats.md @@ -9,7 +9,7 @@ Data representing the internal values of a crime. Signature: ```typescript -export interface CrimeStats +interface CrimeStats ``` ## Properties @@ -31,7 +31,6 @@ export interface CrimeStats | [karma](./bitburner.crimestats.karma.md) | number | Amount of karma lost for successfully committing this crime | | [kills](./bitburner.crimestats.kills.md) | number | How many people die as a result of this crime | | [money](./bitburner.crimestats.money.md) | number | How much money is given | -| [name](./bitburner.crimestats.name.md) | string | Name of crime | | [strength\_exp](./bitburner.crimestats.strength_exp.md) | number | strength exp gained from crime | | [strength\_success\_weight](./bitburner.crimestats.strength_success_weight.md) | number | strength level impact on success change of the crime | | [time](./bitburner.crimestats.time.md) | number | Milliseconds it takes to attempt the crime | diff --git a/markdown/bitburner.crimestats.name.md b/markdown/bitburner.crimestats.name.md deleted file mode 100644 index 0746c5756..000000000 --- a/markdown/bitburner.crimestats.name.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [CrimeStats](./bitburner.crimestats.md) > [name](./bitburner.crimestats.name.md) - -## CrimeStats.name property - -Name of crime - -Signature: - -```typescript -name: string; -``` diff --git a/markdown/bitburner.crimetype.md b/markdown/bitburner.crimetype.md new file mode 100644 index 000000000..bddd47bf7 --- /dev/null +++ b/markdown/bitburner.crimetype.md @@ -0,0 +1,30 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CrimeType](./bitburner.crimetype.md) + +## CrimeType enum + + +Signature: + +```typescript +declare enum CrimeType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| assassination | "Assassination" | | +| bondForgery | "Bond Forgery" | | +| dealDrugs | "Deal Drugs" | | +| grandTheftAuto | "Grand Theft Auto" | | +| heist | "Heist" | | +| homicide | "Homicide" | | +| kidnap | "Kidnap" | | +| larceny | "Larceny" | | +| mug | "Mug" | | +| robStore | "Rob Store" | | +| shoplift | "Shoplift" | | +| traffickArms | "Traffick Arms" | | + diff --git a/markdown/bitburner.employee.cha.md b/markdown/bitburner.employee.cha.md deleted file mode 100644 index e4eefcff6..000000000 --- a/markdown/bitburner.employee.cha.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [cha](./bitburner.employee.cha.md) - -## Employee.cha property - -Charisma of the employee - -Signature: - -```typescript -cha: number; -``` diff --git a/markdown/bitburner.employee.cre.md b/markdown/bitburner.employee.cre.md deleted file mode 100644 index 6071773e8..000000000 --- a/markdown/bitburner.employee.cre.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [cre](./bitburner.employee.cre.md) - -## Employee.cre property - -Creativity of the employee - -Signature: - -```typescript -cre: number; -``` diff --git a/markdown/bitburner.employee.eff.md b/markdown/bitburner.employee.eff.md deleted file mode 100644 index db9a82e19..000000000 --- a/markdown/bitburner.employee.eff.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [eff](./bitburner.employee.eff.md) - -## Employee.eff property - -Efficiency of the employee - -Signature: - -```typescript -eff: number; -``` diff --git a/markdown/bitburner.employee.ene.md b/markdown/bitburner.employee.ene.md deleted file mode 100644 index 573874d5e..000000000 --- a/markdown/bitburner.employee.ene.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [ene](./bitburner.employee.ene.md) - -## Employee.ene property - -Energy of the employee - -Signature: - -```typescript -ene: number; -``` diff --git a/markdown/bitburner.employee.exp.md b/markdown/bitburner.employee.exp.md deleted file mode 100644 index 1f88b53e4..000000000 --- a/markdown/bitburner.employee.exp.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [exp](./bitburner.employee.exp.md) - -## Employee.exp property - -Experience of the employee - -Signature: - -```typescript -exp: number; -``` diff --git a/markdown/bitburner.employee.hap.md b/markdown/bitburner.employee.hap.md deleted file mode 100644 index 9d72d277b..000000000 --- a/markdown/bitburner.employee.hap.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [hap](./bitburner.employee.hap.md) - -## Employee.hap property - -Happiness of the employee - -Signature: - -```typescript -hap: number; -``` diff --git a/markdown/bitburner.employee.int.md b/markdown/bitburner.employee.int.md deleted file mode 100644 index 5a5a710c2..000000000 --- a/markdown/bitburner.employee.int.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [int](./bitburner.employee.int.md) - -## Employee.int property - -Intelligence of the employee - -Signature: - -```typescript -int: number; -``` diff --git a/markdown/bitburner.employee.loc.md b/markdown/bitburner.employee.loc.md deleted file mode 100644 index 4bc4964d3..000000000 --- a/markdown/bitburner.employee.loc.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [loc](./bitburner.employee.loc.md) - -## Employee.loc property - -Current Location (city) - -Signature: - -```typescript -loc: string; -``` diff --git a/markdown/bitburner.employee.md b/markdown/bitburner.employee.md deleted file mode 100644 index 13846eec6..000000000 --- a/markdown/bitburner.employee.md +++ /dev/null @@ -1,31 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) - -## Employee interface - -Employee in an office - -Signature: - -```typescript -export interface Employee -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [cha](./bitburner.employee.cha.md) | number | Charisma of the employee | -| [cre](./bitburner.employee.cre.md) | number | Creativity of the employee | -| [eff](./bitburner.employee.eff.md) | number | Efficiency of the employee | -| [ene](./bitburner.employee.ene.md) | number | Energy of the employee | -| [exp](./bitburner.employee.exp.md) | number | Experience of the employee | -| [hap](./bitburner.employee.hap.md) | number | Happiness of the employee | -| [int](./bitburner.employee.int.md) | number | Intelligence of the employee | -| [loc](./bitburner.employee.loc.md) | string | Current Location (city) | -| [mor](./bitburner.employee.mor.md) | number | Morale of the employee | -| [name](./bitburner.employee.name.md) | string | Name of the employee | -| [pos](./bitburner.employee.pos.md) | string | Current job position | -| [sal](./bitburner.employee.sal.md) | number | Salary of the employee | - diff --git a/markdown/bitburner.employee.mor.md b/markdown/bitburner.employee.mor.md deleted file mode 100644 index 8b58c409d..000000000 --- a/markdown/bitburner.employee.mor.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [mor](./bitburner.employee.mor.md) - -## Employee.mor property - -Morale of the employee - -Signature: - -```typescript -mor: number; -``` diff --git a/markdown/bitburner.employee.name.md b/markdown/bitburner.employee.name.md deleted file mode 100644 index 1eff9ff46..000000000 --- a/markdown/bitburner.employee.name.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [name](./bitburner.employee.name.md) - -## Employee.name property - -Name of the employee - -Signature: - -```typescript -name: string; -``` diff --git a/markdown/bitburner.employee.pos.md b/markdown/bitburner.employee.pos.md deleted file mode 100644 index cfdb00fd5..000000000 --- a/markdown/bitburner.employee.pos.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [pos](./bitburner.employee.pos.md) - -## Employee.pos property - -Current job position - -Signature: - -```typescript -pos: string; -``` diff --git a/markdown/bitburner.employee.sal.md b/markdown/bitburner.employee.sal.md deleted file mode 100644 index b70aa48ec..000000000 --- a/markdown/bitburner.employee.sal.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Employee](./bitburner.employee.md) > [sal](./bitburner.employee.sal.md) - -## Employee.sal property - -Salary of the employee - -Signature: - -```typescript -sal: number; -``` diff --git a/markdown/bitburner.employeejobs._research___development_.md b/markdown/bitburner.employeejobs._research___development_.md deleted file mode 100644 index 4b53d50f6..000000000 --- a/markdown/bitburner.employeejobs._research___development_.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeeJobs](./bitburner.employeejobs.md) > ["Research & Development"](./bitburner.employeejobs._research___development_.md) - -## EmployeeJobs."Research & Development" property - -Signature: - -```typescript -"Research & Development": number; -``` diff --git a/markdown/bitburner.employeejobs.business.md b/markdown/bitburner.employeejobs.business.md deleted file mode 100644 index 8f46f7be1..000000000 --- a/markdown/bitburner.employeejobs.business.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeeJobs](./bitburner.employeejobs.md) > [Business](./bitburner.employeejobs.business.md) - -## EmployeeJobs.Business property - -Signature: - -```typescript -Business: number; -``` diff --git a/markdown/bitburner.employeejobs.engineer.md b/markdown/bitburner.employeejobs.engineer.md deleted file mode 100644 index eb8d854a4..000000000 --- a/markdown/bitburner.employeejobs.engineer.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeeJobs](./bitburner.employeejobs.md) > [Engineer](./bitburner.employeejobs.engineer.md) - -## EmployeeJobs.Engineer property - -Signature: - -```typescript -Engineer: number; -``` diff --git a/markdown/bitburner.employeejobs.management.md b/markdown/bitburner.employeejobs.management.md deleted file mode 100644 index 8d521ae74..000000000 --- a/markdown/bitburner.employeejobs.management.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeeJobs](./bitburner.employeejobs.md) > [Management](./bitburner.employeejobs.management.md) - -## EmployeeJobs.Management property - -Signature: - -```typescript -Management: number; -``` diff --git a/markdown/bitburner.employeejobs.md b/markdown/bitburner.employeejobs.md deleted file mode 100644 index 861cffdf1..000000000 --- a/markdown/bitburner.employeejobs.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeeJobs](./bitburner.employeejobs.md) - -## EmployeeJobs interface - -Object representing the number of employee in each job. - -Signature: - -```typescript -interface EmployeeJobs -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| ["Research & Development"](./bitburner.employeejobs._research___development_.md) | number | | -| [Business](./bitburner.employeejobs.business.md) | number | | -| [Engineer](./bitburner.employeejobs.engineer.md) | number | | -| [Management](./bitburner.employeejobs.management.md) | number | | -| [Operations](./bitburner.employeejobs.operations.md) | number | | -| [Training](./bitburner.employeejobs.training.md) | number | | -| [Unassigned](./bitburner.employeejobs.unassigned.md) | number | | - diff --git a/markdown/bitburner.employeejobs.operations.md b/markdown/bitburner.employeejobs.operations.md deleted file mode 100644 index 523d3286b..000000000 --- a/markdown/bitburner.employeejobs.operations.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeeJobs](./bitburner.employeejobs.md) > [Operations](./bitburner.employeejobs.operations.md) - -## EmployeeJobs.Operations property - -Signature: - -```typescript -Operations: number; -``` diff --git a/markdown/bitburner.employeejobs.training.md b/markdown/bitburner.employeejobs.training.md deleted file mode 100644 index e8d4b77e8..000000000 --- a/markdown/bitburner.employeejobs.training.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeeJobs](./bitburner.employeejobs.md) > [Training](./bitburner.employeejobs.training.md) - -## EmployeeJobs.Training property - -Signature: - -```typescript -Training: number; -``` diff --git a/markdown/bitburner.employeejobs.unassigned.md b/markdown/bitburner.employeejobs.unassigned.md deleted file mode 100644 index 49733f518..000000000 --- a/markdown/bitburner.employeejobs.unassigned.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeeJobs](./bitburner.employeejobs.md) > [Unassigned](./bitburner.employeejobs.unassigned.md) - -## EmployeeJobs.Unassigned property - -Signature: - -```typescript -Unassigned: number; -``` diff --git a/markdown/bitburner.employeepositions.md b/markdown/bitburner.employeepositions.md new file mode 100644 index 000000000..49a1d9fed --- /dev/null +++ b/markdown/bitburner.employeepositions.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [EmployeePositions](./bitburner.employeepositions.md) + +## EmployeePositions enum + + +Signature: + +```typescript +declare enum EmployeePositions +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| Business | "Business" | | +| Engineer | "Engineer" | | +| Management | "Management" | | +| Operations | "Operations" | | +| RandD | "Research & Development" | | +| Training | "Training" | | +| Unassigned | "Unassigned" | | + diff --git a/markdown/bitburner.enums.md b/markdown/bitburner.enums.md deleted file mode 100644 index 9ef174a1d..000000000 --- a/markdown/bitburner.enums.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [enums](./bitburner.enums.md) - -## enums variable - - -Signature: - -```typescript -enums = { - toast: { - SUCCESS: "success", - WARNING: "warning", - ERROR: "error", - INFO: "info", - }, -} -``` diff --git a/markdown/bitburner.equipmentstats.md b/markdown/bitburner.equipmentstats.md index 34cad3470..4c0e9d37c 100644 --- a/markdown/bitburner.equipmentstats.md +++ b/markdown/bitburner.equipmentstats.md @@ -9,7 +9,7 @@ Object representing data representing a gang member equipment. Signature: ```typescript -export interface EquipmentStats +interface EquipmentStats ``` ## Properties diff --git a/markdown/bitburner.factionworktype.md b/markdown/bitburner.factionworktype.md new file mode 100644 index 000000000..cad32321b --- /dev/null +++ b/markdown/bitburner.factionworktype.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [FactionWorkType](./bitburner.factionworktype.md) + +## FactionWorkType enum + + +Signature: + +```typescript +declare enum FactionWorkType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| field | "field" | | +| hacking | "hacking" | | +| security | "security" | | + diff --git a/markdown/bitburner.formulas.md b/markdown/bitburner.formulas.md index 7836b12ef..de287d02b 100644 --- a/markdown/bitburner.formulas.md +++ b/markdown/bitburner.formulas.md @@ -32,6 +32,7 @@ You need Formulas.exe on your home computer to use this API. | Method | Description | | --- | --- | +| [mockPerson()](./bitburner.formulas.mockperson.md) | | | [mockPlayer()](./bitburner.formulas.mockplayer.md) | | | [mockServer()](./bitburner.formulas.mockserver.md) | | diff --git a/markdown/bitburner.formulas.mockperson.md b/markdown/bitburner.formulas.mockperson.md new file mode 100644 index 000000000..4a1478dae --- /dev/null +++ b/markdown/bitburner.formulas.mockperson.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Formulas](./bitburner.formulas.md) > [mockPerson](./bitburner.formulas.mockperson.md) + +## Formulas.mockPerson() method + +Signature: + +```typescript +mockPerson(): Person; +``` +Returns: + +[Person](./bitburner.person.md) + diff --git a/markdown/bitburner.fragment.md b/markdown/bitburner.fragment.md index 959849efd..909d721cf 100644 --- a/markdown/bitburner.fragment.md +++ b/markdown/bitburner.fragment.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface Fragment +interface Fragment ``` ## Properties diff --git a/markdown/bitburner.gang.canrecruitmember.md b/markdown/bitburner.gang.canrecruitmember.md index 5710fed44..d09a109ed 100644 --- a/markdown/bitburner.gang.canrecruitmember.md +++ b/markdown/bitburner.gang.canrecruitmember.md @@ -21,5 +21,7 @@ True if a member can currently be recruited, false otherwise. RAM cost: 1 GB -Returns boolean indicating whether a member can currently be recruited +Returns a boolean indicating whether a member can currently be recruited. + +Once you have successfully created a gang by using the function [createGang](./bitburner.gang.creategang.md), you can immediately recruit a small number of members to your gang. After you have recruited the founding members, to recruit another member you must increase your respect. The more members you want to recruit, the more respect you require. If your gang has the maximum number of members, then this function would return false. diff --git a/markdown/bitburner.ganggeninfo.md b/markdown/bitburner.ganggeninfo.md index def8fab44..4bfa5686f 100644 --- a/markdown/bitburner.ganggeninfo.md +++ b/markdown/bitburner.ganggeninfo.md @@ -9,7 +9,7 @@ Gang general info. Signature: ```typescript -export interface GangGenInfo +interface GangGenInfo ``` ## Properties diff --git a/markdown/bitburner.gangmemberascension.md b/markdown/bitburner.gangmemberascension.md index 38d96416a..8553bde4b 100644 --- a/markdown/bitburner.gangmemberascension.md +++ b/markdown/bitburner.gangmemberascension.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface GangMemberAscension +interface GangMemberAscension ``` ## Properties diff --git a/markdown/bitburner.gangmemberinfo.md b/markdown/bitburner.gangmemberinfo.md index 51afe2946..82f65eb01 100644 --- a/markdown/bitburner.gangmemberinfo.md +++ b/markdown/bitburner.gangmemberinfo.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface GangMemberInfo +interface GangMemberInfo ``` ## Properties diff --git a/markdown/bitburner.gangotherinfo.md b/markdown/bitburner.gangotherinfo.md index add42849b..9279a709c 100644 --- a/markdown/bitburner.gangotherinfo.md +++ b/markdown/bitburner.gangotherinfo.md @@ -8,5 +8,5 @@ Signature: ```typescript -export interface GangOtherInfo +interface GangOtherInfo ``` diff --git a/markdown/bitburner.gangotherinfoobject.md b/markdown/bitburner.gangotherinfoobject.md index a5a262017..32c870ca1 100644 --- a/markdown/bitburner.gangotherinfoobject.md +++ b/markdown/bitburner.gangotherinfoobject.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface GangOtherInfoObject +interface GangOtherInfoObject ``` ## Properties diff --git a/markdown/bitburner.gangtaskstats.md b/markdown/bitburner.gangtaskstats.md index 825940c02..b1ce25db7 100644 --- a/markdown/bitburner.gangtaskstats.md +++ b/markdown/bitburner.gangtaskstats.md @@ -9,7 +9,7 @@ Object representing data representing a gang member task. Signature: ```typescript -export interface GangTaskStats +interface GangTaskStats ``` ## Properties diff --git a/markdown/bitburner.gangterritory.md b/markdown/bitburner.gangterritory.md index c42e62060..bacbdc449 100644 --- a/markdown/bitburner.gangterritory.md +++ b/markdown/bitburner.gangterritory.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface GangTerritory +interface GangTerritory ``` ## Properties diff --git a/markdown/bitburner.gymtype.md b/markdown/bitburner.gymtype.md new file mode 100644 index 000000000..b340bbfa6 --- /dev/null +++ b/markdown/bitburner.gymtype.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [GymType](./bitburner.gymtype.md) + +## GymType enum + + +Signature: + +```typescript +declare enum GymType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| agility | "agi" | | +| defense | "def" | | +| dexterity | "dex" | | +| strength | "str" | | + diff --git a/markdown/bitburner.hackingformulas.growpercent.md b/markdown/bitburner.hackingformulas.growpercent.md index 99c3b71bf..0de0309e5 100644 --- a/markdown/bitburner.hackingformulas.growpercent.md +++ b/markdown/bitburner.hackingformulas.growpercent.md @@ -9,7 +9,7 @@ Calculate the percent a server would grow to. (Ex: 3.0 would would grow the serv Signature: ```typescript -growPercent(server: Server, threads: number, player: Player, cores?: number): number; +growPercent(server: Server, threads: number, player: Person, cores?: number): number; ``` ## Parameters @@ -18,7 +18,7 @@ growPercent(server: Server, threads: number, player: Player, cores?: number): nu | --- | --- | --- | | server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) | | threads | number | Amount of thread. | -| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | +| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | | cores | number | Number of cores on the computer that will execute grow. | Returns: diff --git a/markdown/bitburner.hackingformulas.growtime.md b/markdown/bitburner.hackingformulas.growtime.md index 8d9f9c2b0..20a393163 100644 --- a/markdown/bitburner.hackingformulas.growtime.md +++ b/markdown/bitburner.hackingformulas.growtime.md @@ -9,7 +9,7 @@ Calculate grow time. Signature: ```typescript -growTime(server: Server, player: Player): number; +growTime(server: Server, player: Person): number; ``` ## Parameters @@ -17,7 +17,7 @@ growTime(server: Server, player: Player): number; | Parameter | Type | Description | | --- | --- | --- | | server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) | -| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | +| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | Returns: diff --git a/markdown/bitburner.hackingformulas.hackchance.md b/markdown/bitburner.hackingformulas.hackchance.md index 92c1a27b1..3bae67598 100644 --- a/markdown/bitburner.hackingformulas.hackchance.md +++ b/markdown/bitburner.hackingformulas.hackchance.md @@ -9,7 +9,7 @@ Calculate hack chance. (Ex: 0.25 would indicate a 25% chance of success.) Signature: ```typescript -hackChance(server: Server, player: Player): number; +hackChance(server: Server, player: Person): number; ``` ## Parameters @@ -17,7 +17,7 @@ hackChance(server: Server, player: Player): number; | Parameter | Type | Description | | --- | --- | --- | | server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) | -| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | +| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | Returns: diff --git a/markdown/bitburner.hackingformulas.hackexp.md b/markdown/bitburner.hackingformulas.hackexp.md index 5992a5f94..998b7b600 100644 --- a/markdown/bitburner.hackingformulas.hackexp.md +++ b/markdown/bitburner.hackingformulas.hackexp.md @@ -9,7 +9,7 @@ Calculate hack exp for one thread. Signature: ```typescript -hackExp(server: Server, player: Player): number; +hackExp(server: Server, player: Person): number; ``` ## Parameters @@ -17,7 +17,7 @@ hackExp(server: Server, player: Player): number; | Parameter | Type | Description | | --- | --- | --- | | server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) | -| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | +| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | Returns: diff --git a/markdown/bitburner.hackingformulas.hackpercent.md b/markdown/bitburner.hackingformulas.hackpercent.md index 400621104..4c5f65e37 100644 --- a/markdown/bitburner.hackingformulas.hackpercent.md +++ b/markdown/bitburner.hackingformulas.hackpercent.md @@ -9,7 +9,7 @@ Calculate hack percent for one thread. (Ex: 0.25 would steal 25% of the server's Signature: ```typescript -hackPercent(server: Server, player: Player): number; +hackPercent(server: Server, player: Person): number; ``` ## Parameters @@ -17,7 +17,7 @@ hackPercent(server: Server, player: Player): number; | Parameter | Type | Description | | --- | --- | --- | | server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) | -| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | +| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | Returns: diff --git a/markdown/bitburner.hackingformulas.hacktime.md b/markdown/bitburner.hackingformulas.hacktime.md index b1bcd35e0..7e6886437 100644 --- a/markdown/bitburner.hackingformulas.hacktime.md +++ b/markdown/bitburner.hackingformulas.hacktime.md @@ -9,7 +9,7 @@ Calculate hack time. Signature: ```typescript -hackTime(server: Server, player: Player): number; +hackTime(server: Server, player: Person): number; ``` ## Parameters @@ -17,7 +17,7 @@ hackTime(server: Server, player: Player): number; | Parameter | Type | Description | | --- | --- | --- | | server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) | -| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | +| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | Returns: diff --git a/markdown/bitburner.hackingformulas.weakentime.md b/markdown/bitburner.hackingformulas.weakentime.md index 78190bb40..a166a3cd2 100644 --- a/markdown/bitburner.hackingformulas.weakentime.md +++ b/markdown/bitburner.hackingformulas.weakentime.md @@ -9,7 +9,7 @@ Calculate weaken time. Signature: ```typescript -weakenTime(server: Server, player: Player): number; +weakenTime(server: Server, player: Person): number; ``` ## Parameters @@ -17,7 +17,7 @@ weakenTime(server: Server, player: Player): number; | Parameter | Type | Description | | --- | --- | --- | | server | [Server](./bitburner.server.md) | Server info from [getServer](./bitburner.ns.getserver.md) | -| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | +| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | Returns: diff --git a/markdown/bitburner.hackingmultipliers.md b/markdown/bitburner.hackingmultipliers.md index 425caecc8..f9a9fec2d 100644 --- a/markdown/bitburner.hackingmultipliers.md +++ b/markdown/bitburner.hackingmultipliers.md @@ -9,7 +9,7 @@ Hack related multipliers. Signature: ```typescript -export interface HackingMultipliers +interface HackingMultipliers ``` ## Properties diff --git a/markdown/bitburner.hacknetmultipliers.md b/markdown/bitburner.hacknetmultipliers.md index c04b83fa4..6697e5eb6 100644 --- a/markdown/bitburner.hacknetmultipliers.md +++ b/markdown/bitburner.hacknetmultipliers.md @@ -9,7 +9,7 @@ Hacknet related multipliers. Signature: ```typescript -export interface HacknetMultipliers +interface HacknetMultipliers ``` ## Properties diff --git a/markdown/bitburner.hacknetnodeconstants.md b/markdown/bitburner.hacknetnodeconstants.md index 92febb288..d70c40c57 100644 --- a/markdown/bitburner.hacknetnodeconstants.md +++ b/markdown/bitburner.hacknetnodeconstants.md @@ -9,7 +9,7 @@ Hacknet node related constants Signature: ```typescript -export interface HacknetNodeConstants +interface HacknetNodeConstants ``` ## Properties diff --git a/markdown/bitburner.hacknetserverconstants.md b/markdown/bitburner.hacknetserverconstants.md index e12db4ba9..01ddd2959 100644 --- a/markdown/bitburner.hacknetserverconstants.md +++ b/markdown/bitburner.hacknetserverconstants.md @@ -9,7 +9,7 @@ Hacknet server related constants Signature: ```typescript -export interface HacknetServerConstants +interface HacknetServerConstants ``` ## Properties diff --git a/markdown/bitburner.hp.md b/markdown/bitburner.hp.md index 109299a2f..69c2ae850 100644 --- a/markdown/bitburner.hp.md +++ b/markdown/bitburner.hp.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface HP +interface HP ``` ## Properties diff --git a/markdown/bitburner.ilocation.md b/markdown/bitburner.ilocation.md index 847b00d79..b448410e3 100644 --- a/markdown/bitburner.ilocation.md +++ b/markdown/bitburner.ilocation.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface ILocation +interface ILocation ``` ## Properties diff --git a/markdown/bitburner.industrytype.md b/markdown/bitburner.industrytype.md new file mode 100644 index 000000000..e58b7ace7 --- /dev/null +++ b/markdown/bitburner.industrytype.md @@ -0,0 +1,32 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [IndustryType](./bitburner.industrytype.md) + +## IndustryType enum + + +Signature: + +```typescript +declare enum IndustryType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| Agriculture | "Agriculture" | | +| Chemical | "Chemical" | | +| Computers | "Computer Hardware" | | +| Energy | "Energy" | | +| Fishing | "Fishing" | | +| Food | "Food" | | +| Healthcare | "Healthcare" | | +| Mining | "Mining" | | +| Pharmaceutical | "Pharmaceutical" | | +| RealEstate | "RealEstate" | | +| Robotics | "Robotics" | | +| Software | "Software" | | +| Tobacco | "Tobacco" | | +| Utilities | "Water Utilities" | | + diff --git a/markdown/bitburner.infiltration.getpossiblelocations.md b/markdown/bitburner.infiltration.getpossiblelocations.md index 010b1a1a1..d2a78e55f 100644 --- a/markdown/bitburner.infiltration.getpossiblelocations.md +++ b/markdown/bitburner.infiltration.getpossiblelocations.md @@ -9,11 +9,11 @@ Get all locations that can be infiltrated. Signature: ```typescript -getPossibleLocations(): PossibleInfiltrationLocation[]; +getPossibleLocations(): ILocation[]; ``` Returns: -[PossibleInfiltrationLocation](./bitburner.possibleinfiltrationlocation.md)\[\] +[ILocation](./bitburner.ilocation.md)\[\] all locations that can be infiltrated. diff --git a/markdown/bitburner.infiltrationlocation.md b/markdown/bitburner.infiltrationlocation.md index bf904135e..edb6f071f 100644 --- a/markdown/bitburner.infiltrationlocation.md +++ b/markdown/bitburner.infiltrationlocation.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface InfiltrationLocation +interface InfiltrationLocation ``` ## Properties diff --git a/markdown/bitburner.infiltrationreward.md b/markdown/bitburner.infiltrationreward.md index 3cb0ad38b..a8d09efc1 100644 --- a/markdown/bitburner.infiltrationreward.md +++ b/markdown/bitburner.infiltrationreward.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface InfiltrationReward +interface InfiltrationReward ``` ## Properties diff --git a/markdown/bitburner.locationname.md b/markdown/bitburner.locationname.md new file mode 100644 index 000000000..63a521d68 --- /dev/null +++ b/markdown/bitburner.locationname.md @@ -0,0 +1,75 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [LocationName](./bitburner.locationname.md) + +## LocationName enum + +Names of all locations + +Signature: + +```typescript +declare enum LocationName +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| AevumAeroCorp | "AeroCorp" | | +| AevumBachmanAndAssociates | "Bachman & Associates" | | +| AevumCasino | "Iker Molina Casino" | | +| AevumClarkeIncorporated | "Clarke Incorporated" | | +| AevumCrushFitnessGym | "Crush Fitness Gym" | | +| AevumECorp | "ECorp" | | +| AevumFulcrumTechnologies | "Fulcrum Technologies" | | +| AevumGalacticCybersystems | "Galactic Cybersystems" | | +| AevumNetLinkTechnologies | "NetLink Technologies" | | +| AevumPolice | "Aevum Police Headquarters" | | +| AevumRhoConstruction | "Rho Construction" | | +| AevumSnapFitnessGym | "Snap Fitness Gym" | | +| AevumSummitUniversity | "Summit University" | | +| AevumWatchdogSecurity | "Watchdog Security" | | +| ChongqingChurchOfTheMachineGod | "Church of the Machine God" | | +| ChongqingKuaiGongInternational | "KuaiGong International" | | +| ChongqingSolarisSpaceSystems | "Solaris Space Systems" | | +| Hospital | "Hospital" | | +| IshimaGlitch | "0x6C1" | | +| IshimaNovaMedical | "Nova Medical" | | +| IshimaOmegaSoftware | "Omega Software" | | +| IshimaStormTechnologies | "Storm Technologies" | | +| NewTokyoArcade | "Arcade" | | +| NewTokyoDefComm | "DefComm" | | +| NewTokyoGlobalPharmaceuticals | "Global Pharmaceuticals" | | +| NewTokyoNoodleBar | "Noodle Bar" | | +| NewTokyoVitaLife | "VitaLife" | | +| Sector12AlphaEnterprises | "Alpha Enterprises" | | +| Sector12BladeIndustries | "Blade Industries" | | +| Sector12CarmichaelSecurity | "Carmichael Security" | | +| Sector12CIA | "Central Intelligence Agency" | | +| Sector12CityHall | "Sector-12 City Hall" | | +| Sector12DeltaOne | "DeltaOne" | | +| Sector12FoodNStuff | "FoodNStuff" | | +| Sector12FourSigma | "Four Sigma" | | +| Sector12IcarusMicrosystems | "Icarus Microsystems" | | +| Sector12IronGym | "Iron Gym" | | +| Sector12JoesGuns | "Joe's Guns" | | +| Sector12MegaCorp | "MegaCorp" | | +| Sector12NSA | "National Security Agency" | | +| Sector12PowerhouseGym | "Powerhouse Gym" | | +| Sector12RothmanUniversity | "Rothman University" | | +| Sector12UniversalEnergy | "Universal Energy" | | +| Slums | "The Slums" | | +| TravelAgency | "Travel Agency" | | +| Void | "The Void" | | +| VolhavenCompuTek | "CompuTek" | | +| VolhavenHeliosLabs | "Helios Labs" | | +| VolhavenLexoCorp | "LexoCorp" | | +| VolhavenMilleniumFitnessGym | "Millenium Fitness Gym" | | +| VolhavenNWO | "NWO" | | +| VolhavenOmniaCybersystems | "Omnia Cybersystems" | | +| VolhavenOmniTekIncorporated | "OmniTek Incorporated" | | +| VolhavenSysCoreSecurities | "SysCore Securities" | | +| VolhavenZBInstituteOfTechnology | "ZB Institute of Technology" | | +| WorldStockExchange | "World Stock Exchange" | | + diff --git a/markdown/bitburner.md b/markdown/bitburner.md index 062079181..8ee86699b 100644 --- a/markdown/bitburner.md +++ b/markdown/bitburner.md @@ -8,8 +8,17 @@ | Enumeration | Description | | --- | --- | +| [CompanyPosName](./bitburner.companyposname.md) | | +| [CrimeType](./bitburner.crimetype.md) | | +| [EmployeePositions](./bitburner.employeepositions.md) | | +| [FactionWorkType](./bitburner.factionworktype.md) | | +| [GymType](./bitburner.gymtype.md) | | +| [IndustryType](./bitburner.industrytype.md) | | +| [LocationName](./bitburner.locationname.md) | Names of all locations | | [OrderTypes](./bitburner.ordertypes.md) | | | [PositionTypes](./bitburner.positiontypes.md) | | +| [ToastVariant](./bitburner.toastvariant.md) | | +| [UniversityClassType](./bitburner.universityclasstype.md) | | ## Interfaces @@ -22,15 +31,12 @@ | [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) | All multipliers affecting the difficulty of the current challenge. | | [Bladeburner](./bitburner.bladeburner.md) | Bladeburner API | | [BladeburnerCurAction](./bitburner.bladeburnercuraction.md) | Bladeburner current action. | -| [CharacterMult](./bitburner.charactermult.md) | | | [CodingAttemptOptions](./bitburner.codingattemptoptions.md) | Options to affect the behavior of [CodingContract](./bitburner.codingcontract.md) attempt. | | [CodingContract](./bitburner.codingcontract.md) | Coding Contract API | | [Corporation](./bitburner.corporation.md) | Corporation API | | [CorporationInfo](./bitburner.corporationinfo.md) | General info about a corporation | | [CrimeStats](./bitburner.crimestats.md) | Data representing the internal values of a crime. | | [Division](./bitburner.division.md) | Corporation division | -| [Employee](./bitburner.employee.md) | Employee in an office | -| [EmployeeJobs](./bitburner.employeejobs.md) | Object representing the number of employee in each job. | | [EquipmentStats](./bitburner.equipmentstats.md) | Object representing data representing a gang member equipment. | | [Export](./bitburner.export.md) | Export order for a material | | [Formulas](./bitburner.formulas.md) | Formulas API | @@ -62,14 +68,16 @@ | [InvestmentOffer](./bitburner.investmentoffer.md) | Corporation investment offer | | [IStyleSettings](./bitburner.istylesettings.md) | Interface Styles | | [Material](./bitburner.material.md) | Material in a warehouse | +| [MoneySource](./bitburner.moneysource.md) | | +| [MoneySources](./bitburner.moneysources.md) | | | [Multipliers](./bitburner.multipliers.md) | | | [NetscriptPort](./bitburner.netscriptport.md) | Object representing a port. A port is a serialized queue. | | [NodeStats](./bitburner.nodestats.md) | Object representing all the values related to a hacknet node. | | [NS](./bitburner.ns.md) | Collection of all functions passed to scripts | | [Office](./bitburner.office.md) | Office for a division in a city. | | [OfficeAPI](./bitburner.officeapi.md) | Corporation Office API | +| [Person](./bitburner.person.md) | | | [Player](./bitburner.player.md) | | -| [PossibleInfiltrationLocation](./bitburner.possibleinfiltrationlocation.md) | | | [ProcessInfo](./bitburner.processinfo.md) | A single process on a server. | | [Product](./bitburner.product.md) | Product in a warehouse | | [RecentScript](./bitburner.recentscript.md) | | @@ -79,10 +87,8 @@ | [Singularity](./bitburner.singularity.md) | Singularity API | | [Skills](./bitburner.skills.md) | | | [SkillsFormulas](./bitburner.skillsformulas.md) | Skills formulas | -| [Sleeve](./bitburner.sleeve.md) | Sleeve API | -| [SleeveInformation](./bitburner.sleeveinformation.md) | Object representing sleeve information. | -| [SleeveSkills](./bitburner.sleeveskills.md) | Object representing a sleeve stats. | -| [SleeveWorkGains](./bitburner.sleeveworkgains.md) | | +| [sleeve](./bitburner.sleeve.md) | Sleeve API | +| [Sleeve](./bitburner.sleeve.md) | | | [SourceFileLvl](./bitburner.sourcefilelvl.md) | | | [Stanek](./bitburner.stanek.md) | Stanek's Gift API. | | [StockOrder](./bitburner.stockorder.md) | Return value of [getOrders](./bitburner.tix.getorders.md)Keys are stock symbols, properties are arrays of [StockOrderObject](./bitburner.stockorderobject.md) | @@ -95,12 +101,6 @@ | [WorkFormulas](./bitburner.workformulas.md) | Work formulas | | [WorkStats](./bitburner.workstats.md) | | -## Variables - -| Variable | Description | -| --- | --- | -| [enums](./bitburner.enums.md) | | - ## Type Aliases | Type Alias | Description | @@ -110,7 +110,14 @@ | [NSEnums](./bitburner.nsenums.md) | | | [PortData](./bitburner.portdata.md) | | | [ScriptArg](./bitburner.scriptarg.md) | | +| [SleeveBladeburnerTask](./bitburner.sleevebladeburnertask.md) | | +| [SleeveClassTask](./bitburner.sleeveclasstask.md) | | +| [SleeveCompanyTask](./bitburner.sleevecompanytask.md) | | +| [SleeveCrimeTask](./bitburner.sleevecrimetask.md) | | +| [SleeveFactionTask](./bitburner.sleevefactiontask.md) | | +| [SleeveInfiltrateTask](./bitburner.sleeveinfiltratetask.md) | | +| [SleeveRecoveryTask](./bitburner.sleeverecoverytask.md) | | +| [SleeveSupportTask](./bitburner.sleevesupporttask.md) | | +| [SleeveSynchroTask](./bitburner.sleevesynchrotask.md) | | | [SleeveTask](./bitburner.sleevetask.md) | Object representing a sleeve current task. | -| [ToastVariant](./bitburner.toastvariant.md) | | -| [ValuesFrom](./bitburner.valuesfrom.md) | | diff --git a/markdown/bitburner.moneysource.augmentations.md b/markdown/bitburner.moneysource.augmentations.md new file mode 100644 index 000000000..93ef6ab91 --- /dev/null +++ b/markdown/bitburner.moneysource.augmentations.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [augmentations](./bitburner.moneysource.augmentations.md) + +## MoneySource.augmentations property + +Signature: + +```typescript +augmentations: number; +``` diff --git a/markdown/bitburner.moneysource.bladeburner.md b/markdown/bitburner.moneysource.bladeburner.md new file mode 100644 index 000000000..cbfe67ddd --- /dev/null +++ b/markdown/bitburner.moneysource.bladeburner.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [bladeburner](./bitburner.moneysource.bladeburner.md) + +## MoneySource.bladeburner property + +Signature: + +```typescript +bladeburner: number; +``` diff --git a/markdown/bitburner.moneysource.casino.md b/markdown/bitburner.moneysource.casino.md new file mode 100644 index 000000000..8b6349a6c --- /dev/null +++ b/markdown/bitburner.moneysource.casino.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [casino](./bitburner.moneysource.casino.md) + +## MoneySource.casino property + +Signature: + +```typescript +casino: number; +``` diff --git a/markdown/bitburner.moneysource.class.md b/markdown/bitburner.moneysource.class.md new file mode 100644 index 000000000..06de4e05e --- /dev/null +++ b/markdown/bitburner.moneysource.class.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [class](./bitburner.moneysource.class.md) + +## MoneySource.class property + +Signature: + +```typescript +class: number; +``` diff --git a/markdown/bitburner.moneysource.codingcontract.md b/markdown/bitburner.moneysource.codingcontract.md new file mode 100644 index 000000000..03a93781b --- /dev/null +++ b/markdown/bitburner.moneysource.codingcontract.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [codingcontract](./bitburner.moneysource.codingcontract.md) + +## MoneySource.codingcontract property + +Signature: + +```typescript +codingcontract: number; +``` diff --git a/markdown/bitburner.moneysource.corporation.md b/markdown/bitburner.moneysource.corporation.md new file mode 100644 index 000000000..9bebb45f9 --- /dev/null +++ b/markdown/bitburner.moneysource.corporation.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [corporation](./bitburner.moneysource.corporation.md) + +## MoneySource.corporation property + +Signature: + +```typescript +corporation: number; +``` diff --git a/markdown/bitburner.moneysource.crime.md b/markdown/bitburner.moneysource.crime.md new file mode 100644 index 000000000..b2b25dc04 --- /dev/null +++ b/markdown/bitburner.moneysource.crime.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [crime](./bitburner.moneysource.crime.md) + +## MoneySource.crime property + +Signature: + +```typescript +crime: number; +``` diff --git a/markdown/bitburner.moneysource.gang.md b/markdown/bitburner.moneysource.gang.md new file mode 100644 index 000000000..f5fce3239 --- /dev/null +++ b/markdown/bitburner.moneysource.gang.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [gang](./bitburner.moneysource.gang.md) + +## MoneySource.gang property + +Signature: + +```typescript +gang: number; +``` diff --git a/markdown/bitburner.moneysource.hacking.md b/markdown/bitburner.moneysource.hacking.md new file mode 100644 index 000000000..267e0c18a --- /dev/null +++ b/markdown/bitburner.moneysource.hacking.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [hacking](./bitburner.moneysource.hacking.md) + +## MoneySource.hacking property + +Signature: + +```typescript +hacking: number; +``` diff --git a/markdown/bitburner.moneysource.hacknet.md b/markdown/bitburner.moneysource.hacknet.md new file mode 100644 index 000000000..e699cc947 --- /dev/null +++ b/markdown/bitburner.moneysource.hacknet.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [hacknet](./bitburner.moneysource.hacknet.md) + +## MoneySource.hacknet property + +Signature: + +```typescript +hacknet: number; +``` diff --git a/markdown/bitburner.moneysource.hacknet_expenses.md b/markdown/bitburner.moneysource.hacknet_expenses.md new file mode 100644 index 000000000..8d8c0accb --- /dev/null +++ b/markdown/bitburner.moneysource.hacknet_expenses.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [hacknet\_expenses](./bitburner.moneysource.hacknet_expenses.md) + +## MoneySource.hacknet\_expenses property + +Signature: + +```typescript +hacknet_expenses: number; +``` diff --git a/markdown/bitburner.moneysource.hospitalization.md b/markdown/bitburner.moneysource.hospitalization.md new file mode 100644 index 000000000..147f09615 --- /dev/null +++ b/markdown/bitburner.moneysource.hospitalization.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [hospitalization](./bitburner.moneysource.hospitalization.md) + +## MoneySource.hospitalization property + +Signature: + +```typescript +hospitalization: number; +``` diff --git a/markdown/bitburner.moneysource.infiltration.md b/markdown/bitburner.moneysource.infiltration.md new file mode 100644 index 000000000..313ca1559 --- /dev/null +++ b/markdown/bitburner.moneysource.infiltration.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [infiltration](./bitburner.moneysource.infiltration.md) + +## MoneySource.infiltration property + +Signature: + +```typescript +infiltration: number; +``` diff --git a/markdown/bitburner.moneysource.md b/markdown/bitburner.moneysource.md new file mode 100644 index 000000000..4229f97e1 --- /dev/null +++ b/markdown/bitburner.moneysource.md @@ -0,0 +1,37 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) + +## MoneySource interface + + +Signature: + +```typescript +interface MoneySource +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [augmentations](./bitburner.moneysource.augmentations.md) | number | | +| [bladeburner](./bitburner.moneysource.bladeburner.md) | number | | +| [casino](./bitburner.moneysource.casino.md) | number | | +| [class](./bitburner.moneysource.class.md) | number | | +| [codingcontract](./bitburner.moneysource.codingcontract.md) | number | | +| [corporation](./bitburner.moneysource.corporation.md) | number | | +| [crime](./bitburner.moneysource.crime.md) | number | | +| [gang](./bitburner.moneysource.gang.md) | number | | +| [hacking](./bitburner.moneysource.hacking.md) | number | | +| [hacknet\_expenses](./bitburner.moneysource.hacknet_expenses.md) | number | | +| [hacknet](./bitburner.moneysource.hacknet.md) | number | | +| [hospitalization](./bitburner.moneysource.hospitalization.md) | number | | +| [infiltration](./bitburner.moneysource.infiltration.md) | number | | +| [other](./bitburner.moneysource.other.md) | number | | +| [servers](./bitburner.moneysource.servers.md) | number | | +| [sleeves](./bitburner.moneysource.sleeves.md) | number | | +| [stock](./bitburner.moneysource.stock.md) | number | | +| [total](./bitburner.moneysource.total.md) | number | | +| [work](./bitburner.moneysource.work.md) | number | | + diff --git a/markdown/bitburner.moneysource.other.md b/markdown/bitburner.moneysource.other.md new file mode 100644 index 000000000..8325161b3 --- /dev/null +++ b/markdown/bitburner.moneysource.other.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [other](./bitburner.moneysource.other.md) + +## MoneySource.other property + +Signature: + +```typescript +other: number; +``` diff --git a/markdown/bitburner.moneysource.servers.md b/markdown/bitburner.moneysource.servers.md new file mode 100644 index 000000000..2ed8fd6e1 --- /dev/null +++ b/markdown/bitburner.moneysource.servers.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [servers](./bitburner.moneysource.servers.md) + +## MoneySource.servers property + +Signature: + +```typescript +servers: number; +``` diff --git a/markdown/bitburner.moneysource.sleeves.md b/markdown/bitburner.moneysource.sleeves.md new file mode 100644 index 000000000..edfa122b6 --- /dev/null +++ b/markdown/bitburner.moneysource.sleeves.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [sleeves](./bitburner.moneysource.sleeves.md) + +## MoneySource.sleeves property + +Signature: + +```typescript +sleeves: number; +``` diff --git a/markdown/bitburner.moneysource.stock.md b/markdown/bitburner.moneysource.stock.md new file mode 100644 index 000000000..0945cffd7 --- /dev/null +++ b/markdown/bitburner.moneysource.stock.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [stock](./bitburner.moneysource.stock.md) + +## MoneySource.stock property + +Signature: + +```typescript +stock: number; +``` diff --git a/markdown/bitburner.moneysource.total.md b/markdown/bitburner.moneysource.total.md new file mode 100644 index 000000000..3ecaf45f5 --- /dev/null +++ b/markdown/bitburner.moneysource.total.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [total](./bitburner.moneysource.total.md) + +## MoneySource.total property + +Signature: + +```typescript +total: number; +``` diff --git a/markdown/bitburner.moneysource.work.md b/markdown/bitburner.moneysource.work.md new file mode 100644 index 000000000..651a296a9 --- /dev/null +++ b/markdown/bitburner.moneysource.work.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySource](./bitburner.moneysource.md) > [work](./bitburner.moneysource.work.md) + +## MoneySource.work property + +Signature: + +```typescript +work: number; +``` diff --git a/markdown/bitburner.moneysources.md b/markdown/bitburner.moneysources.md new file mode 100644 index 000000000..6a4feb072 --- /dev/null +++ b/markdown/bitburner.moneysources.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySources](./bitburner.moneysources.md) + +## MoneySources interface + + +Signature: + +```typescript +interface MoneySources +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [sinceInstall](./bitburner.moneysources.sinceinstall.md) | [MoneySource](./bitburner.moneysource.md) | | +| [sinceStart](./bitburner.moneysources.sincestart.md) | [MoneySource](./bitburner.moneysource.md) | | + diff --git a/markdown/bitburner.moneysources.sinceinstall.md b/markdown/bitburner.moneysources.sinceinstall.md new file mode 100644 index 000000000..f49ec1d50 --- /dev/null +++ b/markdown/bitburner.moneysources.sinceinstall.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySources](./bitburner.moneysources.md) > [sinceInstall](./bitburner.moneysources.sinceinstall.md) + +## MoneySources.sinceInstall property + +Signature: + +```typescript +sinceInstall: MoneySource; +``` diff --git a/markdown/bitburner.moneysources.sincestart.md b/markdown/bitburner.moneysources.sincestart.md new file mode 100644 index 000000000..b3815d1ff --- /dev/null +++ b/markdown/bitburner.moneysources.sincestart.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [MoneySources](./bitburner.moneysources.md) > [sinceStart](./bitburner.moneysources.sincestart.md) + +## MoneySources.sinceStart property + +Signature: + +```typescript +sinceStart: MoneySource; +``` diff --git a/markdown/bitburner.multipliers.agility.md b/markdown/bitburner.multipliers.agility.md index 765b2b389..20585bc38 100644 --- a/markdown/bitburner.multipliers.agility.md +++ b/markdown/bitburner.multipliers.agility.md @@ -9,5 +9,5 @@ Multiplier to agility skill Signature: ```typescript -agility?: number; +agility: number; ``` diff --git a/markdown/bitburner.multipliers.agility_exp.md b/markdown/bitburner.multipliers.agility_exp.md index 356a09b92..8fa3bd538 100644 --- a/markdown/bitburner.multipliers.agility_exp.md +++ b/markdown/bitburner.multipliers.agility_exp.md @@ -9,5 +9,5 @@ Multiplier to agility experience gain rate Signature: ```typescript -agility_exp?: number; +agility_exp: number; ``` diff --git a/markdown/bitburner.multipliers.bladeburner_analysis.md b/markdown/bitburner.multipliers.bladeburner_analysis.md index 634add122..2d9139730 100644 --- a/markdown/bitburner.multipliers.bladeburner_analysis.md +++ b/markdown/bitburner.multipliers.bladeburner_analysis.md @@ -9,5 +9,5 @@ Multiplier to effectiveness in Bladeburner Field Analysis Signature: ```typescript -bladeburner_analysis?: number; +bladeburner_analysis: number; ``` diff --git a/markdown/bitburner.multipliers.bladeburner_max_stamina.md b/markdown/bitburner.multipliers.bladeburner_max_stamina.md index 1c1882cd4..a8cc6e894 100644 --- a/markdown/bitburner.multipliers.bladeburner_max_stamina.md +++ b/markdown/bitburner.multipliers.bladeburner_max_stamina.md @@ -9,5 +9,5 @@ Multiplier to Bladeburner max stamina Signature: ```typescript -bladeburner_max_stamina?: number; +bladeburner_max_stamina: number; ``` diff --git a/markdown/bitburner.multipliers.bladeburner_stamina_gain.md b/markdown/bitburner.multipliers.bladeburner_stamina_gain.md index 97f122b64..e788d5270 100644 --- a/markdown/bitburner.multipliers.bladeburner_stamina_gain.md +++ b/markdown/bitburner.multipliers.bladeburner_stamina_gain.md @@ -9,5 +9,5 @@ Multiplier to Bladeburner stamina gain rate Signature: ```typescript -bladeburner_stamina_gain?: number; +bladeburner_stamina_gain: number; ``` diff --git a/markdown/bitburner.multipliers.bladeburner_success_chance.md b/markdown/bitburner.multipliers.bladeburner_success_chance.md index e53d9a6cd..7fdadf337 100644 --- a/markdown/bitburner.multipliers.bladeburner_success_chance.md +++ b/markdown/bitburner.multipliers.bladeburner_success_chance.md @@ -9,5 +9,5 @@ Multiplier to success chance in Bladeburner contracts/operations Signature: ```typescript -bladeburner_success_chance?: number; +bladeburner_success_chance: number; ``` diff --git a/markdown/bitburner.multipliers.charisma.md b/markdown/bitburner.multipliers.charisma.md index 80b9b90a5..a0e97bb18 100644 --- a/markdown/bitburner.multipliers.charisma.md +++ b/markdown/bitburner.multipliers.charisma.md @@ -9,5 +9,5 @@ Multiplier to charisma skill Signature: ```typescript -charisma?: number; +charisma: number; ``` diff --git a/markdown/bitburner.multipliers.charisma_exp.md b/markdown/bitburner.multipliers.charisma_exp.md index 8e80b5d45..0df9127b0 100644 --- a/markdown/bitburner.multipliers.charisma_exp.md +++ b/markdown/bitburner.multipliers.charisma_exp.md @@ -9,5 +9,5 @@ Multiplier to charisma experience gain rate Signature: ```typescript -charisma_exp?: number; +charisma_exp: number; ``` diff --git a/markdown/bitburner.multipliers.company_rep.md b/markdown/bitburner.multipliers.company_rep.md index d49068477..437fd6899 100644 --- a/markdown/bitburner.multipliers.company_rep.md +++ b/markdown/bitburner.multipliers.company_rep.md @@ -9,5 +9,5 @@ Multiplier to amount of reputation gained when working Signature: ```typescript -company_rep?: number; +company_rep: number; ``` diff --git a/markdown/bitburner.multipliers.crime_money.md b/markdown/bitburner.multipliers.crime_money.md index 07d5c5145..2661c6a5b 100644 --- a/markdown/bitburner.multipliers.crime_money.md +++ b/markdown/bitburner.multipliers.crime_money.md @@ -9,5 +9,5 @@ Multiplier to amount of money gained from crimes Signature: ```typescript -crime_money?: number; +crime_money: number; ``` diff --git a/markdown/bitburner.multipliers.crime_success.md b/markdown/bitburner.multipliers.crime_success.md index f24feebc1..786833272 100644 --- a/markdown/bitburner.multipliers.crime_success.md +++ b/markdown/bitburner.multipliers.crime_success.md @@ -9,5 +9,5 @@ Multiplier to crime success rate Signature: ```typescript -crime_success?: number; +crime_success: number; ``` diff --git a/markdown/bitburner.multipliers.defense.md b/markdown/bitburner.multipliers.defense.md index 009d0ff84..ac3f167a7 100644 --- a/markdown/bitburner.multipliers.defense.md +++ b/markdown/bitburner.multipliers.defense.md @@ -9,5 +9,5 @@ Multiplier to defense skill Signature: ```typescript -defense?: number; +defense: number; ``` diff --git a/markdown/bitburner.multipliers.defense_exp.md b/markdown/bitburner.multipliers.defense_exp.md index b56689287..75f00f129 100644 --- a/markdown/bitburner.multipliers.defense_exp.md +++ b/markdown/bitburner.multipliers.defense_exp.md @@ -9,5 +9,5 @@ Multiplier to defense experience gain rate Signature: ```typescript -defense_exp?: number; +defense_exp: number; ``` diff --git a/markdown/bitburner.multipliers.dexterity.md b/markdown/bitburner.multipliers.dexterity.md index ea6b6eb1d..8b6b06871 100644 --- a/markdown/bitburner.multipliers.dexterity.md +++ b/markdown/bitburner.multipliers.dexterity.md @@ -9,5 +9,5 @@ Multiplier to dexterity skill Signature: ```typescript -dexterity?: number; +dexterity: number; ``` diff --git a/markdown/bitburner.multipliers.dexterity_exp.md b/markdown/bitburner.multipliers.dexterity_exp.md index 12a60aa4e..ac8257621 100644 --- a/markdown/bitburner.multipliers.dexterity_exp.md +++ b/markdown/bitburner.multipliers.dexterity_exp.md @@ -9,5 +9,5 @@ Multiplier to dexterity experience gain rate Signature: ```typescript -dexterity_exp?: number; +dexterity_exp: number; ``` diff --git a/markdown/bitburner.multipliers.faction_rep.md b/markdown/bitburner.multipliers.faction_rep.md index 0d7acb11e..fe87569a6 100644 --- a/markdown/bitburner.multipliers.faction_rep.md +++ b/markdown/bitburner.multipliers.faction_rep.md @@ -9,5 +9,5 @@ Multiplier to amount of reputation gained when working Signature: ```typescript -faction_rep?: number; +faction_rep: number; ``` diff --git a/markdown/bitburner.multipliers.hacking.md b/markdown/bitburner.multipliers.hacking.md index 8c7cc3e35..724b17954 100644 --- a/markdown/bitburner.multipliers.hacking.md +++ b/markdown/bitburner.multipliers.hacking.md @@ -9,5 +9,5 @@ Multiplier to hacking skill Signature: ```typescript -hacking?: number; +hacking: number; ``` diff --git a/markdown/bitburner.multipliers.hacking_chance.md b/markdown/bitburner.multipliers.hacking_chance.md index 4fcc91a2b..13c132daa 100644 --- a/markdown/bitburner.multipliers.hacking_chance.md +++ b/markdown/bitburner.multipliers.hacking_chance.md @@ -9,5 +9,5 @@ Multiplier to chance of successfully performing a hack Signature: ```typescript -hacking_chance?: number; +hacking_chance: number; ``` diff --git a/markdown/bitburner.multipliers.hacking_exp.md b/markdown/bitburner.multipliers.hacking_exp.md index 98a584335..8f2254ef7 100644 --- a/markdown/bitburner.multipliers.hacking_exp.md +++ b/markdown/bitburner.multipliers.hacking_exp.md @@ -9,5 +9,5 @@ Multiplier to hacking experience gain rate Signature: ```typescript -hacking_exp?: number; +hacking_exp: number; ``` diff --git a/markdown/bitburner.multipliers.hacking_grow.md b/markdown/bitburner.multipliers.hacking_grow.md index 0eaf8a0ee..ed99b9dc8 100644 --- a/markdown/bitburner.multipliers.hacking_grow.md +++ b/markdown/bitburner.multipliers.hacking_grow.md @@ -9,5 +9,5 @@ Multiplier to amount of money injected into servers using grow Signature: ```typescript -hacking_grow?: number; +hacking_grow: number; ``` diff --git a/markdown/bitburner.multipliers.hacking_money.md b/markdown/bitburner.multipliers.hacking_money.md index 7f232f867..3f2711589 100644 --- a/markdown/bitburner.multipliers.hacking_money.md +++ b/markdown/bitburner.multipliers.hacking_money.md @@ -9,5 +9,5 @@ Multiplier to amount of money the player gains from hacking Signature: ```typescript -hacking_money?: number; +hacking_money: number; ``` diff --git a/markdown/bitburner.multipliers.hacking_speed.md b/markdown/bitburner.multipliers.hacking_speed.md index 51de83858..9829bd592 100644 --- a/markdown/bitburner.multipliers.hacking_speed.md +++ b/markdown/bitburner.multipliers.hacking_speed.md @@ -9,5 +9,5 @@ Multiplier to hacking speed Signature: ```typescript -hacking_speed?: number; +hacking_speed: number; ``` diff --git a/markdown/bitburner.multipliers.hacknet_node_core_cost.md b/markdown/bitburner.multipliers.hacknet_node_core_cost.md index b4b74bcb4..80c146d22 100644 --- a/markdown/bitburner.multipliers.hacknet_node_core_cost.md +++ b/markdown/bitburner.multipliers.hacknet_node_core_cost.md @@ -9,5 +9,5 @@ Multiplier to cost of core for a Hacknet Node Signature: ```typescript -hacknet_node_core_cost?: number; +hacknet_node_core_cost: number; ``` diff --git a/markdown/bitburner.multipliers.hacknet_node_level_cost.md b/markdown/bitburner.multipliers.hacknet_node_level_cost.md index c13d39f63..31c531c6f 100644 --- a/markdown/bitburner.multipliers.hacknet_node_level_cost.md +++ b/markdown/bitburner.multipliers.hacknet_node_level_cost.md @@ -9,5 +9,5 @@ Multiplier to cost of leveling up a Hacknet Node Signature: ```typescript -hacknet_node_level_cost?: number; +hacknet_node_level_cost: number; ``` diff --git a/markdown/bitburner.multipliers.hacknet_node_money.md b/markdown/bitburner.multipliers.hacknet_node_money.md index cf2821d02..68a8f64a4 100644 --- a/markdown/bitburner.multipliers.hacknet_node_money.md +++ b/markdown/bitburner.multipliers.hacknet_node_money.md @@ -9,5 +9,5 @@ Multiplier to amount of money produced by Hacknet Nodes Signature: ```typescript -hacknet_node_money?: number; +hacknet_node_money: number; ``` diff --git a/markdown/bitburner.multipliers.hacknet_node_purchase_cost.md b/markdown/bitburner.multipliers.hacknet_node_purchase_cost.md index f0be66630..4a2f82561 100644 --- a/markdown/bitburner.multipliers.hacknet_node_purchase_cost.md +++ b/markdown/bitburner.multipliers.hacknet_node_purchase_cost.md @@ -9,5 +9,5 @@ Multiplier to cost of purchasing a Hacknet Node Signature: ```typescript -hacknet_node_purchase_cost?: number; +hacknet_node_purchase_cost: number; ``` diff --git a/markdown/bitburner.multipliers.hacknet_node_ram_cost.md b/markdown/bitburner.multipliers.hacknet_node_ram_cost.md index a2927fc51..214f09893 100644 --- a/markdown/bitburner.multipliers.hacknet_node_ram_cost.md +++ b/markdown/bitburner.multipliers.hacknet_node_ram_cost.md @@ -9,5 +9,5 @@ Multiplier to cost of ram for a Hacknet Node Signature: ```typescript -hacknet_node_ram_cost?: number; +hacknet_node_ram_cost: number; ``` diff --git a/markdown/bitburner.multipliers.md b/markdown/bitburner.multipliers.md index 073de8c05..5e713fe7b 100644 --- a/markdown/bitburner.multipliers.md +++ b/markdown/bitburner.multipliers.md @@ -8,41 +8,41 @@ Signature: ```typescript -export interface Multipliers +interface Multipliers ``` ## Properties | Property | Type | Description | | --- | --- | --- | -| [agility\_exp?](./bitburner.multipliers.agility_exp.md) | number | (Optional) Multiplier to agility experience gain rate | -| [agility?](./bitburner.multipliers.agility.md) | number | (Optional) Multiplier to agility skill | -| [bladeburner\_analysis?](./bitburner.multipliers.bladeburner_analysis.md) | number | (Optional) Multiplier to effectiveness in Bladeburner Field Analysis | -| [bladeburner\_max\_stamina?](./bitburner.multipliers.bladeburner_max_stamina.md) | number | (Optional) Multiplier to Bladeburner max stamina | -| [bladeburner\_stamina\_gain?](./bitburner.multipliers.bladeburner_stamina_gain.md) | number | (Optional) Multiplier to Bladeburner stamina gain rate | -| [bladeburner\_success\_chance?](./bitburner.multipliers.bladeburner_success_chance.md) | number | (Optional) Multiplier to success chance in Bladeburner contracts/operations | -| [charisma\_exp?](./bitburner.multipliers.charisma_exp.md) | number | (Optional) Multiplier to charisma experience gain rate | -| [charisma?](./bitburner.multipliers.charisma.md) | number | (Optional) Multiplier to charisma skill | -| [company\_rep?](./bitburner.multipliers.company_rep.md) | number | (Optional) Multiplier to amount of reputation gained when working | -| [crime\_money?](./bitburner.multipliers.crime_money.md) | number | (Optional) Multiplier to amount of money gained from crimes | -| [crime\_success?](./bitburner.multipliers.crime_success.md) | number | (Optional) Multiplier to crime success rate | -| [defense\_exp?](./bitburner.multipliers.defense_exp.md) | number | (Optional) Multiplier to defense experience gain rate | -| [defense?](./bitburner.multipliers.defense.md) | number | (Optional) Multiplier to defense skill | -| [dexterity\_exp?](./bitburner.multipliers.dexterity_exp.md) | number | (Optional) Multiplier to dexterity experience gain rate | -| [dexterity?](./bitburner.multipliers.dexterity.md) | number | (Optional) Multiplier to dexterity skill | -| [faction\_rep?](./bitburner.multipliers.faction_rep.md) | number | (Optional) Multiplier to amount of reputation gained when working | -| [hacking\_chance?](./bitburner.multipliers.hacking_chance.md) | number | (Optional) Multiplier to chance of successfully performing a hack | -| [hacking\_exp?](./bitburner.multipliers.hacking_exp.md) | number | (Optional) Multiplier to hacking experience gain rate | -| [hacking\_grow?](./bitburner.multipliers.hacking_grow.md) | number | (Optional) Multiplier to amount of money injected into servers using grow | -| [hacking\_money?](./bitburner.multipliers.hacking_money.md) | number | (Optional) Multiplier to amount of money the player gains from hacking | -| [hacking\_speed?](./bitburner.multipliers.hacking_speed.md) | number | (Optional) Multiplier to hacking speed | -| [hacking?](./bitburner.multipliers.hacking.md) | number | (Optional) Multiplier to hacking skill | -| [hacknet\_node\_core\_cost?](./bitburner.multipliers.hacknet_node_core_cost.md) | number | (Optional) Multiplier to cost of core for a Hacknet Node | -| [hacknet\_node\_level\_cost?](./bitburner.multipliers.hacknet_node_level_cost.md) | number | (Optional) Multiplier to cost of leveling up a Hacknet Node | -| [hacknet\_node\_money?](./bitburner.multipliers.hacknet_node_money.md) | number | (Optional) Multiplier to amount of money produced by Hacknet Nodes | -| [hacknet\_node\_purchase\_cost?](./bitburner.multipliers.hacknet_node_purchase_cost.md) | number | (Optional) Multiplier to cost of purchasing a Hacknet Node | -| [hacknet\_node\_ram\_cost?](./bitburner.multipliers.hacknet_node_ram_cost.md) | number | (Optional) Multiplier to cost of ram for a Hacknet Node | -| [strength\_exp?](./bitburner.multipliers.strength_exp.md) | number | (Optional) Multiplier to strength experience gain rate | -| [strength?](./bitburner.multipliers.strength.md) | number | (Optional) Multiplier to strength skill | -| [work\_money?](./bitburner.multipliers.work_money.md) | number | (Optional) Multiplier to amount of money gained from working | +| [agility\_exp](./bitburner.multipliers.agility_exp.md) | number | Multiplier to agility experience gain rate | +| [agility](./bitburner.multipliers.agility.md) | number | Multiplier to agility skill | +| [bladeburner\_analysis](./bitburner.multipliers.bladeburner_analysis.md) | number | Multiplier to effectiveness in Bladeburner Field Analysis | +| [bladeburner\_max\_stamina](./bitburner.multipliers.bladeburner_max_stamina.md) | number | Multiplier to Bladeburner max stamina | +| [bladeburner\_stamina\_gain](./bitburner.multipliers.bladeburner_stamina_gain.md) | number | Multiplier to Bladeburner stamina gain rate | +| [bladeburner\_success\_chance](./bitburner.multipliers.bladeburner_success_chance.md) | number | Multiplier to success chance in Bladeburner contracts/operations | +| [charisma\_exp](./bitburner.multipliers.charisma_exp.md) | number | Multiplier to charisma experience gain rate | +| [charisma](./bitburner.multipliers.charisma.md) | number | Multiplier to charisma skill | +| [company\_rep](./bitburner.multipliers.company_rep.md) | number | Multiplier to amount of reputation gained when working | +| [crime\_money](./bitburner.multipliers.crime_money.md) | number | Multiplier to amount of money gained from crimes | +| [crime\_success](./bitburner.multipliers.crime_success.md) | number | Multiplier to crime success rate | +| [defense\_exp](./bitburner.multipliers.defense_exp.md) | number | Multiplier to defense experience gain rate | +| [defense](./bitburner.multipliers.defense.md) | number | Multiplier to defense skill | +| [dexterity\_exp](./bitburner.multipliers.dexterity_exp.md) | number | Multiplier to dexterity experience gain rate | +| [dexterity](./bitburner.multipliers.dexterity.md) | number | Multiplier to dexterity skill | +| [faction\_rep](./bitburner.multipliers.faction_rep.md) | number | Multiplier to amount of reputation gained when working | +| [hacking\_chance](./bitburner.multipliers.hacking_chance.md) | number | Multiplier to chance of successfully performing a hack | +| [hacking\_exp](./bitburner.multipliers.hacking_exp.md) | number | Multiplier to hacking experience gain rate | +| [hacking\_grow](./bitburner.multipliers.hacking_grow.md) | number | Multiplier to amount of money injected into servers using grow | +| [hacking\_money](./bitburner.multipliers.hacking_money.md) | number | Multiplier to amount of money the player gains from hacking | +| [hacking\_speed](./bitburner.multipliers.hacking_speed.md) | number | Multiplier to hacking speed | +| [hacking](./bitburner.multipliers.hacking.md) | number | Multiplier to hacking skill | +| [hacknet\_node\_core\_cost](./bitburner.multipliers.hacknet_node_core_cost.md) | number | Multiplier to cost of core for a Hacknet Node | +| [hacknet\_node\_level\_cost](./bitburner.multipliers.hacknet_node_level_cost.md) | number | Multiplier to cost of leveling up a Hacknet Node | +| [hacknet\_node\_money](./bitburner.multipliers.hacknet_node_money.md) | number | Multiplier to amount of money produced by Hacknet Nodes | +| [hacknet\_node\_purchase\_cost](./bitburner.multipliers.hacknet_node_purchase_cost.md) | number | Multiplier to cost of purchasing a Hacknet Node | +| [hacknet\_node\_ram\_cost](./bitburner.multipliers.hacknet_node_ram_cost.md) | number | Multiplier to cost of ram for a Hacknet Node | +| [strength\_exp](./bitburner.multipliers.strength_exp.md) | number | Multiplier to strength experience gain rate | +| [strength](./bitburner.multipliers.strength.md) | number | Multiplier to strength skill | +| [work\_money](./bitburner.multipliers.work_money.md) | number | Multiplier to amount of money gained from working | diff --git a/markdown/bitburner.multipliers.strength.md b/markdown/bitburner.multipliers.strength.md index 408b69020..8ada3414d 100644 --- a/markdown/bitburner.multipliers.strength.md +++ b/markdown/bitburner.multipliers.strength.md @@ -9,5 +9,5 @@ Multiplier to strength skill Signature: ```typescript -strength?: number; +strength: number; ``` diff --git a/markdown/bitburner.multipliers.strength_exp.md b/markdown/bitburner.multipliers.strength_exp.md index 351dcc112..a4d1d8645 100644 --- a/markdown/bitburner.multipliers.strength_exp.md +++ b/markdown/bitburner.multipliers.strength_exp.md @@ -9,5 +9,5 @@ Multiplier to strength experience gain rate Signature: ```typescript -strength_exp?: number; +strength_exp: number; ``` diff --git a/markdown/bitburner.multipliers.work_money.md b/markdown/bitburner.multipliers.work_money.md index ffad7e676..c6e4e2a8a 100644 --- a/markdown/bitburner.multipliers.work_money.md +++ b/markdown/bitburner.multipliers.work_money.md @@ -9,5 +9,5 @@ Multiplier to amount of money gained from working Signature: ```typescript -work_money?: number; +work_money: number; ``` diff --git a/markdown/bitburner.netscriptport.md b/markdown/bitburner.netscriptport.md index e18dc5bf0..af210fcea 100644 --- a/markdown/bitburner.netscriptport.md +++ b/markdown/bitburner.netscriptport.md @@ -9,7 +9,7 @@ Object representing a port. A port is a serialized queue. Signature: ```typescript -export interface NetscriptPort +interface NetscriptPort ``` ## Methods @@ -19,6 +19,7 @@ export interface NetscriptPort | [clear()](./bitburner.netscriptport.clear.md) | Empties all data from the port. | | [empty()](./bitburner.netscriptport.empty.md) | Check if the port is empty. | | [full()](./bitburner.netscriptport.full.md) | Check if the port is full. | +| [nextWrite()](./bitburner.netscriptport.nextwrite.md) | Sleeps until the port is written to. | | [peek()](./bitburner.netscriptport.peek.md) | Retrieve the first element from the port without removing it. | | [read()](./bitburner.netscriptport.read.md) | Shift an element out of the port. | | [tryWrite(value)](./bitburner.netscriptport.trywrite.md) | Attempt to write data to the port. | diff --git a/markdown/bitburner.netscriptport.nextwrite.md b/markdown/bitburner.netscriptport.nextwrite.md new file mode 100644 index 000000000..7edee092b --- /dev/null +++ b/markdown/bitburner.netscriptport.nextwrite.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [NetscriptPort](./bitburner.netscriptport.md) > [nextWrite](./bitburner.netscriptport.nextwrite.md) + +## NetscriptPort.nextWrite() method + +Sleeps until the port is written to. + +Signature: + +```typescript +nextWrite(): Promise; +``` +Returns: + +Promise<void> + +## Remarks + +RAM cost: 0 GB + diff --git a/markdown/bitburner.netscriptport.peek.md b/markdown/bitburner.netscriptport.peek.md index 0eff71996..4a3363045 100644 --- a/markdown/bitburner.netscriptport.peek.md +++ b/markdown/bitburner.netscriptport.peek.md @@ -9,11 +9,11 @@ Retrieve the first element from the port without removing it. Signature: ```typescript -peek(): string | number; +peek(): PortData; ``` Returns: -string \| number +[PortData](./bitburner.portdata.md) the data read diff --git a/markdown/bitburner.netscriptport.read.md b/markdown/bitburner.netscriptport.read.md index ecb741f7d..6f22960cb 100644 --- a/markdown/bitburner.netscriptport.read.md +++ b/markdown/bitburner.netscriptport.read.md @@ -9,11 +9,11 @@ Shift an element out of the port. Signature: ```typescript -read(): string | number; +read(): PortData; ``` Returns: -string \| number +[PortData](./bitburner.portdata.md) the data read. diff --git a/markdown/bitburner.netscriptport.write.md b/markdown/bitburner.netscriptport.write.md index bce036633..f4435e944 100644 --- a/markdown/bitburner.netscriptport.write.md +++ b/markdown/bitburner.netscriptport.write.md @@ -9,7 +9,7 @@ Write data to a port. Signature: ```typescript -write(value: string | number): null | string | number; +write(value: string | number): PortData | null; ``` ## Parameters @@ -20,7 +20,7 @@ write(value: string | number): null | string | number; Returns: -null \| string \| number +[PortData](./bitburner.portdata.md) \| null The data popped off the queue if it was full. diff --git a/markdown/bitburner.nodestats.md b/markdown/bitburner.nodestats.md index 538a3fa0e..b0ade5673 100644 --- a/markdown/bitburner.nodestats.md +++ b/markdown/bitburner.nodestats.md @@ -9,7 +9,7 @@ Object representing all the values related to a hacknet node. Signature: ```typescript -export interface NodeStats +interface NodeStats ``` ## Properties diff --git a/markdown/bitburner.ns.closetail.md b/markdown/bitburner.ns.closetail.md index 261f0ece4..5db4eb00c 100644 --- a/markdown/bitburner.ns.closetail.md +++ b/markdown/bitburner.ns.closetail.md @@ -26,7 +26,7 @@ void RAM cost: 0 GB -Closes a script’s logs. This is functionally the same pressing the "Close" button on the tail window. +Closes a script’s logs. This is functionally the same as pressing the "Close" button on the tail window. If the function is called with no arguments, it will close the current script’s logs. diff --git a/markdown/bitburner.ns.deleteserver.md b/markdown/bitburner.ns.deleteserver.md index 6e1255dcf..b4d202230 100644 --- a/markdown/bitburner.ns.deleteserver.md +++ b/markdown/bitburner.ns.deleteserver.md @@ -16,7 +16,7 @@ deleteServer(host: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of the server to delete. | +| host | string | Hostname of the server to delete. | Returns: diff --git a/markdown/bitburner.ns.disablelog.md b/markdown/bitburner.ns.disablelog.md index c04b5e939..00ea2294d 100644 --- a/markdown/bitburner.ns.disablelog.md +++ b/markdown/bitburner.ns.disablelog.md @@ -28,5 +28,3 @@ RAM cost: 0 GB Logging can be disabled for all functions by passing `ALL` as the argument. -Note that this does not completely remove all logging functionality. This only stops a function from logging when the function is successful. If the function fails, it will still log the reason for failure. - diff --git a/markdown/bitburner.ns.flags.md b/markdown/bitburner.ns.flags.md index efdae5512..dc2935077 100644 --- a/markdown/bitburner.ns.flags.md +++ b/markdown/bitburner.ns.flags.md @@ -26,7 +26,7 @@ flags(schema: [string, string | number | boolean | string[]][]): { [key: string] RAM cost: 0 GB -Allows unix like flag parsing. +Allows Unix-like flag parsing. ## Example diff --git a/markdown/bitburner.ns.getbitnodemultipliers.md b/markdown/bitburner.ns.getbitnodemultipliers.md index ff929436e..f08055cb0 100644 --- a/markdown/bitburner.ns.getbitnodemultipliers.md +++ b/markdown/bitburner.ns.getbitnodemultipliers.md @@ -9,8 +9,16 @@ Get the current Bitnode multipliers. Signature: ```typescript -getBitNodeMultipliers(): BitNodeMultipliers; +getBitNodeMultipliers(n?: number, lvl?: number): BitNodeMultipliers; ``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| n | number | | +| lvl | number | | + Returns: [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) @@ -21,7 +29,7 @@ Object containing the current BitNode multipliers. RAM cost: 4 GB -Returns an object containing the current BitNode multipliers. This function requires you to be in Bitnode 5 or have Source-File 5 in order to run. The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%). The multipliers represent the difference between the current BitNode and the original BitNode (BitNode-1). +Returns an object containing the current (or supplied) BitNode multipliers. This function requires you to be in Bitnode 5 or have Source-File 5 in order to run. The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%). The multipliers represent the difference between the current BitNode and the original BitNode (BitNode-1). For example, if the CrimeMoney multiplier has a value of 0.1, then that means that committing crimes in the current BitNode will only give 10% of the money you would have received in BitNode-1. diff --git a/markdown/bitburner.ns.getgrowtime.md b/markdown/bitburner.ns.getgrowtime.md index 5f98d3132..0944be815 100644 --- a/markdown/bitburner.ns.getgrowtime.md +++ b/markdown/bitburner.ns.getgrowtime.md @@ -16,7 +16,7 @@ getGrowTime(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: diff --git a/markdown/bitburner.ns.gethacktime.md b/markdown/bitburner.ns.gethacktime.md index 4f293549a..4a7a6a2f1 100644 --- a/markdown/bitburner.ns.gethacktime.md +++ b/markdown/bitburner.ns.gethacktime.md @@ -16,17 +16,17 @@ getHackTime(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: number -Returns the amount of time in milliseconds it takes to execute the hack Netscript function. +Returns the amount of time in milliseconds it takes to execute the [hack](./bitburner.ns.hack.md) Netscript function. ## Remarks RAM cost: 0.05 GB -When `hack` completes an amount of money is stolen depending on the player's skills. Returns the amount of time in milliseconds it takes to execute the hack Netscript function on the target server. The required time is increased by the security level of the target server and decreased by the player's hacking level. +When `hack` completes an amount of money is stolen depending on the player's skills. Returns the amount of time in milliseconds it takes to execute the [hack](./bitburner.ns.hack.md) Netscript function on the target server. The required time is increased by the security level of the target server and decreased by the player's hacking level. diff --git a/markdown/bitburner.ns.gethostname.md b/markdown/bitburner.ns.gethostname.md index 5813ff78b..c61dab7b6 100644 --- a/markdown/bitburner.ns.gethostname.md +++ b/markdown/bitburner.ns.gethostname.md @@ -15,7 +15,7 @@ getHostname(): string; string -Hostname of the server that the script is on. +Hostname of the server that the script runs on. ## Remarks diff --git a/markdown/bitburner.ns.getmoneysources.md b/markdown/bitburner.ns.getmoneysources.md new file mode 100644 index 000000000..5269f7007 --- /dev/null +++ b/markdown/bitburner.ns.getmoneysources.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [getMoneySources](./bitburner.ns.getmoneysources.md) + +## NS.getMoneySources() method + +Get information about the sources of income for this run. + +Signature: + +```typescript +getMoneySources(): MoneySources; +``` +Returns: + +[MoneySources](./bitburner.moneysources.md) + +Money sources + +## Remarks + +RAM cost: 1.0 GB + +Returns an object with information on the income sources for this run + diff --git a/markdown/bitburner.ns.getscriptlogs.md b/markdown/bitburner.ns.getscriptlogs.md index 4d950fdb3..54c4058e7 100644 --- a/markdown/bitburner.ns.getscriptlogs.md +++ b/markdown/bitburner.ns.getscriptlogs.md @@ -24,7 +24,7 @@ getScriptLogs(fn?: string, host?: string, ...args: (string | number | boolean)[] string\[\] -Returns an string array, where each line is an element in the array. The most recently logged line is at the end of the array. +Returns a string array, where each line is an element in the array. The most recently logged line is at the end of the array. ## Remarks diff --git a/markdown/bitburner.ns.getscriptram.md b/markdown/bitburner.ns.getscriptram.md index 1e487458d..98761bb1a 100644 --- a/markdown/bitburner.ns.getscriptram.md +++ b/markdown/bitburner.ns.getscriptram.md @@ -17,7 +17,7 @@ getScriptRam(script: string, host?: string): number; | Parameter | Type | Description | | --- | --- | --- | | script | string | Filename of script. This is case-sensitive. | -| host | string | Host of target server the script is located on. This is optional, if it is not specified then the function will use the current server as the target server. | +| host | string | Hostname of target server the script is located on. This is optional. If it is not specified then the function will use the current server as the target server. | Returns: diff --git a/markdown/bitburner.ns.getservergrowth.md b/markdown/bitburner.ns.getservergrowth.md index b0e24966b..cd6d5a355 100644 --- a/markdown/bitburner.ns.getservergrowth.md +++ b/markdown/bitburner.ns.getservergrowth.md @@ -16,7 +16,7 @@ getServerGrowth(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: diff --git a/markdown/bitburner.ns.getservermaxmoney.md b/markdown/bitburner.ns.getservermaxmoney.md index 6302af323..2dc71c4d6 100644 --- a/markdown/bitburner.ns.getservermaxmoney.md +++ b/markdown/bitburner.ns.getservermaxmoney.md @@ -4,7 +4,7 @@ ## NS.getServerMaxMoney() method -Get maximum money available on a server. +Get the maximum money available on a server. Signature: @@ -16,7 +16,7 @@ getServerMaxMoney(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: diff --git a/markdown/bitburner.ns.getservermaxram.md b/markdown/bitburner.ns.getservermaxram.md index 6a0cca314..63a7872c2 100644 --- a/markdown/bitburner.ns.getservermaxram.md +++ b/markdown/bitburner.ns.getservermaxram.md @@ -4,7 +4,7 @@ ## NS.getServerMaxRam() method -Get the max RAM on a server. +Get the maximum amount of RAM on a server. Signature: @@ -22,7 +22,7 @@ getServerMaxRam(host: string): number; number -max ram (GB) +The maximum amount of RAM (GB) a server can have. ## Remarks diff --git a/markdown/bitburner.ns.getserverminsecuritylevel.md b/markdown/bitburner.ns.getserverminsecuritylevel.md index 5cdf56e77..cc905cbed 100644 --- a/markdown/bitburner.ns.getserverminsecuritylevel.md +++ b/markdown/bitburner.ns.getserverminsecuritylevel.md @@ -16,7 +16,7 @@ getServerMinSecurityLevel(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: diff --git a/markdown/bitburner.ns.getservermoneyavailable.md b/markdown/bitburner.ns.getservermoneyavailable.md index de3232ae3..70d824875 100644 --- a/markdown/bitburner.ns.getservermoneyavailable.md +++ b/markdown/bitburner.ns.getservermoneyavailable.md @@ -16,7 +16,7 @@ getServerMoneyAvailable(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server | +| host | string | Hostname of target server. | Returns: diff --git a/markdown/bitburner.ns.getservernumportsrequired.md b/markdown/bitburner.ns.getservernumportsrequired.md index 5237a9967..29def63c1 100644 --- a/markdown/bitburner.ns.getservernumportsrequired.md +++ b/markdown/bitburner.ns.getservernumportsrequired.md @@ -16,7 +16,7 @@ getServerNumPortsRequired(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: diff --git a/markdown/bitburner.ns.getserverrequiredhackinglevel.md b/markdown/bitburner.ns.getserverrequiredhackinglevel.md index 1816e21ba..e5d8f24fb 100644 --- a/markdown/bitburner.ns.getserverrequiredhackinglevel.md +++ b/markdown/bitburner.ns.getserverrequiredhackinglevel.md @@ -16,7 +16,7 @@ getServerRequiredHackingLevel(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: diff --git a/markdown/bitburner.ns.getserversecuritylevel.md b/markdown/bitburner.ns.getserversecuritylevel.md index afcca10e3..190028a91 100644 --- a/markdown/bitburner.ns.getserversecuritylevel.md +++ b/markdown/bitburner.ns.getserversecuritylevel.md @@ -16,7 +16,7 @@ getServerSecurityLevel(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: diff --git a/markdown/bitburner.ns.getserverusedram.md b/markdown/bitburner.ns.getserverusedram.md index a208b3a99..ab97cce0c 100644 --- a/markdown/bitburner.ns.getserverusedram.md +++ b/markdown/bitburner.ns.getserverusedram.md @@ -22,7 +22,7 @@ getServerUsedRam(host: string): number; number -used ram (GB) +The amount of used RAM (GB) on the specified server. ## Remarks diff --git a/markdown/bitburner.ns.gettotalscriptexpgain.md b/markdown/bitburner.ns.gettotalscriptexpgain.md index 492d3c80b..b89cf93d5 100644 --- a/markdown/bitburner.ns.gettotalscriptexpgain.md +++ b/markdown/bitburner.ns.gettotalscriptexpgain.md @@ -4,7 +4,7 @@ ## NS.getTotalScriptExpGain() method -Get the exp gain of all script. +Get the exp gain of all scripts. Signature: @@ -15,7 +15,7 @@ getTotalScriptExpGain(): number; number -total experience gain rate of all of your active scripts. +Total experience gain rate of all of your active scripts. ## Remarks diff --git a/markdown/bitburner.ns.gettotalscriptincome.md b/markdown/bitburner.ns.gettotalscriptincome.md index a5faa9f1b..211904263 100644 --- a/markdown/bitburner.ns.gettotalscriptincome.md +++ b/markdown/bitburner.ns.gettotalscriptincome.md @@ -4,7 +4,7 @@ ## NS.getTotalScriptIncome() method -Get the income of all script. +Get the income of all scripts. Signature: @@ -15,7 +15,7 @@ getTotalScriptIncome(): [number, number]; \[number, number\] -an array of two values. The first value is the total income (dollar / second) of all of your active scripts (scripts that are currently running on any server). The second value is the total income (dollar / second) that you’ve earned from scripts since you last installed Augmentations. +An array of two values. The first value is the total income (dollar / second) of all of your active scripts (scripts that are currently running on any server). The second value is the total income (dollar / second) that you’ve earned from scripts since you last installed Augmentations. ## Remarks diff --git a/markdown/bitburner.ns.getweakentime.md b/markdown/bitburner.ns.getweakentime.md index d48e02059..abf6567fc 100644 --- a/markdown/bitburner.ns.getweakentime.md +++ b/markdown/bitburner.ns.getweakentime.md @@ -16,17 +16,17 @@ getWeakenTime(host: string): number; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: number -Returns the amount of time in milliseconds it takes to execute the weaken Netscript function. +Returns the amount of time in milliseconds it takes to execute the [weaken](./bitburner.ns.weaken.md) Netscript function. ## Remarks RAM cost: 0.05 GB -Returns the amount of time in milliseconds it takes to execute the weaken Netscript function on the target server. The required time is increased by the security level of the target server and decreased by the player's hacking level. +Returns the amount of time in milliseconds it takes to execute the [weaken](./bitburner.ns.weaken.md) Netscript function on the target server. The required time is increased by the security level of the target server and decreased by the player's hacking level. diff --git a/markdown/bitburner.ns.grow.md b/markdown/bitburner.ns.grow.md index 7ad16f0cf..bc951964c 100644 --- a/markdown/bitburner.ns.grow.md +++ b/markdown/bitburner.ns.grow.md @@ -4,7 +4,7 @@ ## NS.grow() method -Spoof money in a servers bank account, increasing the amount available. +Spoof money in a server's bank account, increasing the amount available. Signature: @@ -29,9 +29,9 @@ The number by which the money on the server was multiplied for the growth. RAM cost: 0.15 GB -Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking level and the target server’s security level. When `grow` completes, the money available on a target server will be increased by a certain, fixed percentage. This percentage is determined by the target server’s growth rate (which varies between servers) and security level. Generally, higher-level servers have higher growth rates. The getServerGrowth() function can be used to obtain a server’s growth rate. +Use your hacking skills to increase the amount of money available on a server. The runtime for this command depends on your hacking level and the target server’s security level. When `grow` completes, the money available on a target server will be increased by a certain, fixed percentage. This percentage is determined by the target server’s growth rate (which varies between servers) and security level. Generally, higher-level servers have higher growth rates. The [getServerGrowth](./bitburner.ns.getservergrowth.md) function can be used to obtain a server’s growth rate. -Like hack, `grow` can be called on any server, regardless of where the script is running. The grow() command requires root access to the target server, but there is no required hacking level to run the command. It also raises the security level of the target server by 0.004. +Like [hack](./bitburner.ns.hack.md), `grow` can be called on any server, regardless of where the script is running. The grow() command requires root access to the target server, but there is no required hacking level to run the command. It also raises the security level of the target server by 0.004. ## Example 1 @@ -39,7 +39,7 @@ Like hack, `grow` can be called on any server, regardless of where the script is ```ts // NS1: var currentMoney = getServerMoneyAvailable("foodnstuff"); -currentMoney = currentMoney * (1 + grow("foodnstuff")); +currentMoney = currentMoney * grow("foodnstuff"); ``` ## Example 2 @@ -48,6 +48,6 @@ currentMoney = currentMoney * (1 + grow("foodnstuff")); ```ts // NS2: let currentMoney = ns.getServerMoneyAvailable("foodnstuff"); -currentMoney *= (1 + await ns.grow("foodnstuff")); +currentMoney *= await ns.grow("foodnstuff"); ``` diff --git a/markdown/bitburner.ns.growthanalyze.md b/markdown/bitburner.ns.growthanalyze.md index fa092a769..044fcdeb7 100644 --- a/markdown/bitburner.ns.growthanalyze.md +++ b/markdown/bitburner.ns.growthanalyze.md @@ -4,7 +4,7 @@ ## NS.growthAnalyze() method -Calculate the number of grow thread needed to grow a server by a certain multiplier. +Calculate the number of grow threads needed to grow a server by a certain multiplier. Signature: @@ -17,14 +17,14 @@ growthAnalyze(host: string, growthAmount: number, cores?: number): number; | Parameter | Type | Description | | --- | --- | --- | | host | string | Hostname of the target server. | -| growthAmount | number | Multiplicative factor by which the server is grown. Decimal form.. | +| growthAmount | number | Multiplicative factor by which the server is grown. Decimal form. | | cores | number | | Returns: number -The amount of grow calls needed to grow the specified server by the specified amount +The amount of grow calls needed to grow the specified server by the specified amount. ## Remarks diff --git a/markdown/bitburner.ns.growthanalyzesecurity.md b/markdown/bitburner.ns.growthanalyzesecurity.md index 89477d216..367986b37 100644 --- a/markdown/bitburner.ns.growthanalyzesecurity.md +++ b/markdown/bitburner.ns.growthanalyzesecurity.md @@ -4,7 +4,7 @@ ## NS.growthAnalyzeSecurity() method -Calculate the security increase for a number of thread. +Calculate the security increase for a number of threads. Signature: @@ -17,7 +17,7 @@ growthAnalyzeSecurity(threads: number, hostname?: string, cores?: number): numbe | Parameter | Type | Description | | --- | --- | --- | | threads | number | Amount of threads that will be used. | -| hostname | string | Optional. Hostname of the target server. The number of threads is limited to the number needed to hack the servers maximum amount of money. | +| hostname | string | Optional. Hostname of the target server. The number of threads is limited to the number needed to hack the server's maximum amount of money. | | cores | number | Optional. The number of cores of the server that would run grow. | Returns: diff --git a/markdown/bitburner.ns.hack.md b/markdown/bitburner.ns.hack.md index c38aab5c0..93de34b32 100644 --- a/markdown/bitburner.ns.hack.md +++ b/markdown/bitburner.ns.hack.md @@ -4,7 +4,7 @@ ## NS.hack() method -Steal a servers money. +Steal a server's money. Signature: diff --git a/markdown/bitburner.ns.hackanalyzesecurity.md b/markdown/bitburner.ns.hackanalyzesecurity.md index 299597e48..f25b4c663 100644 --- a/markdown/bitburner.ns.hackanalyzesecurity.md +++ b/markdown/bitburner.ns.hackanalyzesecurity.md @@ -4,7 +4,7 @@ ## NS.hackAnalyzeSecurity() method -Get the security increase for a number of thread. +Get the security increase for a number of threads. Signature: @@ -17,7 +17,7 @@ hackAnalyzeSecurity(threads: number, hostname?: string): number; | Parameter | Type | Description | | --- | --- | --- | | threads | number | Amount of threads that will be used. | -| hostname | string | Hostname of the target server. The number of threads is limited to the number needed to hack the servers maximum amount of money. | +| hostname | string | Hostname of the target server. The number of threads is limited to the number needed to hack the server's maximum amount of money. | Returns: diff --git a/markdown/bitburner.ns.hasrootaccess.md b/markdown/bitburner.ns.hasrootaccess.md index 012cb458d..ca25dd0f8 100644 --- a/markdown/bitburner.ns.hasrootaccess.md +++ b/markdown/bitburner.ns.hasrootaccess.md @@ -4,7 +4,7 @@ ## NS.hasRootAccess() method -Check if your have root access on a server. +Check if you have root access on a server. Signature: @@ -16,7 +16,7 @@ hasRootAccess(host: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of the target server | +| host | string | Hostname of the target server. | Returns: diff --git a/markdown/bitburner.ns.hastorrouter.md b/markdown/bitburner.ns.hastorrouter.md new file mode 100644 index 000000000..9bc5a4e2f --- /dev/null +++ b/markdown/bitburner.ns.hastorrouter.md @@ -0,0 +1,39 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [hasTorRouter](./bitburner.ns.hastorrouter.md) + +## NS.hasTorRouter() method + +Returns whether the player has access to the darkweb. + +Signature: + +```typescript +hasTorRouter(): boolean; +``` +Returns: + +boolean + +Whether player has access to the dark web. + +## Remarks + +RAM cost: 0.05GB + +## Example 1 + + +```js +// NS1: +if (hasTorRouter()) tprint("TOR router detected."); +``` + +## Example 2 + + +```js +// NS2: +if (ns.hasTorRouter()) tprint("TOR router detected."); +``` + diff --git a/markdown/bitburner.ns.islogenabled.md b/markdown/bitburner.ns.islogenabled.md index e0f0196ae..6ae575e63 100644 --- a/markdown/bitburner.ns.islogenabled.md +++ b/markdown/bitburner.ns.islogenabled.md @@ -22,7 +22,7 @@ isLogEnabled(fn: string): boolean; boolean -Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`) +Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`). ## Remarks diff --git a/markdown/bitburner.ns.isrunning.md b/markdown/bitburner.ns.isrunning.md index 2dfde841e..d26a5d83b 100644 --- a/markdown/bitburner.ns.isrunning.md +++ b/markdown/bitburner.ns.isrunning.md @@ -17,14 +17,14 @@ isRunning(script: FilenameOrPID, host?: string, ...args: (string | number | bool | Parameter | Type | Description | | --- | --- | --- | | script | [FilenameOrPID](./bitburner.filenameorpid.md) | Filename or PID of script to check. This is case-sensitive. | -| host | string | Host of target server. | +| host | string | Hostname of target server. | | args | (string \| number \| boolean)\[\] | Arguments to specify/identify which scripts to search for. | Returns: boolean -True if specified script is running on the target server, and false otherwise. +True if the specified script is running on the target server, and false otherwise. ## Remarks diff --git a/markdown/bitburner.ns.kill.md b/markdown/bitburner.ns.kill.md index 76b2d8109..0708953dd 100644 --- a/markdown/bitburner.ns.kill.md +++ b/markdown/bitburner.ns.kill.md @@ -16,7 +16,7 @@ kill(script: number): boolean; | Parameter | Type | Description | | --- | --- | --- | -| script | number | Filename or pid of the script to kill | +| script | number | Filename or PID of the script to kill. | Returns: @@ -28,7 +28,7 @@ True if the script is successfully killed, and false otherwise. RAM cost: 0.5 GB -Kills the script on the target server specified by the script’s name and arguments. Remember that scripts are uniquely identified by both their name and arguments. For example, if `foo.script` is run with the argument 1, then this is not the same as `foo.script` run with the argument 2, even though they have the same code. +Kills the script on the target server specified by the script’s name and arguments. Remember that scripts are uniquely identified by both their names and arguments. For example, if `foo.script` is run with the argument 1, then this is not the same as `foo.script` run with the argument 2, even though they have the same name. ## Example 1 diff --git a/markdown/bitburner.ns.kill_1.md b/markdown/bitburner.ns.kill_1.md index aa7814f2a..c50d38ec5 100644 --- a/markdown/bitburner.ns.kill_1.md +++ b/markdown/bitburner.ns.kill_1.md @@ -16,7 +16,7 @@ kill(script: string, host: string, ...args: (string | number | boolean)[]): bool | Parameter | Type | Description | | --- | --- | --- | -| script | string | Filename or pid of the script to kill | +| script | string | Filename or PID of the script to kill. | | host | string | Hostname of the server on which to kill the script. | | args | (string \| number \| boolean)\[\] | Arguments to identify which script to kill. | @@ -30,7 +30,7 @@ True if the script is successfully killed, and false otherwise. RAM cost: 0.5 GB -Kills the script on the target server specified by the script’s name and arguments. Remember that scripts are uniquely identified by both their name and arguments. For example, if `foo.script` is run with the argument 1, then this is not the same as `foo.script` run with the argument 2, even though they have the same code. +Kills the script on the target server specified by the script’s name and arguments. Remember that scripts are uniquely identified by both their names and arguments. For example, if `foo.script` is run with the argument 1, then this is not the same as `foo.script` run with the argument 2, even though they have the same name. ## Example 1 diff --git a/markdown/bitburner.ns.ls.md b/markdown/bitburner.ns.ls.md index a51eac7d4..64ce4b423 100644 --- a/markdown/bitburner.ns.ls.md +++ b/markdown/bitburner.ns.ls.md @@ -16,7 +16,7 @@ ls(host: string, grep?: string): string[]; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of the target server. | +| host | string | Hostname of the target server. | | grep | string | A substring to search for in the filename. | Returns: diff --git a/markdown/bitburner.ns.md b/markdown/bitburner.ns.md index 7291ba0d1..7e65aa3f3 100644 --- a/markdown/bitburner.ns.md +++ b/markdown/bitburner.ns.md @@ -51,7 +51,7 @@ export async function main(ns) { | [hacknet](./bitburner.ns.hacknet.md) | [Hacknet](./bitburner.hacknet.md) | Namespace for hacknet functions. | | [infiltration](./bitburner.ns.infiltration.md) | [Infiltration](./bitburner.infiltration.md) | Namespace for infiltration functions. RAM cost: 0 GB | | [singularity](./bitburner.ns.singularity.md) | [Singularity](./bitburner.singularity.md) | Namespace for singularity functions. RAM cost: 0 GB | -| [sleeve](./bitburner.ns.sleeve.md) | [Sleeve](./bitburner.sleeve.md) | Namespace for sleeve functions. | +| [sleeve](./bitburner.ns.sleeve.md) | [sleeve](./bitburner.sleeve.md) | Namespace for sleeve functions. | | [stanek](./bitburner.ns.stanek.md) | [Stanek](./bitburner.stanek.md) | Namespace for stanek functions. RAM cost: 0 GB | | [stock](./bitburner.ns.stock.md) | [TIX](./bitburner.tix.md) | Namespace for stock functions. | | [ui](./bitburner.ns.ui.md) | [UserInterface](./bitburner.userinterface.md) | Namespace for user interface functions. RAM cost: 0 GB | @@ -76,7 +76,7 @@ export async function main(ns) { | [fileExists(filename, host)](./bitburner.ns.fileexists.md) | Check if a file exists. | | [flags(schema)](./bitburner.ns.flags.md) | Parse command line flags. | | [ftpcrack(host)](./bitburner.ns.ftpcrack.md) | Runs FTPCrack.exe on a server. | -| [getBitNodeMultipliers()](./bitburner.ns.getbitnodemultipliers.md) | Get the current Bitnode multipliers. | +| [getBitNodeMultipliers(n, lvl)](./bitburner.ns.getbitnodemultipliers.md) | Get the current Bitnode multipliers. | | [getFavorToDonate()](./bitburner.ns.getfavortodonate.md) | Returns the amount of Faction favor required to be able to donate to a faction. | | [getGrowTime(host)](./bitburner.ns.getgrowtime.md) | Get the execution time of a grow() call. | | [getHackingLevel()](./bitburner.ns.gethackinglevel.md) | Returns the player’s current hacking level. | @@ -84,6 +84,7 @@ export async function main(ns) { | [getHacknetMultipliers()](./bitburner.ns.gethacknetmultipliers.md) | Get hacknet related multipliers. | | [getHackTime(host)](./bitburner.ns.gethacktime.md) | Get the execution time of a hack() call. | | [getHostname()](./bitburner.ns.gethostname.md) | Returns a string with the hostname of the server that the script is running on. | +| [getMoneySources()](./bitburner.ns.getmoneysources.md) | Get information about the sources of income for this run. | | [getPlayer()](./bitburner.ns.getplayer.md) | Get information about the player. | | [getPortHandle(port)](./bitburner.ns.getporthandle.md) | Get all data on a port. | | [getPurchasedServerCost(ram)](./bitburner.ns.getpurchasedservercost.md) | Get cost of purchasing a server. | @@ -101,8 +102,8 @@ export async function main(ns) { | [getServer(host)](./bitburner.ns.getserver.md) | Returns a server object for the given server. Defaults to the running script's server if host is not specified. | | [getServerBaseSecurityLevel(host)](./bitburner.ns.getserverbasesecuritylevel.md) | | | [getServerGrowth(host)](./bitburner.ns.getservergrowth.md) | Get a server growth parameter. | -| [getServerMaxMoney(host)](./bitburner.ns.getservermaxmoney.md) | Get maximum money available on a server. | -| [getServerMaxRam(host)](./bitburner.ns.getservermaxram.md) | Get the max RAM on a server. | +| [getServerMaxMoney(host)](./bitburner.ns.getservermaxmoney.md) | Get the maximum money available on a server. | +| [getServerMaxRam(host)](./bitburner.ns.getservermaxram.md) | Get the maximum amount of RAM on a server. | | [getServerMinSecurityLevel(host)](./bitburner.ns.getserverminsecuritylevel.md) | Returns the minimum security level of the target server. | | [getServerMoneyAvailable(host)](./bitburner.ns.getservermoneyavailable.md) | Get money available on a server. | | [getServerNumPortsRequired(host)](./bitburner.ns.getservernumportsrequired.md) | Returns the number of open ports required to successfully run NUKE.exe on the specified server. | @@ -112,18 +113,19 @@ export async function main(ns) { | [getServerUsedRam(host)](./bitburner.ns.getserverusedram.md) | Get the used RAM on a server. | | [getSharePower()](./bitburner.ns.getsharepower.md) | Calculate your share power. Based on all the active share calls. | | [getTimeSinceLastAug()](./bitburner.ns.gettimesincelastaug.md) | Returns the amount of time in milliseconds that have passed since you last installed Augmentations. | -| [getTotalScriptExpGain()](./bitburner.ns.gettotalscriptexpgain.md) | Get the exp gain of all script. | -| [getTotalScriptIncome()](./bitburner.ns.gettotalscriptincome.md) | Get the income of all script. | +| [getTotalScriptExpGain()](./bitburner.ns.gettotalscriptexpgain.md) | Get the exp gain of all scripts. | +| [getTotalScriptIncome()](./bitburner.ns.gettotalscriptincome.md) | Get the income of all scripts. | | [getWeakenTime(host)](./bitburner.ns.getweakentime.md) | Get the execution time of a weaken() call. | -| [grow(host, opts)](./bitburner.ns.grow.md) | Spoof money in a servers bank account, increasing the amount available. | -| [growthAnalyze(host, growthAmount, cores)](./bitburner.ns.growthanalyze.md) | Calculate the number of grow thread needed to grow a server by a certain multiplier. | -| [growthAnalyzeSecurity(threads, hostname, cores)](./bitburner.ns.growthanalyzesecurity.md) | Calculate the security increase for a number of thread. | -| [hack(host, opts)](./bitburner.ns.hack.md) | Steal a servers money. | +| [grow(host, opts)](./bitburner.ns.grow.md) | Spoof money in a server's bank account, increasing the amount available. | +| [growthAnalyze(host, growthAmount, cores)](./bitburner.ns.growthanalyze.md) | Calculate the number of grow threads needed to grow a server by a certain multiplier. | +| [growthAnalyzeSecurity(threads, hostname, cores)](./bitburner.ns.growthanalyzesecurity.md) | Calculate the security increase for a number of threads. | +| [hack(host, opts)](./bitburner.ns.hack.md) | Steal a server's money. | | [hackAnalyze(host)](./bitburner.ns.hackanalyze.md) | Get the part of money stolen with a single thread. | | [hackAnalyzeChance(host)](./bitburner.ns.hackanalyzechance.md) | Get the chance of successfully hacking a server. | -| [hackAnalyzeSecurity(threads, hostname)](./bitburner.ns.hackanalyzesecurity.md) | Get the security increase for a number of thread. | +| [hackAnalyzeSecurity(threads, hostname)](./bitburner.ns.hackanalyzesecurity.md) | Get the security increase for a number of threads. | | [hackAnalyzeThreads(host, hackAmount)](./bitburner.ns.hackanalyzethreads.md) | Predict the effect of hack. | -| [hasRootAccess(host)](./bitburner.ns.hasrootaccess.md) | Check if your have root access on a server. | +| [hasRootAccess(host)](./bitburner.ns.hasrootaccess.md) | Check if you have root access on a server. | +| [hasTorRouter()](./bitburner.ns.hastorrouter.md) | Returns whether the player has access to the darkweb. | | [httpworm(host)](./bitburner.ns.httpworm.md) | Runs HTTPWorm.exe on a server. | | [isLogEnabled(fn)](./bitburner.ns.islogenabled.md) | Checks the status of the logging for the given function. | | [isRunning(script, host, args)](./bitburner.ns.isrunning.md) | Check if a script is running. | @@ -131,12 +133,12 @@ export async function main(ns) { | [kill(script, host, args)](./bitburner.ns.kill_1.md) | Terminate another script. | | [killall(host, safetyguard)](./bitburner.ns.killall.md) | Terminate all scripts on a server. | | [ls(host, grep)](./bitburner.ns.ls.md) | List files on a server. | -| [moveTail(x, y, pid)](./bitburner.ns.movetail.md) | Move a tail window | +| [moveTail(x, y, pid)](./bitburner.ns.movetail.md) | Move a tail window. | | [mv(host, source, destination)](./bitburner.ns.mv.md) | Move a file on the target server. | -| [nFormat(n, format)](./bitburner.ns.nformat.md) | Format a number | +| [nFormat(n, format)](./bitburner.ns.nformat.md) | Format a number. | | [nuke(host)](./bitburner.ns.nuke.md) | Runs NUKE.exe on a server. | | [peek(port)](./bitburner.ns.peek.md) | Get a copy of the data from a port without popping it. | -| [print(args)](./bitburner.ns.print.md) | Prints one or move values or variables to the script’s logs. | +| [print(args)](./bitburner.ns.print.md) | Prints one or more values or variables to the script’s logs. | | [printf(format, args)](./bitburner.ns.printf.md) | Prints a formatted string to the script’s logs. | | [prompt(txt, options)](./bitburner.ns.prompt.md) | Prompt the player with an input modal. | | [ps(host)](./bitburner.ns.ps.md) | List running scripts on a server. | @@ -145,7 +147,7 @@ export async function main(ns) { | [readPort(port)](./bitburner.ns.readport.md) | Read data from a port. | | [relaysmtp(host)](./bitburner.ns.relaysmtp.md) | Runs relaySMTP.exe on a server. | | [renamePurchasedServer(hostname, newName)](./bitburner.ns.renamepurchasedserver.md) | Rename a purchased server. | -| [resizeTail(width, height, pid)](./bitburner.ns.resizetail.md) | Resize a tail window | +| [resizeTail(width, height, pid)](./bitburner.ns.resizetail.md) | Resize a tail window. | | [rm(name, host)](./bitburner.ns.rm.md) | Delete a file. | | [run(script, numThreads, args)](./bitburner.ns.run.md) | Start another script on the current server. | | [scan(host)](./bitburner.ns.scan.md) | Get the list of servers connected to a server. | @@ -155,18 +157,18 @@ export async function main(ns) { | [serverExists(host)](./bitburner.ns.serverexists.md) | Returns a boolean denoting whether or not the specified server exists. | | [share()](./bitburner.ns.share.md) | Share your computer with your factions. | | [sleep(millis)](./bitburner.ns.sleep.md) | Suspends the script for n milliseconds. | -| [spawn(script, numThreads, args)](./bitburner.ns.spawn.md) | Terminate current script and start another in 10s. | +| [spawn(script, numThreads, args)](./bitburner.ns.spawn.md) | Terminate current script and start another in 10 seconds. | | [sprintf(format, args)](./bitburner.ns.sprintf.md) | Format a string. | | [sqlinject(host)](./bitburner.ns.sqlinject.md) | Runs SQLInject.exe on a server. | | [tail(fn, host, args)](./bitburner.ns.tail.md) | Open the tail window of a script. | -| [tFormat(milliseconds, milliPrecision)](./bitburner.ns.tformat.md) | Format time to readable string | +| [tFormat(milliseconds, milliPrecision)](./bitburner.ns.tformat.md) | Format time to a readable string. | | [toast(msg, variant, duration)](./bitburner.ns.toast.md) | Queue a toast (bottom-right notification). | | [tprint(args)](./bitburner.ns.tprint.md) | Prints one or more values or variables to the Terminal. | | [tprintf(format, values)](./bitburner.ns.tprintf.md) | Prints a raw value or a variable to the Terminal. | | [tryWritePort(port, data)](./bitburner.ns.trywriteport.md) | Attempt to write to a port. | -| [upgradePurchasedServer(hostname, ram)](./bitburner.ns.upgradepurchasedserver.md) | Upgrade a purchased servers ram. | +| [upgradePurchasedServer(hostname, ram)](./bitburner.ns.upgradepurchasedserver.md) | Upgrade a purchased server's RAM. | | [vsprintf(format, args)](./bitburner.ns.vsprintf.md) | Format a string with an array of arguments. | -| [weaken(host, opts)](./bitburner.ns.weaken.md) | Reduce a server security level. | +| [weaken(host, opts)](./bitburner.ns.weaken.md) | Reduce a server's security level. | | [weakenAnalyze(threads, cores)](./bitburner.ns.weakenanalyze.md) | Predict the effect of weaken. | | [wget(url, target, host)](./bitburner.ns.wget.md) | Download a file from the internet. | | [write(filename, data, mode)](./bitburner.ns.write.md) | Write data to a file. | diff --git a/markdown/bitburner.ns.movetail.md b/markdown/bitburner.ns.movetail.md index b8ff6cde2..4c2b51e0c 100644 --- a/markdown/bitburner.ns.movetail.md +++ b/markdown/bitburner.ns.movetail.md @@ -4,7 +4,7 @@ ## NS.moveTail() method -Move a tail window +Move a tail window. Signature: @@ -28,5 +28,5 @@ void RAM cost: 0 GB -Moves a tail window. Coordinates are in screenspace pixels (top left is 0,0) +Moves a tail window. Coordinates are in screenspace pixels (top left is 0,0). diff --git a/markdown/bitburner.ns.mv.md b/markdown/bitburner.ns.mv.md index 8b3628f1a..fb2532ab3 100644 --- a/markdown/bitburner.ns.mv.md +++ b/markdown/bitburner.ns.mv.md @@ -16,7 +16,7 @@ mv(host: string, source: string, destination: string): void; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | | source | string | Filename of the source file. | | destination | string | Filename of the destination file. | @@ -28,7 +28,7 @@ void RAM cost: 0 GB -NS2 exclusive +NS2 exclusive. Move the source file to the specified destination on the target server. diff --git a/markdown/bitburner.ns.nformat.md b/markdown/bitburner.ns.nformat.md index 60b4211ce..3e69c91f4 100644 --- a/markdown/bitburner.ns.nformat.md +++ b/markdown/bitburner.ns.nformat.md @@ -4,7 +4,7 @@ ## NS.nFormat() method -Format a number +Format a number. Signature: @@ -31,5 +31,5 @@ RAM cost: 0 GB Converts a number into a string with the specified formatter. This uses the numeral.js library, so the formatters must be compatible with that. This is the same function that the game itself uses to display numbers. -see: http://numeraljs.com/ +For more information, see: http://numeraljs.com/ diff --git a/markdown/bitburner.ns.nuke.md b/markdown/bitburner.ns.nuke.md index dcf630bf0..2375d3466 100644 --- a/markdown/bitburner.ns.nuke.md +++ b/markdown/bitburner.ns.nuke.md @@ -26,7 +26,7 @@ void RAM cost: 0.05 GB -Running NUKE.exe on a target server gives you root access which means you can executes scripts on said server. NUKE.exe must exist on your home computer. +Running NUKE.exe on a target server gives you root access which means you can execute scripts on said server. NUKE.exe must exist on your home computer. ## Example 1 diff --git a/markdown/bitburner.ns.print.md b/markdown/bitburner.ns.print.md index 75a4b0bfc..d8ce5a74f 100644 --- a/markdown/bitburner.ns.print.md +++ b/markdown/bitburner.ns.print.md @@ -4,7 +4,7 @@ ## NS.print() method -Prints one or move values or variables to the script’s logs. +Prints one or more values or variables to the script’s logs. Signature: @@ -56,12 +56,9 @@ var cyan = "\u001b[36m"; var green = "\u001b[32m"; var red = "\u001b[31m"; var reset = "\u001b[0m"; -var msgError = red + "Ugh! What a mess." + reset; -var msgSuccess = green + "Well done!" + reset; -var msgMixed = cyan + "ERROR Should this be in red?" + reset; -print(msgError); -print(msgSuccess); -print(msgMixed); +print(red + "Ugh! What a mess." + reset); +print(green + "Well done!" + reset); +print(cyan + "ERROR Should this be in red?" + reset); tail(); ``` @@ -83,12 +80,9 @@ const cyan = "\u001b[36m"; const green = "\u001b[32m"; const red = "\u001b[31m"; const reset = "\u001b[0m"; -const msgError = "Ugh! What a mess."; -const msgSuccess = "Well done!"; -const msgMixed = "ERROR Should this be in red?"; -ns.print(`${red + msgError + reset}`); -ns.print(`${green + msgSuccess + reset}`); -ns.print(`${cyan + msgMixed + reset}`); +ns.print(`${red}Ugh! What a mess.${reset}`); +ns.print(`${green}Well done!${reset}`); +ns.print(`${cyan}ERROR Should this be in red?${reset}`); ns.tail(); ``` diff --git a/markdown/bitburner.ns.prompt.md b/markdown/bitburner.ns.prompt.md index 830ee7f6c..725855444 100644 --- a/markdown/bitburner.ns.prompt.md +++ b/markdown/bitburner.ns.prompt.md @@ -11,7 +11,7 @@ Prompt the player with an input modal. ```typescript prompt( txt: string, - options?: { type?: "boolean" | "text" | "select" | undefined; choices?: string[] }, + options?: { type?: "boolean" | "text" | "select"; choices?: string[] }, ): Promise; ``` @@ -20,17 +20,81 @@ prompt( | Parameter | Type | Description | | --- | --- | --- | | txt | string | Text to appear in the prompt dialog box. | -| options | { type?: "boolean" \| "text" \| "select" \| undefined; choices?: string\[\] } | Options to modify the prompt the player is shown. | +| options | { type?: "boolean" \| "text" \| "select"; choices?: string\[\] } | Options to modify the prompt the player is shown. | Returns: Promise<boolean \| string> -True if the player click “Yes”; false if the player clicks “No”; or the value entered by the player. +True if the player clicks “Yes”; false if the player clicks “No”; or the value entered by the player. ## Remarks RAM cost: 0 GB -Prompts the player with a dialog box. If `options.type` is undefined or "boolean", the player is shown "Yes" and "No" prompts, which return true and false respectively. Passing a type of "text" will give the player a text field and a value of "select" will show a drop-down field. Choosing type "select" will require an array or object to be passed via the `options.choices` property. The script’s execution is halted until the player selects one of the options. +Prompts the player with a dialog box. Here is an explanation of the various options. + +- `options.type` is not provided to the function. If `options.type` is left out and only a string is passed to the function, then the default behavior is to create a boolean dialog box. + +- `options.type` has value `undefined` or `"boolean"`. A boolean dialog box is created. The player is shown "Yes" and "No" prompts, which return true and false respectively. The script's execution is halted until the player presses either the "Yes" or "No" button. + +- `options.type` has value `"text"`. The player is given a text field to enter free-form text. The script's execution is halted until the player enters some text and/or presses the "Confirm" button. + +- `options.type` has value `"select"`. The player is shown a drop-down field. Choosing type `"select"` will require an array to be passed via the `options.choices` property. The array can be an array of strings, an array of numbers (not BigInt numbers), or a mixture of both numbers and strings. Any other types of array elements will result in an error or an undefined/unexpected behavior. The `options.choices` property will be ignored if `options.type` has a value other than `"select"`. The script's execution is halted until the player chooses one of the provided options and presses the "Confirm" button. + +## Example 1 + + +```ts +// NS1 +// A Yes/No question. The default is to create a boolean dialog box. +var queryA = "Do you enjoy Bitburner?"; +var resultA = prompt(queryA); +tprint(queryA + " " + resultA); + +// Another Yes/No question. Can also create a boolean dialog box by explicitly +// passing the option {"type": "boolean"}. +var queryB = "Is programming fun?"; +var resultB = prompt(queryB, { type: "boolean" }); +tprint(queryB + " " + resultB); + +// Free-form text box. +var resultC = prompt("Please enter your name.", { type: "text" }); +tprint("Hello, " + resultC + "."); + +// A drop-down list. +var resultD = prompt("Please select your favorite fruit.", { + type: "select", + choices: ["Apple", "Banana", "Orange", "Pear", "Strawberry"] +}); +tprint("Your favorite fruit is " + resultD.toLowerCase() + "."); +``` + +## Example 2 + + +```ts +// NS2 +// A Yes/No question. The default is to create a boolean dialog box. +const queryA = "Do you enjoy Bitburner?"; +const resultA = await ns.prompt(queryA); +ns.tprint(`${queryA} ${resultA}`); + +// Another Yes/No question. Can also create a boolean dialog box by explicitly +// passing the option {"type": "boolean"}. +const queryB = "Is programming fun?"; +const resultB = await ns.prompt(queryB, { type: "boolean" }); +ns.tprint(`${queryB} ${resultB}`); + +// Free-form text box. +const resultC = await ns.prompt("Please enter your name.", { type: "text" }); +ns.tprint(`Hello, ${resultC}.`); + +// A drop-down list. +const resultD = await ns.prompt("Please select your favorite fruit.", { + type: "select", + choices: ["Apple", "Banana", "Orange", "Pear", "Strawberry"] +}); +ns.tprint(`Your favorite fruit is ${resultD.toLowerCase()}.`); +``` diff --git a/markdown/bitburner.ns.purchaseserver.md b/markdown/bitburner.ns.purchaseserver.md index 9260c9b70..7f1f90087 100644 --- a/markdown/bitburner.ns.purchaseserver.md +++ b/markdown/bitburner.ns.purchaseserver.md @@ -16,7 +16,7 @@ purchaseServer(hostname: string, ram: number): string; | Parameter | Type | Description | | --- | --- | --- | -| hostname | string | Host of the purchased server. | +| hostname | string | Hostname of the purchased server. | | ram | number | Amount of RAM of the purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20). | Returns: @@ -29,9 +29,9 @@ The hostname of the newly purchased server. 2.25 GB -Purchased a server with the specified hostname and amount of RAM. +Purchase a server with the specified hostname and amount of RAM. -The hostname argument can be any data type, but it will be converted to a string and have whitespace removed. Anything that resolves to an empty string will cause the function to fail. If there is already a server with the specified hostname, then the function will automatically append a number at the end of the hostname argument value until it finds a unique hostname. For example, if the script calls `purchaseServer(“foo”, 4)` but a server named “foo” already exists, the it will automatically change the hostname to `foo-0`. If there is already a server with the hostname `foo-0`, then it will change the hostname to `foo-1`, and so on. +The hostname argument can be any data type, but it will be converted to a string and have whitespace removed. Anything that resolves to an empty string will cause the function to fail. If there is already a server with the specified hostname, then the function will automatically append a number at the end of the hostname argument value until it finds a unique hostname. For example, if the script calls `purchaseServer(“foo”, 4)` but a server named “foo” already exists, then it will automatically change the hostname to `foo-0`. If there is already a server with the hostname `foo-0`, then it will change the hostname to `foo-1`, and so on. Note that there is a maximum limit to the amount of servers you can purchase. diff --git a/markdown/bitburner.ns.readport.md b/markdown/bitburner.ns.readport.md index bd8ccf0d9..a6677acff 100644 --- a/markdown/bitburner.ns.readport.md +++ b/markdown/bitburner.ns.readport.md @@ -22,7 +22,7 @@ readPort(port: number): PortData; [PortData](./bitburner.portdata.md) -the data read. +The data read. ## Remarks diff --git a/markdown/bitburner.ns.renamepurchasedserver.md b/markdown/bitburner.ns.renamepurchasedserver.md index 3830a78a4..9a0b74f83 100644 --- a/markdown/bitburner.ns.renamepurchasedserver.md +++ b/markdown/bitburner.ns.renamepurchasedserver.md @@ -16,14 +16,14 @@ renamePurchasedServer(hostname: string, newName: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| hostname | string | current server hostname | -| newName | string | new server hostname | +| hostname | string | Current server hostname. | +| newName | string | New server hostname. | Returns: boolean -True if the upgrade succeeded. +True if the upgrade succeeded, and false otherwise. ## Remarks diff --git a/markdown/bitburner.ns.resizetail.md b/markdown/bitburner.ns.resizetail.md index 7598ee40a..0c606780d 100644 --- a/markdown/bitburner.ns.resizetail.md +++ b/markdown/bitburner.ns.resizetail.md @@ -4,7 +4,7 @@ ## NS.resizeTail() method -Resize a tail window +Resize a tail window. Signature: @@ -16,8 +16,8 @@ resizeTail(width: number, height: number, pid?: number): void; | Parameter | Type | Description | | --- | --- | --- | -| width | number | width of the window. | -| height | number | height of the window. | +| width | number | Width of the window. | +| height | number | Height of the window. | | pid | number | Optional. PID of the script having its tail resized. If omitted, the current script is used. | Returns: @@ -28,5 +28,5 @@ void RAM cost: 0 GB -Resize a tail window. Size are in pixel +Resize a tail window. Size are in pixel. diff --git a/markdown/bitburner.ns.rm.md b/markdown/bitburner.ns.rm.md index 207fc919f..56621f077 100644 --- a/markdown/bitburner.ns.rm.md +++ b/markdown/bitburner.ns.rm.md @@ -17,7 +17,7 @@ rm(name: string, host?: string): boolean; | Parameter | Type | Description | | --- | --- | --- | | name | string | Filename of file to remove. Must include the extension. | -| host | string | Host Address of the server on which to delete the file. Optional. Defaults to current server. | +| host | string | Hostname of the server on which to delete the file. Optional. Defaults to current server. | Returns: diff --git a/markdown/bitburner.ns.scan.md b/markdown/bitburner.ns.scan.md index 0bf88f7ba..a51c1886b 100644 --- a/markdown/bitburner.ns.scan.md +++ b/markdown/bitburner.ns.scan.md @@ -16,13 +16,13 @@ scan(host?: string): string[]; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Optional, Hostname of the server to scan, default to current server. | +| host | string | Optional. Hostname of the server to scan, default to current server. | Returns: string\[\] -Returns an string of hostnames. +Returns an array of hostnames. ## Remarks @@ -30,3 +30,43 @@ RAM cost: 0.2 GB Returns an array containing the hostnames of all servers that are one node way from the specified target server. The hostnames in the returned array are strings. +## Example 1 + + +```ts +// NS1 +// All servers that are one hop from the current server. +tprint("Neighbors of current server."); +var neighbor = scan(); +for (var i = 0; i < neighbor.length; i++) { + tprint(neighbor[i]); +} +// All neighbors of n00dles. +var target = "n00dles"; +neighbor = scan(target); +tprintf("Neighbors of %s.", target); +for (var i = 0; i < neighbor.length; i++) { + tprint(neighbor[i]); +} +``` + +## Example 2 + + +```ts +// NS2 +// All servers that are one hop from the current server. +ns.tprint("Neighbors of current server."); +let neighbor = ns.scan(); +for (let i = 0; i < neighbor.length; i++) { + ns.tprint(neighbor[i]); +} +// All neighbors of n00dles. +const target = "n00dles"; +neighbor = ns.scan(target); +ns.tprintf("Neighbors of %s.", target); +for (let i = 0; i < neighbor.length; i++) { + ns.tprint(neighbor[i]); +} +``` + diff --git a/markdown/bitburner.ns.scp.md b/markdown/bitburner.ns.scp.md index 25546f4a8..e20aaee69 100644 --- a/markdown/bitburner.ns.scp.md +++ b/markdown/bitburner.ns.scp.md @@ -17,8 +17,8 @@ scp(files: string | string[], destination: string, source?: string): boolean; | Parameter | Type | Description | | --- | --- | --- | | files | string \| string\[\] | Filename or an array of filenames of script/literature files to copy. | -| destination | string | Host of the destination server, which is the server to which the file will be copied. | -| source | string | Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server. | +| destination | string | Hostname of the destination server, which is the server to which the file will be copied. | +| source | string | Hostname of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server. | Returns: diff --git a/markdown/bitburner.ns.scriptkill.md b/markdown/bitburner.ns.scriptkill.md index 2d7615805..639f930be 100644 --- a/markdown/bitburner.ns.scriptkill.md +++ b/markdown/bitburner.ns.scriptkill.md @@ -17,13 +17,13 @@ scriptKill(script: string, host: string): boolean; | Parameter | Type | Description | | --- | --- | --- | | script | string | Filename of script to kill. This is case-sensitive. | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: boolean -true if one or more scripts were successfully killed, and false if none were. +True if one or more scripts were successfully killed, and false if none were. ## Remarks diff --git a/markdown/bitburner.ns.scriptrunning.md b/markdown/bitburner.ns.scriptrunning.md index ebeac6b5d..46e107478 100644 --- a/markdown/bitburner.ns.scriptrunning.md +++ b/markdown/bitburner.ns.scriptrunning.md @@ -17,7 +17,7 @@ scriptRunning(script: string, host: string): boolean; | Parameter | Type | Description | | --- | --- | --- | | script | string | Filename of script to check. This is case-sensitive. | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: @@ -31,7 +31,7 @@ RAM cost: 1 GB Returns a boolean indicating whether any instance of the specified script is running on the target server, regardless of its arguments. -This is different than the isRunning function because it does not try to identify a specific instance of a running script by its arguments. +This is different than the [isRunning](./bitburner.ns.isrunning.md) function because it does not try to identify a specific instance of a running script by its arguments. ## Example 1 diff --git a/markdown/bitburner.ns.serverexists.md b/markdown/bitburner.ns.serverexists.md index b0f66a4bc..1f9c2cee7 100644 --- a/markdown/bitburner.ns.serverexists.md +++ b/markdown/bitburner.ns.serverexists.md @@ -16,13 +16,13 @@ serverExists(host: string): boolean; | Parameter | Type | Description | | --- | --- | --- | -| host | string | Host of target server. | +| host | string | Hostname of target server. | Returns: boolean -True if specified server exists, and false otherwise. +True if the specified server exists, and false otherwise. ## Remarks diff --git a/markdown/bitburner.ns.sleeve.md b/markdown/bitburner.ns.sleeve.md index bc3be1dd9..6e568b05f 100644 --- a/markdown/bitburner.ns.sleeve.md +++ b/markdown/bitburner.ns.sleeve.md @@ -9,7 +9,7 @@ Namespace for sleeve functions. Signature: ```typescript -readonly sleeve: Sleeve; +readonly sleeve: sleeve; ``` ## Remarks diff --git a/markdown/bitburner.ns.spawn.md b/markdown/bitburner.ns.spawn.md index 5360c3478..7596ee3a8 100644 --- a/markdown/bitburner.ns.spawn.md +++ b/markdown/bitburner.ns.spawn.md @@ -4,7 +4,7 @@ ## NS.spawn() method -Terminate current script and start another in 10s. +Terminate current script and start another in 10 seconds. Signature: diff --git a/markdown/bitburner.ns.tformat.md b/markdown/bitburner.ns.tformat.md index 2e8ed2ca6..f5b658448 100644 --- a/markdown/bitburner.ns.tformat.md +++ b/markdown/bitburner.ns.tformat.md @@ -4,7 +4,7 @@ ## NS.tFormat() method -Format time to readable string +Format time to a readable string. Signature: @@ -17,7 +17,7 @@ tFormat(milliseconds: number, milliPrecision?: boolean): string; | Parameter | Type | Description | | --- | --- | --- | | milliseconds | number | Number of millisecond to format. | -| milliPrecision | boolean | Format time with subsecond precision, defaults to false. | +| milliPrecision | boolean | Format time with subsecond precision. Defaults to false. | Returns: diff --git a/markdown/bitburner.ns.toast.md b/markdown/bitburner.ns.toast.md index f58fbbe69..f9e801c26 100644 --- a/markdown/bitburner.ns.toast.md +++ b/markdown/bitburner.ns.toast.md @@ -9,7 +9,7 @@ Queue a toast (bottom-right notification). Signature: ```typescript -toast(msg: string, variant?: ToastVariant, duration?: number | null): void; +toast(msg: string, variant?: ToastVariant | `${ToastVariant}`, duration?: number | null): void; ``` ## Parameters @@ -17,8 +17,8 @@ toast(msg: string, variant?: ToastVariant, duration?: number | null): void; | Parameter | Type | Description | | --- | --- | --- | | msg | string | Message in the toast. | -| variant | [ToastVariant](./bitburner.toastvariant.md) | Type of toast, must be one of success, info, warning, error. Defaults to success. | -| duration | number \| null | Duration of toast in ms. Can also be null to create a persistent toast. Defaults to 2000 | +| variant | [ToastVariant](./bitburner.toastvariant.md) \| \`${[ToastVariant](./bitburner.toastvariant.md)}\` | Type of toast. Must be one of success, info, warning, error. Defaults to success. | +| duration | number \| null | Duration of toast in ms. Can also be null to create a persistent toast. Defaults to 2000. | Returns: diff --git a/markdown/bitburner.ns.trywriteport.md b/markdown/bitburner.ns.trywriteport.md index 62aea2493..e2ea77324 100644 --- a/markdown/bitburner.ns.trywriteport.md +++ b/markdown/bitburner.ns.trywriteport.md @@ -29,5 +29,5 @@ True if the data is successfully written to the port, and false otherwise. RAM cost: 0 GB -Attempts to write data to the specified Netscript Port. If the port is full, the data will not be written. Otherwise, the data will be written normally. +Attempts to write data to the specified Netscript port. If the port is full, the data will not be written. Otherwise, the data will be written normally. diff --git a/markdown/bitburner.ns.upgradepurchasedserver.md b/markdown/bitburner.ns.upgradepurchasedserver.md index 70c3b31c4..e61279b5a 100644 --- a/markdown/bitburner.ns.upgradepurchasedserver.md +++ b/markdown/bitburner.ns.upgradepurchasedserver.md @@ -4,7 +4,7 @@ ## NS.upgradePurchasedServer() method -Upgrade a purchased servers ram. +Upgrade a purchased server's RAM. Signature: @@ -23,7 +23,7 @@ upgradePurchasedServer(hostname: string, ram: number): boolean; boolean -True if the upgrade succeeded. +True if the upgrade succeeded, and false otherwise. ## Remarks diff --git a/markdown/bitburner.ns.weaken.md b/markdown/bitburner.ns.weaken.md index 3ee0175ff..4794e9f21 100644 --- a/markdown/bitburner.ns.weaken.md +++ b/markdown/bitburner.ns.weaken.md @@ -4,7 +4,7 @@ ## NS.weaken() method -Reduce a server security level. +Reduce a server's security level. Signature: @@ -29,9 +29,9 @@ The amount by which the target server’s security level was decreased. This is RAM cost: 0.15 GB -Use your hacking skills to attack a server’s security, lowering the server’s security level. The runtime for this command depends on your hacking level and the target server’s security level when this function is called. This function lowers the security level of the target server by 0.05. +Use your hacking skills to attack a server’s security, lowering the server’s security level. The runtime for this function depends on your hacking level and the target server’s security level when this function is called. This function lowers the security level of the target server by 0.05. -Like hack and grow, `weaken` can be called on any server, regardless of where the script is running. This command requires root access to the target server, but there is no required hacking level to run the command. +Like [hack](./bitburner.ns.hack.md) and [grow](./bitburner.ns.grow.md), `weaken` can be called on any server, regardless of where the script is running. This function requires root access to the target server, but there is no required hacking level to run the function. ## Example 1 diff --git a/markdown/bitburner.ns.wget.md b/markdown/bitburner.ns.wget.md index 01850c158..3fa300806 100644 --- a/markdown/bitburner.ns.wget.md +++ b/markdown/bitburner.ns.wget.md @@ -34,7 +34,7 @@ Retrieves data from a URL and downloads it to a file on the specified server. Th IMPORTANT: This is an asynchronous function that returns a Promise. The Promise’s resolved value will be a boolean indicating whether or not the data was successfully retrieved from the URL. Because the function is async and returns a Promise, it is recommended you use wget in NetscriptJS (Netscript 2.0). -In NetscriptJS, you must preface any call to wget with the await keyword (like you would hack or sleep). wget will still work in Netscript 1.0, but the functions execution will not be synchronous (i.e. it may not execute when you expect/want it to). Furthermore, since Promises are not supported in ES5, you will not be able to process the returned value of wget in Netscript 1.0. +In NetscriptJS, you must preface any call to wget with the await keyword (like you would [hack](./bitburner.ns.hack.md) or [sleep](./bitburner.ns.sleep.md)). wget will still work in Netscript 1.0, but the function's execution will not be synchronous (i.e. it may not execute when you expect/want it to). Furthermore, since Promises are not supported in ES5, you will not be able to process the returned value of wget in Netscript 1.0. ## Example 1 diff --git a/markdown/bitburner.ns.write.md b/markdown/bitburner.ns.write.md index c6ceee4ac..eb3a41029 100644 --- a/markdown/bitburner.ns.write.md +++ b/markdown/bitburner.ns.write.md @@ -9,7 +9,7 @@ Write data to a file. Signature: ```typescript -write(filename: string, data?: string[] | number | string, mode?: "w" | "a"): void; +write(filename: string, data?: string, mode?: "w" | "a"): void; ``` ## Parameters @@ -17,7 +17,7 @@ write(filename: string, data?: string[] | number | string, mode?: "w" | "a"): vo | Parameter | Type | Description | | --- | --- | --- | | filename | string | Name of the file to be written to. | -| data | string\[\] \| number \| string | Data to write. | +| data | string | Data to write. | | mode | "w" \| "a" | Defines the write mode. | Returns: @@ -30,5 +30,5 @@ RAM cost: 0 GB This function can be used to write data to a text file (.txt) or a script (.js or .script). -This function will write data to that file. If the specified file does not exist, then it will be created. The third argument mode, defines how the data will be written to the file. If \*mode is set to “w”, then the data is written in “write” mode which means that it will overwrite all existing data on the file. If mode is set to any other value then the data will be written in “append” mode which means that the data will be added at the end of the file. +This function will write data to that file. If the specified file does not exist, then it will be created. The third argument mode defines how the data will be written to the file. If mode is set to “w”, then the data is written in “write” mode which means that it will overwrite all existing data on the file. If mode is set to any other value then the data will be written in “append” mode which means that the data will be added at the end of the file. diff --git a/markdown/bitburner.ns.writeport.md b/markdown/bitburner.ns.writeport.md index 9f3fd36b2..eb98c6b2a 100644 --- a/markdown/bitburner.ns.writeport.md +++ b/markdown/bitburner.ns.writeport.md @@ -9,7 +9,7 @@ Write data to a port. Signature: ```typescript -writePort(port: number, data: string | number): Promise; +writePort(port: number, data: string | number): PortData | null; ``` ## Parameters @@ -21,13 +21,13 @@ writePort(port: number, data: string | number): Promise; Returns: -Promise<[PortData](./bitburner.portdata.md)> +[PortData](./bitburner.portdata.md) \| null -The data popped off the queue if it was full. +The data popped off the queue if it was full, or null if it was not full. ## Remarks RAM cost: 0 GB -Write data to that netscript port. +Write data to the given Netscript port. diff --git a/markdown/bitburner.nsenums.md b/markdown/bitburner.nsenums.md index 2bb42da8c..85364c3e0 100644 --- a/markdown/bitburner.nsenums.md +++ b/markdown/bitburner.nsenums.md @@ -8,7 +8,15 @@ Signature: ```typescript -export type NSEnums = typeof enums; +export type NSEnums = { + toast: typeof ToastVariant; + CrimeType: typeof CrimeType; + FactionWorkType: typeof FactionWorkType; + GymType: typeof GymType; + UniversityClassType: typeof UniversityClassType; + CompanyPosName: typeof CompanyPosName; + LocationName: typeof LocationName; +}; ``` -References: [enums](./bitburner.enums.md) +References: [ToastVariant](./bitburner.toastvariant.md), [CrimeType](./bitburner.crimetype.md), [FactionWorkType](./bitburner.factionworktype.md), [GymType](./bitburner.gymtype.md), [UniversityClassType](./bitburner.universityclasstype.md), [CompanyPosName](./bitburner.companyposname.md), [LocationName](./bitburner.locationname.md) diff --git a/markdown/bitburner.office.avgene.md b/markdown/bitburner.office.avgene.md new file mode 100644 index 000000000..551fcc6e4 --- /dev/null +++ b/markdown/bitburner.office.avgene.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Office](./bitburner.office.md) > [avgEne](./bitburner.office.avgene.md) + +## Office.avgEne property + +Average energy of the employees + +Signature: + +```typescript +avgEne: number; +``` diff --git a/markdown/bitburner.office.avghap.md b/markdown/bitburner.office.avghap.md new file mode 100644 index 000000000..7d9ec2855 --- /dev/null +++ b/markdown/bitburner.office.avghap.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Office](./bitburner.office.md) > [avgHap](./bitburner.office.avghap.md) + +## Office.avgHap property + +Average happiness of the employees + +Signature: + +```typescript +avgHap: number; +``` diff --git a/markdown/bitburner.office.avgmor.md b/markdown/bitburner.office.avgmor.md new file mode 100644 index 000000000..5397ae3a8 --- /dev/null +++ b/markdown/bitburner.office.avgmor.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Office](./bitburner.office.md) > [avgMor](./bitburner.office.avgmor.md) + +## Office.avgMor property + +Average morale of the employees + +Signature: + +```typescript +avgMor: number; +``` diff --git a/markdown/bitburner.office.employeejobs.md b/markdown/bitburner.office.employeejobs.md index 34fe34842..05d2b2603 100644 --- a/markdown/bitburner.office.employeejobs.md +++ b/markdown/bitburner.office.employeejobs.md @@ -9,5 +9,5 @@ Positions of the employees Signature: ```typescript -employeeJobs: EmployeeJobs; +employeeJobs: Record<`${EmployeePositions}`, number>; ``` diff --git a/markdown/bitburner.office.employeeprod.md b/markdown/bitburner.office.employeeprod.md index 56c54a74a..7190b0939 100644 --- a/markdown/bitburner.office.employeeprod.md +++ b/markdown/bitburner.office.employeeprod.md @@ -9,5 +9,5 @@ Production of the employees Signature: ```typescript -employeeProd: EmployeeJobs; +employeeProd: Record<`${EmployeePositions}`, number>; ``` diff --git a/markdown/bitburner.office.employees.md b/markdown/bitburner.office.employees.md index 4d54145cd..a38f423ca 100644 --- a/markdown/bitburner.office.employees.md +++ b/markdown/bitburner.office.employees.md @@ -4,10 +4,10 @@ ## Office.employees property -Name of all the employees +Amount of employees Signature: ```typescript -employees: string[]; +employees: number; ``` diff --git a/markdown/bitburner.office.md b/markdown/bitburner.office.md index 41495d00e..ee1cc7956 100644 --- a/markdown/bitburner.office.md +++ b/markdown/bitburner.office.md @@ -16,9 +16,12 @@ export interface Office | Property | Type | Description | | --- | --- | --- | -| [employeeJobs](./bitburner.office.employeejobs.md) | [EmployeeJobs](./bitburner.employeejobs.md) | Positions of the employees | -| [employeeProd](./bitburner.office.employeeprod.md) | [EmployeeJobs](./bitburner.employeejobs.md) | Production of the employees | -| [employees](./bitburner.office.employees.md) | string\[\] | Name of all the employees | +| [avgEne](./bitburner.office.avgene.md) | number | Average energy of the employees | +| [avgHap](./bitburner.office.avghap.md) | number | Average happiness of the employees | +| [avgMor](./bitburner.office.avgmor.md) | number | Average morale of the employees | +| [employeeJobs](./bitburner.office.employeejobs.md) | Record<\`${[EmployeePositions](./bitburner.employeepositions.md)}\`, number> | Positions of the employees | +| [employeeProd](./bitburner.office.employeeprod.md) | Record<\`${[EmployeePositions](./bitburner.employeepositions.md)}\`, number> | Production of the employees | +| [employees](./bitburner.office.employees.md) | number | Amount of employees | | [loc](./bitburner.office.loc.md) | string | City of the office | | [maxEne](./bitburner.office.maxene.md) | number | Maximum amount of energy of the employees | | [maxHap](./bitburner.office.maxhap.md) | number | Maximum happiness of the employees | diff --git a/markdown/bitburner.officeapi.assignjob.md b/markdown/bitburner.officeapi.assignjob.md deleted file mode 100644 index a62fbb084..000000000 --- a/markdown/bitburner.officeapi.assignjob.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [OfficeAPI](./bitburner.officeapi.md) > [assignJob](./bitburner.officeapi.assignjob.md) - -## OfficeAPI.assignJob() method - -Assign an employee to a job. - -Signature: - -```typescript -assignJob(divisionName: string, cityName: string, employeeName: string, job: string): void; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| divisionName | string | Name of the division | -| cityName | string | Name of the city | -| employeeName | string | name of the employee | -| job | string | Name of the job. | - -Returns: - -void - diff --git a/markdown/bitburner.officeapi.getemployee.md b/markdown/bitburner.officeapi.getemployee.md deleted file mode 100644 index e26029b33..000000000 --- a/markdown/bitburner.officeapi.getemployee.md +++ /dev/null @@ -1,28 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [OfficeAPI](./bitburner.officeapi.md) > [getEmployee](./bitburner.officeapi.getemployee.md) - -## OfficeAPI.getEmployee() method - -Get data about an employee - -Signature: - -```typescript -getEmployee(divisionName: string, cityName: string, employeeName: string): Employee; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| divisionName | string | Name of the division | -| cityName | string | Name of the city | -| employeeName | string | Name of the employee | - -Returns: - -[Employee](./bitburner.employee.md) - -Employee data - diff --git a/markdown/bitburner.officeapi.gethireadvertcost.md b/markdown/bitburner.officeapi.gethireadvertcost.md index 3be571d6b..8a5140778 100644 --- a/markdown/bitburner.officeapi.gethireadvertcost.md +++ b/markdown/bitburner.officeapi.gethireadvertcost.md @@ -4,7 +4,7 @@ ## OfficeAPI.getHireAdVertCost() method -Get the cost to Hire AdVert +Get data about an employee Signature: @@ -22,5 +22,5 @@ getHireAdVertCost(divisionName: string): number; number -Cost +Employee data diff --git a/markdown/bitburner.officeapi.hireemployee.md b/markdown/bitburner.officeapi.hireemployee.md index d72ec4407..5874c9e0c 100644 --- a/markdown/bitburner.officeapi.hireemployee.md +++ b/markdown/bitburner.officeapi.hireemployee.md @@ -9,7 +9,11 @@ Hire an employee. Signature: ```typescript -hireEmployee(divisionName: string, cityName: string): Employee | undefined; +hireEmployee( + divisionName: string, + cityName: string, + employeePosition?: EmployeePositions | `${EmployeePositions}`, + ): boolean; ``` ## Parameters @@ -18,10 +22,11 @@ hireEmployee(divisionName: string, cityName: string): Employee | undefined; | --- | --- | --- | | divisionName | string | Name of the division | | cityName | string | Name of the city | +| employeePosition | [EmployeePositions](./bitburner.employeepositions.md) \| \`${[EmployeePositions](./bitburner.employeepositions.md)}\` | Position to place into. Defaults to "Unassigned". | Returns: -[Employee](./bitburner.employee.md) \| undefined +boolean -The newly hired employee, if any +True if an employee was hired, false otherwise diff --git a/markdown/bitburner.officeapi.md b/markdown/bitburner.officeapi.md index ecb622aab..60db20d04 100644 --- a/markdown/bitburner.officeapi.md +++ b/markdown/bitburner.officeapi.md @@ -20,17 +20,15 @@ requires the Office API upgrade from your corporation. | Method | Description | | --- | --- | -| [assignJob(divisionName, cityName, employeeName, job)](./bitburner.officeapi.assignjob.md) | Assign an employee to a job. | | [buyCoffee(divisionName, cityName)](./bitburner.officeapi.buycoffee.md) | Buy coffee for your employees | -| [getEmployee(divisionName, cityName, employeeName)](./bitburner.officeapi.getemployee.md) | Get data about an employee | -| [getHireAdVertCost(divisionName)](./bitburner.officeapi.gethireadvertcost.md) | Get the cost to Hire AdVert | +| [getHireAdVertCost(divisionName)](./bitburner.officeapi.gethireadvertcost.md) | Get data about an employee | | [getHireAdVertCount(adivisionName)](./bitburner.officeapi.gethireadvertcount.md) | Get the number of times you have Hired AdVert | | [getOffice(divisionName, cityName)](./bitburner.officeapi.getoffice.md) | Get data about an office | | [getOfficeSizeUpgradeCost(divisionName, cityName, asize)](./bitburner.officeapi.getofficesizeupgradecost.md) | Cost to Upgrade office size. | | [getResearchCost(divisionName, researchName)](./bitburner.officeapi.getresearchcost.md) | Get the cost to unlock research | | [hasResearched(divisionName, researchName)](./bitburner.officeapi.hasresearched.md) | Gets if you have unlocked a research | | [hireAdVert(divisionName)](./bitburner.officeapi.hireadvert.md) | Hire AdVert. | -| [hireEmployee(divisionName, cityName)](./bitburner.officeapi.hireemployee.md) | Hire an employee. | +| [hireEmployee(divisionName, cityName, employeePosition)](./bitburner.officeapi.hireemployee.md) | Hire an employee. | | [research(divisionName, researchName)](./bitburner.officeapi.research.md) | Purchase a research | | [setAutoJobAssignment(divisionName, cityName, job, amount)](./bitburner.officeapi.setautojobassignment.md) | Set the auto job assignment for a job | | [throwParty(divisionName, cityName, costPerEmployee)](./bitburner.officeapi.throwparty.md) | Throw a party for your employees | diff --git a/markdown/bitburner.ordertypes.md b/markdown/bitburner.ordertypes.md index 4753ee345..f17bfba71 100644 --- a/markdown/bitburner.ordertypes.md +++ b/markdown/bitburner.ordertypes.md @@ -8,7 +8,7 @@ Signature: ```typescript -export enum OrderTypes +declare enum OrderTypes ``` ## Enumeration Members diff --git a/markdown/bitburner.person.city.md b/markdown/bitburner.person.city.md new file mode 100644 index 000000000..c335af9c0 --- /dev/null +++ b/markdown/bitburner.person.city.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Person](./bitburner.person.md) > [city](./bitburner.person.city.md) + +## Person.city property + +Signature: + +```typescript +city: string; +``` diff --git a/markdown/bitburner.person.exp.md b/markdown/bitburner.person.exp.md new file mode 100644 index 000000000..e1a40b733 --- /dev/null +++ b/markdown/bitburner.person.exp.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Person](./bitburner.person.md) > [exp](./bitburner.person.exp.md) + +## Person.exp property + +Signature: + +```typescript +exp: Skills; +``` diff --git a/markdown/bitburner.person.hp.md b/markdown/bitburner.person.hp.md new file mode 100644 index 000000000..0acf6dce4 --- /dev/null +++ b/markdown/bitburner.person.hp.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Person](./bitburner.person.md) > [hp](./bitburner.person.hp.md) + +## Person.hp property + +Signature: + +```typescript +hp: HP; +``` diff --git a/markdown/bitburner.person.md b/markdown/bitburner.person.md new file mode 100644 index 000000000..3a152f97c --- /dev/null +++ b/markdown/bitburner.person.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Person](./bitburner.person.md) + +## Person interface + + +Signature: + +```typescript +interface Person +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [city](./bitburner.person.city.md) | string | | +| [exp](./bitburner.person.exp.md) | [Skills](./bitburner.skills.md) | | +| [hp](./bitburner.person.hp.md) | [HP](./bitburner.hp.md) | | +| [mults](./bitburner.person.mults.md) | [Multipliers](./bitburner.multipliers.md) | | +| [skills](./bitburner.person.skills.md) | [Skills](./bitburner.skills.md) | | + diff --git a/markdown/bitburner.person.mults.md b/markdown/bitburner.person.mults.md new file mode 100644 index 000000000..8e058476b --- /dev/null +++ b/markdown/bitburner.person.mults.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Person](./bitburner.person.md) > [mults](./bitburner.person.mults.md) + +## Person.mults property + +Signature: + +```typescript +mults: Multipliers; +``` diff --git a/markdown/bitburner.person.skills.md b/markdown/bitburner.person.skills.md new file mode 100644 index 000000000..3cd6423bc --- /dev/null +++ b/markdown/bitburner.person.skills.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Person](./bitburner.person.md) > [skills](./bitburner.person.skills.md) + +## Person.skills property + +Signature: + +```typescript +skills: Skills; +``` diff --git a/markdown/bitburner.player.city.md b/markdown/bitburner.player.city.md deleted file mode 100644 index d5bcfbe21..000000000 --- a/markdown/bitburner.player.city.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Player](./bitburner.player.md) > [city](./bitburner.player.city.md) - -## Player.city property - -Signature: - -```typescript -city: string; -``` diff --git a/markdown/bitburner.player.exp.md b/markdown/bitburner.player.exp.md deleted file mode 100644 index 4bf123f6f..000000000 --- a/markdown/bitburner.player.exp.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Player](./bitburner.player.md) > [exp](./bitburner.player.exp.md) - -## Player.exp property - -Signature: - -```typescript -exp: Skills; -``` diff --git a/markdown/bitburner.player.hascorporation.md b/markdown/bitburner.player.hascorporation.md deleted file mode 100644 index 3f9d9e6b2..000000000 --- a/markdown/bitburner.player.hascorporation.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Player](./bitburner.player.md) > [hasCorporation](./bitburner.player.hascorporation.md) - -## Player.hasCorporation property - -Signature: - -```typescript -hasCorporation: boolean; -``` diff --git a/markdown/bitburner.player.hp.md b/markdown/bitburner.player.hp.md deleted file mode 100644 index c201a7123..000000000 --- a/markdown/bitburner.player.hp.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Player](./bitburner.player.md) > [hp](./bitburner.player.hp.md) - -## Player.hp property - -Signature: - -```typescript -hp: HP; -``` diff --git a/markdown/bitburner.player.inbladeburner.md b/markdown/bitburner.player.inbladeburner.md deleted file mode 100644 index 1bfe078fd..000000000 --- a/markdown/bitburner.player.inbladeburner.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Player](./bitburner.player.md) > [inBladeburner](./bitburner.player.inbladeburner.md) - -## Player.inBladeburner property - -Signature: - -```typescript -inBladeburner: boolean; -``` diff --git a/markdown/bitburner.player.md b/markdown/bitburner.player.md index 93c240f2e..547ce99a1 100644 --- a/markdown/bitburner.player.md +++ b/markdown/bitburner.player.md @@ -8,29 +8,22 @@ Signature: ```typescript -interface Player +interface Player extends Person ``` +Extends: [Person](./bitburner.person.md) ## Properties | Property | Type | Description | | --- | --- | --- | | [bitNodeN](./bitburner.player.bitnoden.md) | number | | -| [city](./bitburner.player.city.md) | string | | | [entropy](./bitburner.player.entropy.md) | number | | -| [exp](./bitburner.player.exp.md) | [Skills](./bitburner.skills.md) | | | [factions](./bitburner.player.factions.md) | string\[\] | | -| [hasCorporation](./bitburner.player.hascorporation.md) | boolean | | -| [hp](./bitburner.player.hp.md) | [HP](./bitburner.hp.md) | | -| [inBladeburner](./bitburner.player.inbladeburner.md) | boolean | | | [jobs](./bitburner.player.jobs.md) | Record<string, string> | | | [location](./bitburner.player.location.md) | string | | | [money](./bitburner.player.money.md) | number | | -| [mults](./bitburner.player.mults.md) | [Multipliers](./bitburner.multipliers.md) | | | [numPeopleKilled](./bitburner.player.numpeoplekilled.md) | number | | | [playtimeSinceLastAug](./bitburner.player.playtimesincelastaug.md) | number | | | [playtimeSinceLastBitnode](./bitburner.player.playtimesincelastbitnode.md) | number | | -| [skills](./bitburner.player.skills.md) | [Skills](./bitburner.skills.md) | | -| [tor](./bitburner.player.tor.md) | boolean | | | [totalPlaytime](./bitburner.player.totalplaytime.md) | number | | diff --git a/markdown/bitburner.player.mults.md b/markdown/bitburner.player.mults.md deleted file mode 100644 index 43860cc6f..000000000 --- a/markdown/bitburner.player.mults.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Player](./bitburner.player.md) > [mults](./bitburner.player.mults.md) - -## Player.mults property - -Signature: - -```typescript -mults: Multipliers; -``` diff --git a/markdown/bitburner.player.skills.md b/markdown/bitburner.player.skills.md deleted file mode 100644 index 04f4038a6..000000000 --- a/markdown/bitburner.player.skills.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Player](./bitburner.player.md) > [skills](./bitburner.player.skills.md) - -## Player.skills property - -Signature: - -```typescript -skills: Skills; -``` diff --git a/markdown/bitburner.player.tor.md b/markdown/bitburner.player.tor.md deleted file mode 100644 index bd3af11bd..000000000 --- a/markdown/bitburner.player.tor.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Player](./bitburner.player.md) > [tor](./bitburner.player.tor.md) - -## Player.tor property - -Signature: - -```typescript -tor: boolean; -``` diff --git a/markdown/bitburner.positiontypes.md b/markdown/bitburner.positiontypes.md index 8946c1037..e8c376699 100644 --- a/markdown/bitburner.positiontypes.md +++ b/markdown/bitburner.positiontypes.md @@ -8,7 +8,7 @@ Signature: ```typescript -export enum PositionTypes +declare enum PositionTypes ``` ## Enumeration Members diff --git a/markdown/bitburner.possibleinfiltrationlocation.city.md b/markdown/bitburner.possibleinfiltrationlocation.city.md deleted file mode 100644 index 7ebe6325e..000000000 --- a/markdown/bitburner.possibleinfiltrationlocation.city.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [PossibleInfiltrationLocation](./bitburner.possibleinfiltrationlocation.md) > [city](./bitburner.possibleinfiltrationlocation.city.md) - -## PossibleInfiltrationLocation.city property - -Signature: - -```typescript -city: string; -``` diff --git a/markdown/bitburner.possibleinfiltrationlocation.md b/markdown/bitburner.possibleinfiltrationlocation.md deleted file mode 100644 index f38cb53c1..000000000 --- a/markdown/bitburner.possibleinfiltrationlocation.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [PossibleInfiltrationLocation](./bitburner.possibleinfiltrationlocation.md) - -## PossibleInfiltrationLocation interface - - -Signature: - -```typescript -export interface PossibleInfiltrationLocation -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [city](./bitburner.possibleinfiltrationlocation.city.md) | string | | -| [name](./bitburner.possibleinfiltrationlocation.name.md) | string | | - diff --git a/markdown/bitburner.possibleinfiltrationlocation.name.md b/markdown/bitburner.possibleinfiltrationlocation.name.md deleted file mode 100644 index 5c5d39dc8..000000000 --- a/markdown/bitburner.possibleinfiltrationlocation.name.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [PossibleInfiltrationLocation](./bitburner.possibleinfiltrationlocation.md) > [name](./bitburner.possibleinfiltrationlocation.name.md) - -## PossibleInfiltrationLocation.name property - -Signature: - -```typescript -name: string; -``` diff --git a/markdown/bitburner.processinfo.md b/markdown/bitburner.processinfo.md index 009b5b5e8..840e08283 100644 --- a/markdown/bitburner.processinfo.md +++ b/markdown/bitburner.processinfo.md @@ -9,7 +9,7 @@ A single process on a server. Signature: ```typescript -export interface ProcessInfo +interface ProcessInfo ``` ## Properties diff --git a/markdown/bitburner.recentscript.md b/markdown/bitburner.recentscript.md index 7be1b56c1..804d09bc4 100644 --- a/markdown/bitburner.recentscript.md +++ b/markdown/bitburner.recentscript.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface RecentScript extends RunningScript +interface RecentScript extends RunningScript ``` Extends: [RunningScript](./bitburner.runningscript.md) diff --git a/markdown/bitburner.reputationformulas.repfromdonation.md b/markdown/bitburner.reputationformulas.repfromdonation.md index fef8669d8..114a2663c 100644 --- a/markdown/bitburner.reputationformulas.repfromdonation.md +++ b/markdown/bitburner.reputationformulas.repfromdonation.md @@ -9,7 +9,7 @@ Calculate how much rep would be gained. Signature: ```typescript -repFromDonation(amount: number, player: Player): number; +repFromDonation(amount: number, player: Person): number; ``` ## Parameters @@ -17,7 +17,7 @@ repFromDonation(amount: number, player: Player): number; | Parameter | Type | Description | | --- | --- | --- | | amount | number | Amount of money donated | -| player | [Player](./bitburner.player.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | +| player | [Person](./bitburner.person.md) | Player info from [getPlayer](./bitburner.ns.getplayer.md) | Returns: diff --git a/markdown/bitburner.runningscript.md b/markdown/bitburner.runningscript.md index feaa91818..21d7ce519 100644 --- a/markdown/bitburner.runningscript.md +++ b/markdown/bitburner.runningscript.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface RunningScript +interface RunningScript ``` ## Properties diff --git a/markdown/bitburner.server.md b/markdown/bitburner.server.md index b47cd3ff9..e6c092412 100644 --- a/markdown/bitburner.server.md +++ b/markdown/bitburner.server.md @@ -9,7 +9,7 @@ A single server. Signature: ```typescript -export interface Server +interface Server ``` ## Properties diff --git a/markdown/bitburner.singularity.commitcrime.md b/markdown/bitburner.singularity.commitcrime.md index c124998dd..8a9c44fd9 100644 --- a/markdown/bitburner.singularity.commitcrime.md +++ b/markdown/bitburner.singularity.commitcrime.md @@ -9,14 +9,14 @@ Commit a crime. Signature: ```typescript -commitCrime(crime: string, focus?: boolean): number; +commitCrime(crime: CrimeType | `${CrimeType}`, focus?: boolean): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| crime | string | Name of crime to attempt. | +| crime | [CrimeType](./bitburner.crimetype.md) \| \`${[CrimeType](./bitburner.crimetype.md)}\` | Name of crime to attempt. | | focus | boolean | Acquire player focus on this crime. Optional. Defaults to true. | Returns: @@ -31,7 +31,5 @@ RAM cost: 5 GB \* 16/4/1 This function is used to automatically attempt to commit crimes. If you are already in the middle of some ‘working’ action (such as working for a company or training at a gym), then running this function will automatically cancel that action and give you your earnings. -This function returns the number of milliseconds it takes to attempt the specified crime (e.g It takes 60 seconds to attempt the ‘Rob Store’ crime, so running `commitCrime('rob store')` will return 60,000). - -Warning: I do not recommend using the time returned from this function to try and schedule your crime attempts. Instead, I would use the isBusy Singularity function to check whether you have finished attempting a crime. This is because although the game sets a certain crime to be X amount of seconds, there is no guarantee that your browser will follow that time limit. +This function returns the number of milliseconds it takes to attempt the specified crime (e.g It takes 60 seconds to attempt the ‘Rob Store’ crime, so running `commitCrime('ROBSTORE')` will return 60,000). diff --git a/markdown/bitburner.singularity.getaugmentationcost.md b/markdown/bitburner.singularity.getaugmentationcost.md index af7f3b7fa..95f579b86 100644 --- a/markdown/bitburner.singularity.getaugmentationcost.md +++ b/markdown/bitburner.singularity.getaugmentationcost.md @@ -6,7 +6,7 @@ > Warning: This API is now obsolete. > -> use getAugmentationPrice getAugmentationRepCost +> use getAugmentationPrice getAugmentationRepReq > Get the price and reputation of an augmentation. diff --git a/markdown/bitburner.singularity.getcrimechance.md b/markdown/bitburner.singularity.getcrimechance.md index 22e65a839..fb50c3b6a 100644 --- a/markdown/bitburner.singularity.getcrimechance.md +++ b/markdown/bitburner.singularity.getcrimechance.md @@ -9,14 +9,14 @@ Get chance to successfully commit a crime. Signature: ```typescript -getCrimeChance(crime: string): number; +getCrimeChance(crime: CrimeType | `${CrimeType}`): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| crime | string | Name of crime. | +| crime | [CrimeType](./bitburner.crimetype.md) \| \`${[CrimeType](./bitburner.crimetype.md)}\` | Name of crime. | Returns: diff --git a/markdown/bitburner.singularity.getcrimestats.md b/markdown/bitburner.singularity.getcrimestats.md index 01ace9598..287906ca9 100644 --- a/markdown/bitburner.singularity.getcrimestats.md +++ b/markdown/bitburner.singularity.getcrimestats.md @@ -9,14 +9,14 @@ Get stats related to a crime. Signature: ```typescript -getCrimeStats(crime: string): CrimeStats; +getCrimeStats(crime: CrimeType | `${CrimeType}`): CrimeStats; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| crime | string | Name of crime. Not case-sensitive | +| crime | [CrimeType](./bitburner.crimetype.md) \| \`${[CrimeType](./bitburner.crimetype.md)}\` | Name of crime. | Returns: diff --git a/markdown/bitburner.singularity.workforcompany.md b/markdown/bitburner.singularity.workforcompany.md index 59d4338a0..5082c9f36 100644 --- a/markdown/bitburner.singularity.workforcompany.md +++ b/markdown/bitburner.singularity.workforcompany.md @@ -16,7 +16,7 @@ workForCompany(companyName: string, focus?: boolean): boolean; | Parameter | Type | Description | | --- | --- | --- | -| companyName | string | Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked | +| companyName | string | Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked. | | focus | boolean | Acquire player focus on this work operation. Optional. Defaults to true. | Returns: @@ -29,35 +29,29 @@ True if the player starts working, and false otherwise. RAM cost: 3 GB \* 16/4/1 -This function will automatically set you to start working at the company at which you are employed. If you are already in the middle of some “working” action (such as working for a faction, training at a gym, or creating a program), then running this function will automatically cancel that action and give you your earnings. +This function will set you to start working at your current job at a specified company at which you are employed. If you are already in the middle of some “working” action (such as working for a faction, training at a gym, or creating a program), then running this function will cancel that action. This function will return true if the player starts working, and false otherwise. -Note that when you are working for a company, you will not actually receive your earnings (reputation, money, experience) until you FINISH the action. - ## Example 1 -```ts +```js // NS1: -//If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings: -while (getCompanyRep(COMPANY HERE) < VALUE) { - workForCompany(); - sleep(60000); -} -//This way, your company reputation will be updated every minute. +var COMPANY_NAME = "Noodle Bar"; + +var success = singularity.workForCompany(COMPANY_NAME); +if (!success) tprint("ERROR: Failed to start work at " + COMPANY_NAME + "."); ``` ## Example 2 -```ts +```js // NS2: -//If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings: -while (ns.getCompanyRep(COMPANY HERE) < VALUE) { - ns.workForCompany(); - await ns.sleep(60000); -} -//This way, your company reputation will be updated every minute. +const COMPANY_NAME = "Noodle Bar"; + +let success = ns.singularity.workForCompany(COMPANY_NAME); +if (!success) ns.tprint(`ERROR: Failed to start work at ${COMPANY_NAME].`); ``` diff --git a/markdown/bitburner.singularity.workforfaction.md b/markdown/bitburner.singularity.workforfaction.md index c4b76d094..ab694fa57 100644 --- a/markdown/bitburner.singularity.workforfaction.md +++ b/markdown/bitburner.singularity.workforfaction.md @@ -9,7 +9,7 @@ Work for a faction. Signature: ```typescript -workForFaction(faction: string, workType: string, focus?: boolean): boolean; +workForFaction(faction: string, workType: FactionWorkType | `${FactionWorkType}`, focus?: boolean): boolean; ``` ## Parameters @@ -17,7 +17,7 @@ workForFaction(faction: string, workType: string, focus?: boolean): boolean; | Parameter | Type | Description | | --- | --- | --- | | faction | string | Name of faction to work for. | -| workType | string | Type of work to perform for the faction. | +| workType | [FactionWorkType](./bitburner.factionworktype.md) \| \`${[FactionWorkType](./bitburner.factionworktype.md)}\` | Type of work to perform for the faction. | | focus | boolean | Acquire player focus on this work operation. Optional. Defaults to true. | Returns: @@ -30,35 +30,29 @@ True if the player starts working, and false otherwise. RAM cost: 3 GB \* 16/4/1 -This function will automatically set you to start working for the specified faction. Obviously, you must be a member of the faction or else this function will fail. If you are already in the middle of some “working” action (such as working for a company, training at a gym, or creating a program), then running this function will automatically cancel that action and give you your earnings. +This function will set you to start working for the specified faction. You must be a member of the faction and that faction must have the specified work type, or else this function will fail. If you are already in the middle of some “working” action (such as working for a company, training at a gym, or creating a program), then running this function will cancel that action. This function will return true if you successfully start working for the specified faction, and false otherwise. -Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) until you FINISH the action. - ## Example 1 -```ts -// NS1: -//If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings: -while (getFactionRep(FACTION NAME) < VALUE) { - workForFaction(FACNAME, WORKTYPE); - sleep(60000); -} -//This way, your faction reputation will be updated every minute. +```js +// NS1 +var FACTION_NAME = "CyberSec", WORK_TYPE = "hacking"; + +var success = singularity.workForFaction(FACTION_NAME, WORK_TYPE); +if (!success) tprint("ERROR: Failed to start work for " + FACTION_NAME + " with work type " + WORK_TYPE); ``` ## Example 2 -```ts -// NS2: -//If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings: -while (ns.getFactionRep(FACTION NAME) < VALUE) { - ns.workForFaction(FACNAME, WORKTYPE); - await ns.sleep(60000); -} -//This way, your faction reputation will be updated every minute. +```js +// NS2 +const FACTION_NAME = "CyberSec", WORK_TYPE = "hacking"; + +let success = ns.singularity.workForFaction(FACTION_NAME, WORK_TYPE); +if (!success) ns.tprint(`ERROR: Failed to start work for ${FACTION_NAME} with work type ${WORK_TYPE}.`) ``` diff --git a/markdown/bitburner.skills.md b/markdown/bitburner.skills.md index 43e40ec10..42d7673ef 100644 --- a/markdown/bitburner.skills.md +++ b/markdown/bitburner.skills.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface Skills +interface Skills ``` ## Properties diff --git a/markdown/bitburner.sleeve.getinformation.md b/markdown/bitburner.sleeve.getinformation.md deleted file mode 100644 index d36a20f73..000000000 --- a/markdown/bitburner.sleeve.getinformation.md +++ /dev/null @@ -1,32 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [getInformation](./bitburner.sleeve.getinformation.md) - -## Sleeve.getInformation() method - -Get information about a sleeve. - -Signature: - -```typescript -getInformation(sleeveNumber: number): SleeveInformation; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| sleeveNumber | number | Index of the sleeve to retrieve information. | - -Returns: - -[SleeveInformation](./bitburner.sleeveinformation.md) - -Object containing tons of information about this sleeve. - -## Remarks - -RAM cost: 4 GB - -Return a struct containing tons of information about this sleeve - diff --git a/markdown/bitburner.sleeve.getnumsleeves.md b/markdown/bitburner.sleeve.getnumsleeves.md index e456fed41..81eab7964 100644 --- a/markdown/bitburner.sleeve.getnumsleeves.md +++ b/markdown/bitburner.sleeve.getnumsleeves.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [getNumSleeves](./bitburner.sleeve.getnumsleeves.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [getNumSleeves](./bitburner.sleeve.getnumsleeves.md) -## Sleeve.getNumSleeves() method +## sleeve.getNumSleeves() method Get the number of sleeves you own. diff --git a/markdown/bitburner.sleeve.getsleeve.md b/markdown/bitburner.sleeve.getsleeve.md new file mode 100644 index 000000000..36e0547cd --- /dev/null +++ b/markdown/bitburner.sleeve.getsleeve.md @@ -0,0 +1,32 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [getSleeve](./bitburner.sleeve.getsleeve.md) + +## sleeve.getSleeve() method + +Get information about a sleeve. + +Signature: + +```typescript +getSleeve(sleeveNumber: number): Sleeve; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| sleeveNumber | number | Index of the sleeve to retrieve information. | + +Returns: + +[Sleeve](./bitburner.sleeve.md) + +Object containing information about this sleeve. + +## Remarks + +RAM cost: 4 GB + +Return a person object for this sleeve + diff --git a/markdown/bitburner.sleeve.getsleeveaugmentationprice.md b/markdown/bitburner.sleeve.getsleeveaugmentationprice.md index 387a4ee49..7e8deb422 100644 --- a/markdown/bitburner.sleeve.getsleeveaugmentationprice.md +++ b/markdown/bitburner.sleeve.getsleeveaugmentationprice.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [getSleeveAugmentationPrice](./bitburner.sleeve.getsleeveaugmentationprice.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [getSleeveAugmentationPrice](./bitburner.sleeve.getsleeveaugmentationprice.md) -## Sleeve.getSleeveAugmentationPrice() method +## sleeve.getSleeveAugmentationPrice() method Get price of an augmentation. diff --git a/markdown/bitburner.sleeve.getsleeveaugmentationrepreq.md b/markdown/bitburner.sleeve.getsleeveaugmentationrepreq.md index 9fd86d7b6..df39f2e50 100644 --- a/markdown/bitburner.sleeve.getsleeveaugmentationrepreq.md +++ b/markdown/bitburner.sleeve.getsleeveaugmentationrepreq.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [getSleeveAugmentationRepReq](./bitburner.sleeve.getsleeveaugmentationrepreq.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [getSleeveAugmentationRepReq](./bitburner.sleeve.getsleeveaugmentationrepreq.md) -## Sleeve.getSleeveAugmentationRepReq() method +## sleeve.getSleeveAugmentationRepReq() method Get reputation requirement of an augmentation. diff --git a/markdown/bitburner.sleeve.getsleeveaugmentations.md b/markdown/bitburner.sleeve.getsleeveaugmentations.md index d3835eac0..778065e30 100644 --- a/markdown/bitburner.sleeve.getsleeveaugmentations.md +++ b/markdown/bitburner.sleeve.getsleeveaugmentations.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [getSleeveAugmentations](./bitburner.sleeve.getsleeveaugmentations.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [getSleeveAugmentations](./bitburner.sleeve.getsleeveaugmentations.md) -## Sleeve.getSleeveAugmentations() method +## sleeve.getSleeveAugmentations() method Get augmentations installed on a sleeve. diff --git a/markdown/bitburner.sleeve.getsleevepurchasableaugs.md b/markdown/bitburner.sleeve.getsleevepurchasableaugs.md index b4c635a4f..a40916130 100644 --- a/markdown/bitburner.sleeve.getsleevepurchasableaugs.md +++ b/markdown/bitburner.sleeve.getsleevepurchasableaugs.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [getSleevePurchasableAugs](./bitburner.sleeve.getsleevepurchasableaugs.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [getSleevePurchasableAugs](./bitburner.sleeve.getsleevepurchasableaugs.md) -## Sleeve.getSleevePurchasableAugs() method +## sleeve.getSleevePurchasableAugs() method List purchasable augs for a sleeve. diff --git a/markdown/bitburner.sleeve.getsleevestats.md b/markdown/bitburner.sleeve.getsleevestats.md deleted file mode 100644 index 26fc5b68d..000000000 --- a/markdown/bitburner.sleeve.getsleevestats.md +++ /dev/null @@ -1,32 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [getSleeveStats](./bitburner.sleeve.getsleevestats.md) - -## Sleeve.getSleeveStats() method - -Get the stats of a sleeve. - -Signature: - -```typescript -getSleeveStats(sleeveNumber: number): SleeveSkills; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| sleeveNumber | number | Index of the sleeve to get stats of. | - -Returns: - -[SleeveSkills](./bitburner.sleeveskills.md) - -Object containing the stats of the sleeve. - -## Remarks - -RAM cost: 4 GB - -Return a structure containing the stats of the sleeve. - diff --git a/markdown/bitburner.sleeve.gettask.md b/markdown/bitburner.sleeve.gettask.md index b9c08fb1d..e7ea25e69 100644 --- a/markdown/bitburner.sleeve.gettask.md +++ b/markdown/bitburner.sleeve.gettask.md @@ -1,15 +1,15 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [getTask](./bitburner.sleeve.gettask.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [getTask](./bitburner.sleeve.gettask.md) -## Sleeve.getTask() method +## sleeve.getTask() method Get task of a sleeve. Signature: ```typescript -getTask(sleeveNumber: number): SleeveTask; +getTask(sleeveNumber: number): SleeveTask | null; ``` ## Parameters @@ -20,13 +20,13 @@ getTask(sleeveNumber: number): SleeveTask; Returns: -[SleeveTask](./bitburner.sleevetask.md) +[SleeveTask](./bitburner.sleevetask.md) \| null -Object containing information the current task that the sleeve is performing. +Object containing information for the current task that the sleeve is performing. ## Remarks RAM cost: 4 GB -Return the current task that the sleeve is performing. type is set to “Idle” if the sleeve isn’t doing anything. +Return the current task that the sleeve is performing, or null if the sleeve is idle. All tasks have a "type" property, and other available properties depend on the type of task. diff --git a/markdown/bitburner.sleeve.md b/markdown/bitburner.sleeve.md index 64abf31d9..2f16a5318 100644 --- a/markdown/bitburner.sleeve.md +++ b/markdown/bitburner.sleeve.md @@ -4,38 +4,19 @@ ## Sleeve interface -Sleeve API Signature: ```typescript -export interface Sleeve +interface Sleeve extends Person ``` +Extends: [Person](./bitburner.person.md) -## Remarks +## Properties -If you are not in BitNode-10, then you must have Source-File 10 in order to use this API. - -## Methods - -| Method | Description | -| --- | --- | -| [getInformation(sleeveNumber)](./bitburner.sleeve.getinformation.md) | Get information about a sleeve. | -| [getNumSleeves()](./bitburner.sleeve.getnumsleeves.md) | Get the number of sleeves you own. | -| [getSleeveAugmentationPrice(augName)](./bitburner.sleeve.getsleeveaugmentationprice.md) | Get price of an augmentation. | -| [getSleeveAugmentationRepReq(augName)](./bitburner.sleeve.getsleeveaugmentationrepreq.md) | Get reputation requirement of an augmentation. | -| [getSleeveAugmentations(sleeveNumber)](./bitburner.sleeve.getsleeveaugmentations.md) | Get augmentations installed on a sleeve. | -| [getSleevePurchasableAugs(sleeveNumber)](./bitburner.sleeve.getsleevepurchasableaugs.md) | List purchasable augs for a sleeve. | -| [getSleeveStats(sleeveNumber)](./bitburner.sleeve.getsleevestats.md) | Get the stats of a sleeve. | -| [getTask(sleeveNumber)](./bitburner.sleeve.gettask.md) | Get task of a sleeve. | -| [purchaseSleeveAug(sleeveNumber, augName)](./bitburner.sleeve.purchasesleeveaug.md) | Purchase an aug for a sleeve. | -| [setToBladeburnerAction(sleeveNumber, action, contract)](./bitburner.sleeve.settobladeburneraction.md) | Set a sleeve to perform bladeburner actions. | -| [setToCommitCrime(sleeveNumber, name)](./bitburner.sleeve.settocommitcrime.md) | Set a sleeve to commit crime. | -| [setToCompanyWork(sleeveNumber, companyName)](./bitburner.sleeve.settocompanywork.md) | Set a sleeve to work for a company. | -| [setToFactionWork(sleeveNumber, factionName, factionWorkType)](./bitburner.sleeve.settofactionwork.md) | Set a sleeve to work for a faction. | -| [setToGymWorkout(sleeveNumber, gymName, stat)](./bitburner.sleeve.settogymworkout.md) | Set a sleeve to workout at the gym. | -| [setToShockRecovery(sleeveNumber)](./bitburner.sleeve.settoshockrecovery.md) | Set a sleeve to shock recovery. | -| [setToSynchronize(sleeveNumber)](./bitburner.sleeve.settosynchronize.md) | Set a sleeve to synchronize. | -| [setToUniversityCourse(sleeveNumber, university, className)](./bitburner.sleeve.settouniversitycourse.md) | Set a sleeve to take a class at a university. | -| [travel(sleeveNumber, cityName)](./bitburner.sleeve.travel.md) | Make a sleeve travel to another city. | +| Property | Type | Description | +| --- | --- | --- | +| [memory](./bitburner.sleeve.memory.md) | number | | +| [shock](./bitburner.sleeve.shock.md) | number | | +| [sync](./bitburner.sleeve.sync.md) | number | | diff --git a/markdown/bitburner.sleeveskills.memory.md b/markdown/bitburner.sleeve.memory.md similarity index 55% rename from markdown/bitburner.sleeveskills.memory.md rename to markdown/bitburner.sleeve.memory.md index 3dac02f01..b1cf14f9f 100644 --- a/markdown/bitburner.sleeveskills.memory.md +++ b/markdown/bitburner.sleeve.memory.md @@ -1,10 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [memory](./bitburner.sleeveskills.memory.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [memory](./bitburner.sleeve.memory.md) -## SleeveSkills.memory property - -Current memory of the sleeve \[1-100\] +## Sleeve.memory property Signature: diff --git a/markdown/bitburner.sleeve.purchasesleeveaug.md b/markdown/bitburner.sleeve.purchasesleeveaug.md index 16d6f836a..a07cd58d2 100644 --- a/markdown/bitburner.sleeve.purchasesleeveaug.md +++ b/markdown/bitburner.sleeve.purchasesleeveaug.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [purchaseSleeveAug](./bitburner.sleeve.purchasesleeveaug.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [purchaseSleeveAug](./bitburner.sleeve.purchasesleeveaug.md) -## Sleeve.purchaseSleeveAug() method +## sleeve.purchaseSleeveAug() method Purchase an aug for a sleeve. diff --git a/markdown/bitburner.sleeve.settobladeburneraction.md b/markdown/bitburner.sleeve.settobladeburneraction.md index 3d9bf246c..5e846724b 100644 --- a/markdown/bitburner.sleeve.settobladeburneraction.md +++ b/markdown/bitburner.sleeve.settobladeburneraction.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToBladeburnerAction](./bitburner.sleeve.settobladeburneraction.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [setToBladeburnerAction](./bitburner.sleeve.settobladeburneraction.md) -## Sleeve.setToBladeburnerAction() method +## sleeve.setToBladeburnerAction() method Set a sleeve to perform bladeburner actions. diff --git a/markdown/bitburner.sleeve.settocommitcrime.md b/markdown/bitburner.sleeve.settocommitcrime.md index 3165d1f6e..37799f066 100644 --- a/markdown/bitburner.sleeve.settocommitcrime.md +++ b/markdown/bitburner.sleeve.settocommitcrime.md @@ -1,15 +1,15 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToCommitCrime](./bitburner.sleeve.settocommitcrime.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [setToCommitCrime](./bitburner.sleeve.settocommitcrime.md) -## Sleeve.setToCommitCrime() method +## sleeve.setToCommitCrime() method Set a sleeve to commit crime. Signature: ```typescript -setToCommitCrime(sleeveNumber: number, name: string): boolean; +setToCommitCrime(sleeveNumber: number, crimeType: CrimeType | `${CrimeType}`): boolean; ``` ## Parameters @@ -17,7 +17,7 @@ setToCommitCrime(sleeveNumber: number, name: string): boolean; | Parameter | Type | Description | | --- | --- | --- | | sleeveNumber | number | Index of the sleeve to start committing crime. Sleeves are numbered starting from 0. | -| name | string | Name of the crime. Must be an exact match. Refer to the list of crimes. | +| crimeType | [CrimeType](./bitburner.crimetype.md) \| \`${[CrimeType](./bitburner.crimetype.md)}\` | | Returns: @@ -29,13 +29,7 @@ True if this action was set successfully, false otherwise. RAM cost: 4 GB -Return a boolean indicating whether or not this action was set successfully. - -Returns false if an invalid action is specified. - -You can set a sleeve to commit one of the following crimes. The crime names are not case sensitive. For example, you can pass in the crime name as `"Shoplift"`, `"shoplift"`, `"shopLift"`, or even `"SHOPLIFT"`. - -- Assassination - Bond forgery - Deal drugs - Grand theft auto - Heist - Homicide - Kidnap - Larceny - Mug - Rob store - Shoplift - Traffick arms +Return a boolean indicating whether or not this action was set successfully (false if an invalid action is specified). ## Example 1 @@ -43,7 +37,7 @@ You can set a sleeve to commit one of the following crimes. The crime names are ```ts // NS1 // Assign the first 3 sleeves to commit various crimes. -var crime = ["mug", "rob store", "shoplift"]; +var crime = ["MUG", "ROBSTORE", "SHOPLIFT"]; for (var i = 0; i < crime.length; i++) { tprintf("Sleeve %d commits crime: %s", i, crime[i]); sleeve.setToCommitCrime(i, crime[i]); @@ -56,7 +50,7 @@ for (var i = 0; i < crime.length; i++) { ```ts // NS2 // Assign the first 3 sleeves to commit various crimes. -const crime = ["mug", "rob store", "shoplift"]; +const crime = ["MUG", "ROBSTORE", "SHOPLIFT"]; for (let i = 0; i < crime.length; i++) { ns.tprintf("Sleeve %d commits crime: %s", i, crime[i]); ns.sleeve.setToCommitCrime(i, crime[i]); diff --git a/markdown/bitburner.sleeve.settocompanywork.md b/markdown/bitburner.sleeve.settocompanywork.md index bc8d93a0d..ff4c2aedc 100644 --- a/markdown/bitburner.sleeve.settocompanywork.md +++ b/markdown/bitburner.sleeve.settocompanywork.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToCompanyWork](./bitburner.sleeve.settocompanywork.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [setToCompanyWork](./bitburner.sleeve.settocompanywork.md) -## Sleeve.setToCompanyWork() method +## sleeve.setToCompanyWork() method Set a sleeve to work for a company. diff --git a/markdown/bitburner.sleeve.settofactionwork.md b/markdown/bitburner.sleeve.settofactionwork.md index b3c5e56f1..220ac859f 100644 --- a/markdown/bitburner.sleeve.settofactionwork.md +++ b/markdown/bitburner.sleeve.settofactionwork.md @@ -1,15 +1,19 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToFactionWork](./bitburner.sleeve.settofactionwork.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [setToFactionWork](./bitburner.sleeve.settofactionwork.md) -## Sleeve.setToFactionWork() method +## sleeve.setToFactionWork() method Set a sleeve to work for a faction. Signature: ```typescript -setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean | undefined; +setToFactionWork( + sleeveNumber: number, + factionName: string, + factionWorkType: FactionWorkType | `${FactionWorkType}`, + ): boolean | undefined; ``` ## Parameters @@ -18,7 +22,7 @@ setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: str | --- | --- | --- | | sleeveNumber | number | Index of the sleeve to work for the faction. | | factionName | string | Name of the faction to work for. | -| factionWorkType | string | Name of the action to perform for this faction. | +| factionWorkType | [FactionWorkType](./bitburner.factionworktype.md) \| \`${[FactionWorkType](./bitburner.factionworktype.md)}\` | Name of the action to perform for this faction. | Returns: diff --git a/markdown/bitburner.sleeve.settogymworkout.md b/markdown/bitburner.sleeve.settogymworkout.md index b092838eb..fd85512d4 100644 --- a/markdown/bitburner.sleeve.settogymworkout.md +++ b/markdown/bitburner.sleeve.settogymworkout.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToGymWorkout](./bitburner.sleeve.settogymworkout.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [setToGymWorkout](./bitburner.sleeve.settogymworkout.md) -## Sleeve.setToGymWorkout() method +## sleeve.setToGymWorkout() method Set a sleeve to workout at the gym. diff --git a/markdown/bitburner.sleeve.settoshockrecovery.md b/markdown/bitburner.sleeve.settoshockrecovery.md index 93a1ef01c..943036656 100644 --- a/markdown/bitburner.sleeve.settoshockrecovery.md +++ b/markdown/bitburner.sleeve.settoshockrecovery.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToShockRecovery](./bitburner.sleeve.settoshockrecovery.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [setToShockRecovery](./bitburner.sleeve.settoshockrecovery.md) -## Sleeve.setToShockRecovery() method +## sleeve.setToShockRecovery() method Set a sleeve to shock recovery. diff --git a/markdown/bitburner.sleeve.settosynchronize.md b/markdown/bitburner.sleeve.settosynchronize.md index 17fa4ca6d..1630d90a4 100644 --- a/markdown/bitburner.sleeve.settosynchronize.md +++ b/markdown/bitburner.sleeve.settosynchronize.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToSynchronize](./bitburner.sleeve.settosynchronize.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [setToSynchronize](./bitburner.sleeve.settosynchronize.md) -## Sleeve.setToSynchronize() method +## sleeve.setToSynchronize() method Set a sleeve to synchronize. diff --git a/markdown/bitburner.sleeve.settouniversitycourse.md b/markdown/bitburner.sleeve.settouniversitycourse.md index f96d60a8b..8ad9440a8 100644 --- a/markdown/bitburner.sleeve.settouniversitycourse.md +++ b/markdown/bitburner.sleeve.settouniversitycourse.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [setToUniversityCourse](./bitburner.sleeve.settouniversitycourse.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [setToUniversityCourse](./bitburner.sleeve.settouniversitycourse.md) -## Sleeve.setToUniversityCourse() method +## sleeve.setToUniversityCourse() method Set a sleeve to take a class at a university. diff --git a/markdown/bitburner.sleeveskills.shock.md b/markdown/bitburner.sleeve.shock.md similarity index 56% rename from markdown/bitburner.sleeveskills.shock.md rename to markdown/bitburner.sleeve.shock.md index 730175a5a..bd748fb90 100644 --- a/markdown/bitburner.sleeveskills.shock.md +++ b/markdown/bitburner.sleeve.shock.md @@ -1,10 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [shock](./bitburner.sleeveskills.shock.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [shock](./bitburner.sleeve.shock.md) -## SleeveSkills.shock property - -Current shock of the sleeve \[0-100\] +## Sleeve.shock property Signature: diff --git a/markdown/bitburner.sleeveskills.sync.md b/markdown/bitburner.sleeve.sync.md similarity index 57% rename from markdown/bitburner.sleeveskills.sync.md rename to markdown/bitburner.sleeve.sync.md index 3bf2c07c5..c6cd8c9a2 100644 --- a/markdown/bitburner.sleeveskills.sync.md +++ b/markdown/bitburner.sleeve.sync.md @@ -1,10 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [sync](./bitburner.sleeveskills.sync.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [sync](./bitburner.sleeve.sync.md) -## SleeveSkills.sync property - -Current sync of the sleeve \[0-100\] +## Sleeve.sync property Signature: diff --git a/markdown/bitburner.sleeve.travel.md b/markdown/bitburner.sleeve.travel.md index e3d98cbfa..56229adbb 100644 --- a/markdown/bitburner.sleeve.travel.md +++ b/markdown/bitburner.sleeve.travel.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [Sleeve](./bitburner.sleeve.md) > [travel](./bitburner.sleeve.travel.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [sleeve](./bitburner.sleeve.md) > [travel](./bitburner.sleeve.travel.md) -## Sleeve.travel() method +## sleeve.travel() method Make a sleeve travel to another city. diff --git a/markdown/bitburner.sleevebladeburnertask.md b/markdown/bitburner.sleevebladeburnertask.md new file mode 100644 index 000000000..62bbd4193 --- /dev/null +++ b/markdown/bitburner.sleevebladeburnertask.md @@ -0,0 +1,16 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveBladeburnerTask](./bitburner.sleevebladeburnertask.md) + +## SleeveBladeburnerTask type + + +Signature: + +```typescript +type SleeveBladeburnerTask = { + type: "BLADEBURNER"; + actionType: "General" | "Contracts"; + actionName: string; +}; +``` diff --git a/markdown/bitburner.sleeveclasstask.md b/markdown/bitburner.sleeveclasstask.md new file mode 100644 index 000000000..304d374b6 --- /dev/null +++ b/markdown/bitburner.sleeveclasstask.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveClassTask](./bitburner.sleeveclasstask.md) + +## SleeveClassTask type + + +Signature: + +```typescript +type SleeveClassTask = { + type: "CLASS"; + classType: UniversityClassType | GymType | `${UniversityClassType}` | `${GymType}`; + location: LocationName | `${LocationName}`; +}; +``` +References: [UniversityClassType](./bitburner.universityclasstype.md), [GymType](./bitburner.gymtype.md), [LocationName](./bitburner.locationname.md) + diff --git a/markdown/bitburner.sleeveinformation.hp.md b/markdown/bitburner.sleevecompanytask.md similarity index 55% rename from markdown/bitburner.sleeveinformation.hp.md rename to markdown/bitburner.sleevecompanytask.md index 0a598b2c2..97ec5c680 100644 --- a/markdown/bitburner.sleeveinformation.hp.md +++ b/markdown/bitburner.sleevecompanytask.md @@ -1,13 +1,12 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveInformation](./bitburner.sleeveinformation.md) > [hp](./bitburner.sleeveinformation.hp.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveCompanyTask](./bitburner.sleevecompanytask.md) -## SleeveInformation.hp property +## SleeveCompanyTask type -hp of the sleeve Signature: ```typescript -hp: HP; +type SleeveCompanyTask = { type: "COMPANY"; companyName: string }; ``` diff --git a/markdown/bitburner.sleevecrimetask.md b/markdown/bitburner.sleevecrimetask.md new file mode 100644 index 000000000..f23063f3e --- /dev/null +++ b/markdown/bitburner.sleevecrimetask.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveCrimeTask](./bitburner.sleevecrimetask.md) + +## SleeveCrimeTask type + + +Signature: + +```typescript +type SleeveCrimeTask = { type: "CRIME"; crimeType: CrimeType | `${CrimeType}` }; +``` +References: [CrimeType](./bitburner.crimetype.md) + diff --git a/markdown/bitburner.sleevefactiontask.md b/markdown/bitburner.sleevefactiontask.md new file mode 100644 index 000000000..132ca9e62 --- /dev/null +++ b/markdown/bitburner.sleevefactiontask.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveFactionTask](./bitburner.sleevefactiontask.md) + +## SleeveFactionTask type + + +Signature: + +```typescript +type SleeveFactionTask = { + type: "FACTION"; + factionWorkType: FactionWorkType | `${FactionWorkType}`; + factionName: string; +}; +``` +References: [FactionWorkType](./bitburner.factionworktype.md) + diff --git a/markdown/bitburner.sleeveskills.agility.md b/markdown/bitburner.sleeveinfiltratetask.md similarity index 52% rename from markdown/bitburner.sleeveskills.agility.md rename to markdown/bitburner.sleeveinfiltratetask.md index f687b5214..4e46e3861 100644 --- a/markdown/bitburner.sleeveskills.agility.md +++ b/markdown/bitburner.sleeveinfiltratetask.md @@ -1,13 +1,12 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [agility](./bitburner.sleeveskills.agility.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveInfiltrateTask](./bitburner.sleeveinfiltratetask.md) -## SleeveSkills.agility property +## SleeveInfiltrateTask type -Current agility of the sleeve Signature: ```typescript -agility: number; +type SleeveInfiltrateTask = { type: "INFILTRATE" }; ``` diff --git a/markdown/bitburner.sleeveinformation.city.md b/markdown/bitburner.sleeveinformation.city.md deleted file mode 100644 index e55b917c7..000000000 --- a/markdown/bitburner.sleeveinformation.city.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveInformation](./bitburner.sleeveinformation.md) > [city](./bitburner.sleeveinformation.city.md) - -## SleeveInformation.city property - -Location of the sleeve - -Signature: - -```typescript -city: string; -``` diff --git a/markdown/bitburner.sleeveinformation.jobs.md b/markdown/bitburner.sleeveinformation.jobs.md deleted file mode 100644 index 07717259d..000000000 --- a/markdown/bitburner.sleeveinformation.jobs.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveInformation](./bitburner.sleeveinformation.md) > [jobs](./bitburner.sleeveinformation.jobs.md) - -## SleeveInformation.jobs property - -Jobs available to the sleeve - -Signature: - -```typescript -jobs: string[]; -``` diff --git a/markdown/bitburner.sleeveinformation.jobtitle.md b/markdown/bitburner.sleeveinformation.jobtitle.md deleted file mode 100644 index 7f1d2f444..000000000 --- a/markdown/bitburner.sleeveinformation.jobtitle.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveInformation](./bitburner.sleeveinformation.md) > [jobTitle](./bitburner.sleeveinformation.jobtitle.md) - -## SleeveInformation.jobTitle property - -Job titles available to the sleeve - -Signature: - -```typescript -jobTitle: string[]; -``` diff --git a/markdown/bitburner.sleeveinformation.md b/markdown/bitburner.sleeveinformation.md deleted file mode 100644 index 1c93331e7..000000000 --- a/markdown/bitburner.sleeveinformation.md +++ /dev/null @@ -1,25 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveInformation](./bitburner.sleeveinformation.md) - -## SleeveInformation interface - -Object representing sleeve information. - -Signature: - -```typescript -export interface SleeveInformation -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [city](./bitburner.sleeveinformation.city.md) | string | Location of the sleeve | -| [hp](./bitburner.sleeveinformation.hp.md) | [HP](./bitburner.hp.md) | hp of the sleeve | -| [jobs](./bitburner.sleeveinformation.jobs.md) | string\[\] | Jobs available to the sleeve | -| [jobTitle](./bitburner.sleeveinformation.jobtitle.md) | string\[\] | Job titles available to the sleeve | -| [mult](./bitburner.sleeveinformation.mult.md) | [CharacterMult](./bitburner.charactermult.md) | Sleeve multipliers | -| [tor](./bitburner.sleeveinformation.tor.md) | boolean | Does this sleeve have access to the tor router | - diff --git a/markdown/bitburner.sleeveinformation.mult.md b/markdown/bitburner.sleeveinformation.mult.md deleted file mode 100644 index 32255f3b3..000000000 --- a/markdown/bitburner.sleeveinformation.mult.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveInformation](./bitburner.sleeveinformation.md) > [mult](./bitburner.sleeveinformation.mult.md) - -## SleeveInformation.mult property - -Sleeve multipliers - -Signature: - -```typescript -mult: CharacterMult; -``` diff --git a/markdown/bitburner.sleeveinformation.tor.md b/markdown/bitburner.sleeveinformation.tor.md deleted file mode 100644 index 5b084487e..000000000 --- a/markdown/bitburner.sleeveinformation.tor.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveInformation](./bitburner.sleeveinformation.md) > [tor](./bitburner.sleeveinformation.tor.md) - -## SleeveInformation.tor property - -Does this sleeve have access to the tor router - -Signature: - -```typescript -tor: boolean; -``` diff --git a/markdown/bitburner.sleeveskills.defense.md b/markdown/bitburner.sleeverecoverytask.md similarity index 52% rename from markdown/bitburner.sleeveskills.defense.md rename to markdown/bitburner.sleeverecoverytask.md index d68f03b2b..8a17033c0 100644 --- a/markdown/bitburner.sleeveskills.defense.md +++ b/markdown/bitburner.sleeverecoverytask.md @@ -1,13 +1,12 @@ -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [defense](./bitburner.sleeveskills.defense.md) +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveRecoveryTask](./bitburner.sleeverecoverytask.md) -## SleeveSkills.defense property +## SleeveRecoveryTask type -Current defense of the sleeve Signature: ```typescript -defense: number; +type SleeveRecoveryTask = { type: "RECOVERY" }; ``` diff --git a/markdown/bitburner.sleeveskills.charisma.md b/markdown/bitburner.sleeveskills.charisma.md deleted file mode 100644 index 8916dcb67..000000000 --- a/markdown/bitburner.sleeveskills.charisma.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [charisma](./bitburner.sleeveskills.charisma.md) - -## SleeveSkills.charisma property - -Current charisma of the sleeve - -Signature: - -```typescript -charisma: number; -``` diff --git a/markdown/bitburner.sleeveskills.dexterity.md b/markdown/bitburner.sleeveskills.dexterity.md deleted file mode 100644 index aa7430eee..000000000 --- a/markdown/bitburner.sleeveskills.dexterity.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [dexterity](./bitburner.sleeveskills.dexterity.md) - -## SleeveSkills.dexterity property - -Current dexterity of the sleeve - -Signature: - -```typescript -dexterity: number; -``` diff --git a/markdown/bitburner.sleeveskills.hacking.md b/markdown/bitburner.sleeveskills.hacking.md deleted file mode 100644 index 2ed1e2b1a..000000000 --- a/markdown/bitburner.sleeveskills.hacking.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [hacking](./bitburner.sleeveskills.hacking.md) - -## SleeveSkills.hacking property - -Current hacking skill of the sleeve - -Signature: - -```typescript -hacking: number; -``` diff --git a/markdown/bitburner.sleeveskills.md b/markdown/bitburner.sleeveskills.md deleted file mode 100644 index 0b0980728..000000000 --- a/markdown/bitburner.sleeveskills.md +++ /dev/null @@ -1,28 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) - -## SleeveSkills interface - -Object representing a sleeve stats. - -Signature: - -```typescript -export interface SleeveSkills -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [agility](./bitburner.sleeveskills.agility.md) | number | Current agility of the sleeve | -| [charisma](./bitburner.sleeveskills.charisma.md) | number | Current charisma of the sleeve | -| [defense](./bitburner.sleeveskills.defense.md) | number | Current defense of the sleeve | -| [dexterity](./bitburner.sleeveskills.dexterity.md) | number | Current dexterity of the sleeve | -| [hacking](./bitburner.sleeveskills.hacking.md) | number | Current hacking skill of the sleeve | -| [memory](./bitburner.sleeveskills.memory.md) | number | Current memory of the sleeve \[1-100\] | -| [shock](./bitburner.sleeveskills.shock.md) | number | Current shock of the sleeve \[0-100\] | -| [strength](./bitburner.sleeveskills.strength.md) | number | Current strength of the sleeve | -| [sync](./bitburner.sleeveskills.sync.md) | number | Current sync of the sleeve \[0-100\] | - diff --git a/markdown/bitburner.sleeveskills.strength.md b/markdown/bitburner.sleeveskills.strength.md deleted file mode 100644 index 56720e1ce..000000000 --- a/markdown/bitburner.sleeveskills.strength.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSkills](./bitburner.sleeveskills.md) > [strength](./bitburner.sleeveskills.strength.md) - -## SleeveSkills.strength property - -Current strength of the sleeve - -Signature: - -```typescript -strength: number; -``` diff --git a/markdown/bitburner.sleevesupporttask.md b/markdown/bitburner.sleevesupporttask.md new file mode 100644 index 000000000..d1df450d8 --- /dev/null +++ b/markdown/bitburner.sleevesupporttask.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSupportTask](./bitburner.sleevesupporttask.md) + +## SleeveSupportTask type + + +Signature: + +```typescript +type SleeveSupportTask = { type: "SUPPORT" }; +``` diff --git a/markdown/bitburner.sleevesynchrotask.md b/markdown/bitburner.sleevesynchrotask.md new file mode 100644 index 000000000..ef4b49f7b --- /dev/null +++ b/markdown/bitburner.sleevesynchrotask.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveSynchroTask](./bitburner.sleevesynchrotask.md) + +## SleeveSynchroTask type + + +Signature: + +```typescript +type SleeveSynchroTask = { type: "SYNCHRO" }; +``` diff --git a/markdown/bitburner.sleevetask.md b/markdown/bitburner.sleevetask.md index b27a9ff24..d1ff3086f 100644 --- a/markdown/bitburner.sleevetask.md +++ b/markdown/bitburner.sleevetask.md @@ -9,5 +9,16 @@ Object representing a sleeve current task. Signature: ```typescript -export type SleeveTask = any; +export type SleeveTask = + | SleeveBladeburnerTask + | SleeveClassTask + | SleeveCompanyTask + | SleeveCrimeTask + | SleeveFactionTask + | SleeveInfiltrateTask + | SleeveRecoveryTask + | SleeveSupportTask + | SleeveSynchroTask; ``` +References: [SleeveBladeburnerTask](./bitburner.sleevebladeburnertask.md), [SleeveClassTask](./bitburner.sleeveclasstask.md), [SleeveCompanyTask](./bitburner.sleevecompanytask.md), [SleeveCrimeTask](./bitburner.sleevecrimetask.md), [SleeveFactionTask](./bitburner.sleevefactiontask.md), [SleeveInfiltrateTask](./bitburner.sleeveinfiltratetask.md), [SleeveRecoveryTask](./bitburner.sleeverecoverytask.md), [SleeveSupportTask](./bitburner.sleevesupporttask.md), [SleeveSynchroTask](./bitburner.sleevesynchrotask.md) + diff --git a/markdown/bitburner.sleeveworkgains.md b/markdown/bitburner.sleeveworkgains.md deleted file mode 100644 index 775f32199..000000000 --- a/markdown/bitburner.sleeveworkgains.md +++ /dev/null @@ -1,25 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveWorkGains](./bitburner.sleeveworkgains.md) - -## SleeveWorkGains interface - - -Signature: - -```typescript -export interface SleeveWorkGains -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [workAgiExpGain](./bitburner.sleeveworkgains.workagiexpgain.md) | number | Agility exp gained from work | -| [workChaExpGain](./bitburner.sleeveworkgains.workchaexpgain.md) | number | Charisma exp gained from work | -| [workDefExpGain](./bitburner.sleeveworkgains.workdefexpgain.md) | number | Defense exp gained from work, | -| [workDexExpGain](./bitburner.sleeveworkgains.workdexexpgain.md) | number | Dexterity exp gained from work | -| [workHackExpGain](./bitburner.sleeveworkgains.workhackexpgain.md) | number | Hacking exp gained from work | -| [workMoneyGain](./bitburner.sleeveworkgains.workmoneygain.md) | number | Money gained from work | -| [workStrExpGain](./bitburner.sleeveworkgains.workstrexpgain.md) | number | Strength exp gained from work | - diff --git a/markdown/bitburner.sleeveworkgains.workagiexpgain.md b/markdown/bitburner.sleeveworkgains.workagiexpgain.md deleted file mode 100644 index 62e6f54e3..000000000 --- a/markdown/bitburner.sleeveworkgains.workagiexpgain.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveWorkGains](./bitburner.sleeveworkgains.md) > [workAgiExpGain](./bitburner.sleeveworkgains.workagiexpgain.md) - -## SleeveWorkGains.workAgiExpGain property - -Agility exp gained from work - -Signature: - -```typescript -workAgiExpGain: number; -``` diff --git a/markdown/bitburner.sleeveworkgains.workchaexpgain.md b/markdown/bitburner.sleeveworkgains.workchaexpgain.md deleted file mode 100644 index 424c1d04c..000000000 --- a/markdown/bitburner.sleeveworkgains.workchaexpgain.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveWorkGains](./bitburner.sleeveworkgains.md) > [workChaExpGain](./bitburner.sleeveworkgains.workchaexpgain.md) - -## SleeveWorkGains.workChaExpGain property - -Charisma exp gained from work - -Signature: - -```typescript -workChaExpGain: number; -``` diff --git a/markdown/bitburner.sleeveworkgains.workdefexpgain.md b/markdown/bitburner.sleeveworkgains.workdefexpgain.md deleted file mode 100644 index 1e515d29e..000000000 --- a/markdown/bitburner.sleeveworkgains.workdefexpgain.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveWorkGains](./bitburner.sleeveworkgains.md) > [workDefExpGain](./bitburner.sleeveworkgains.workdefexpgain.md) - -## SleeveWorkGains.workDefExpGain property - -Defense exp gained from work, - -Signature: - -```typescript -workDefExpGain: number; -``` diff --git a/markdown/bitburner.sleeveworkgains.workdexexpgain.md b/markdown/bitburner.sleeveworkgains.workdexexpgain.md deleted file mode 100644 index 461c3e7ea..000000000 --- a/markdown/bitburner.sleeveworkgains.workdexexpgain.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveWorkGains](./bitburner.sleeveworkgains.md) > [workDexExpGain](./bitburner.sleeveworkgains.workdexexpgain.md) - -## SleeveWorkGains.workDexExpGain property - -Dexterity exp gained from work - -Signature: - -```typescript -workDexExpGain: number; -``` diff --git a/markdown/bitburner.sleeveworkgains.workhackexpgain.md b/markdown/bitburner.sleeveworkgains.workhackexpgain.md deleted file mode 100644 index 4823ea704..000000000 --- a/markdown/bitburner.sleeveworkgains.workhackexpgain.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveWorkGains](./bitburner.sleeveworkgains.md) > [workHackExpGain](./bitburner.sleeveworkgains.workhackexpgain.md) - -## SleeveWorkGains.workHackExpGain property - -Hacking exp gained from work - -Signature: - -```typescript -workHackExpGain: number; -``` diff --git a/markdown/bitburner.sleeveworkgains.workmoneygain.md b/markdown/bitburner.sleeveworkgains.workmoneygain.md deleted file mode 100644 index 8b9cc403e..000000000 --- a/markdown/bitburner.sleeveworkgains.workmoneygain.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveWorkGains](./bitburner.sleeveworkgains.md) > [workMoneyGain](./bitburner.sleeveworkgains.workmoneygain.md) - -## SleeveWorkGains.workMoneyGain property - -Money gained from work - -Signature: - -```typescript -workMoneyGain: number; -``` diff --git a/markdown/bitburner.sleeveworkgains.workstrexpgain.md b/markdown/bitburner.sleeveworkgains.workstrexpgain.md deleted file mode 100644 index 5390c0800..000000000 --- a/markdown/bitburner.sleeveworkgains.workstrexpgain.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [SleeveWorkGains](./bitburner.sleeveworkgains.md) > [workStrExpGain](./bitburner.sleeveworkgains.workstrexpgain.md) - -## SleeveWorkGains.workStrExpGain property - -Strength exp gained from work - -Signature: - -```typescript -workStrExpGain: number; -``` diff --git a/markdown/bitburner.sourcefilelvl.md b/markdown/bitburner.sourcefilelvl.md index 2be5ba883..ca986ed8b 100644 --- a/markdown/bitburner.sourcefilelvl.md +++ b/markdown/bitburner.sourcefilelvl.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface SourceFileLvl +interface SourceFileLvl ``` ## Properties diff --git a/markdown/bitburner.stockorder.md b/markdown/bitburner.stockorder.md index 98a3ebda9..1c5b3d981 100644 --- a/markdown/bitburner.stockorder.md +++ b/markdown/bitburner.stockorder.md @@ -11,5 +11,5 @@ Keys are stock symbols, properties are arrays of [StockOrderObject](./bitburner. Signature: ```typescript -export interface StockOrder +interface StockOrder ``` diff --git a/markdown/bitburner.stockorderobject.md b/markdown/bitburner.stockorderobject.md index f7d5e6eda..c8a0a44f5 100644 --- a/markdown/bitburner.stockorderobject.md +++ b/markdown/bitburner.stockorderobject.md @@ -9,7 +9,7 @@ Value in map of [StockOrder](./bitburner.stockorder.md) Signature: ```typescript -export interface StockOrderObject +interface StockOrderObject ``` ## Properties diff --git a/markdown/bitburner.toastvariant.md b/markdown/bitburner.toastvariant.md index 70d43a5ff..6e0675aee 100644 --- a/markdown/bitburner.toastvariant.md +++ b/markdown/bitburner.toastvariant.md @@ -2,13 +2,21 @@ [Home](./index.md) > [bitburner](./bitburner.md) > [ToastVariant](./bitburner.toastvariant.md) -## ToastVariant type +## ToastVariant enum Signature: ```typescript -type ToastVariant = ValuesFrom; +declare enum ToastVariant ``` -References: [ValuesFrom](./bitburner.valuesfrom.md) + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| ERROR | "error" | | +| INFO | "info" | | +| SUCCESS | "success" | | +| WARNING | "warning" | | diff --git a/markdown/bitburner.universityclasstype.md b/markdown/bitburner.universityclasstype.md new file mode 100644 index 000000000..50700a8eb --- /dev/null +++ b/markdown/bitburner.universityclasstype.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [UniversityClassType](./bitburner.universityclasstype.md) + +## UniversityClassType enum + + +Signature: + +```typescript +declare enum UniversityClassType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| algorithms | "Algorithms" | | +| computerScience | "Computer Science" | | +| dataStructures | "Data Structures" | | +| leadership | "Leadership" | | +| management | "Management" | | +| networks | "Networks" | | + diff --git a/markdown/bitburner.valuesfrom.md b/markdown/bitburner.valuesfrom.md deleted file mode 100644 index 6824cf501..000000000 --- a/markdown/bitburner.valuesfrom.md +++ /dev/null @@ -1,12 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [ValuesFrom](./bitburner.valuesfrom.md) - -## ValuesFrom type - - -Signature: - -```typescript -export type ValuesFrom = T[keyof T]; -``` diff --git a/markdown/bitburner.workformulas.classgains.md b/markdown/bitburner.workformulas.classgains.md deleted file mode 100644 index d75920601..000000000 --- a/markdown/bitburner.workformulas.classgains.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [bitburner](./bitburner.md) > [WorkFormulas](./bitburner.workformulas.md) > [classGains](./bitburner.workformulas.classgains.md) - -## WorkFormulas.classGains() method - -Signature: - -```typescript -classGains(player: Player, classType: string, locationName: string): WorkStats; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| player | [Player](./bitburner.player.md) | | -| classType | string | | -| locationName | string | | - -Returns: - -[WorkStats](./bitburner.workstats.md) - diff --git a/markdown/bitburner.workformulas.companygains.md b/markdown/bitburner.workformulas.companygains.md new file mode 100644 index 000000000..8b1dc5be4 --- /dev/null +++ b/markdown/bitburner.workformulas.companygains.md @@ -0,0 +1,32 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [WorkFormulas](./bitburner.workformulas.md) > [companyGains](./bitburner.workformulas.companygains.md) + +## WorkFormulas.companyGains() method + +Signature: + +```typescript +companyGains( + person: Person, + companyName: string, + workType: CompanyPosName | `${CompanyPosName}`, + favor: number, + ): WorkStats; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| person | [Person](./bitburner.person.md) | | +| companyName | string | | +| workType | [CompanyPosName](./bitburner.companyposname.md) \| \`${[CompanyPosName](./bitburner.companyposname.md)}\` | | +| favor | number | | + +Returns: + +[WorkStats](./bitburner.workstats.md) + +The WorkStats applied every game cycle (200ms) by performing the specified company work. + diff --git a/markdown/bitburner.workformulas.crimegains.md b/markdown/bitburner.workformulas.crimegains.md index 91487d0a8..79791cd14 100644 --- a/markdown/bitburner.workformulas.crimegains.md +++ b/markdown/bitburner.workformulas.crimegains.md @@ -7,16 +7,19 @@ Signature: ```typescript -crimeGains(crimeType: string): WorkStats; +crimeGains(person: Person, crimeType: CrimeType | `${CrimeType}`): WorkStats; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| crimeType | string | | +| person | [Person](./bitburner.person.md) | | +| crimeType | [CrimeType](./bitburner.crimetype.md) \| \`${[CrimeType](./bitburner.crimetype.md)}\` | | Returns: [WorkStats](./bitburner.workstats.md) +The WorkStats gained when completing one instance of the specified crime. + diff --git a/markdown/bitburner.workformulas.crimesuccesschance.md b/markdown/bitburner.workformulas.crimesuccesschance.md new file mode 100644 index 000000000..b8beb1869 --- /dev/null +++ b/markdown/bitburner.workformulas.crimesuccesschance.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [WorkFormulas](./bitburner.workformulas.md) > [crimeSuccessChance](./bitburner.workformulas.crimesuccesschance.md) + +## WorkFormulas.crimeSuccessChance() method + +Signature: + +```typescript +crimeSuccessChance(person: Person, crimeType: CrimeType | `${CrimeType}`): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| person | [Person](./bitburner.person.md) | | +| crimeType | [CrimeType](./bitburner.crimetype.md) \| \`${[CrimeType](./bitburner.crimetype.md)}\` | | + +Returns: + +number + diff --git a/markdown/bitburner.workformulas.factiongains.md b/markdown/bitburner.workformulas.factiongains.md index e8d6b5703..313d72a1d 100644 --- a/markdown/bitburner.workformulas.factiongains.md +++ b/markdown/bitburner.workformulas.factiongains.md @@ -7,18 +7,20 @@ Signature: ```typescript -factionGains(player: Player, workType: string, favor: number): WorkStats; +factionGains(person: Person, workType: FactionWorkType | `${FactionWorkType}`, favor: number): WorkStats; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| player | [Player](./bitburner.player.md) | | -| workType | string | | +| person | [Person](./bitburner.person.md) | | +| workType | [FactionWorkType](./bitburner.factionworktype.md) \| \`${[FactionWorkType](./bitburner.factionworktype.md)}\` | | | favor | number | | Returns: [WorkStats](./bitburner.workstats.md) +The WorkStats applied every game cycle (200ms) by performing the specified faction work. + diff --git a/markdown/bitburner.workformulas.gymgains.md b/markdown/bitburner.workformulas.gymgains.md new file mode 100644 index 000000000..690688ce5 --- /dev/null +++ b/markdown/bitburner.workformulas.gymgains.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [WorkFormulas](./bitburner.workformulas.md) > [gymGains](./bitburner.workformulas.gymgains.md) + +## WorkFormulas.gymGains() method + +Signature: + +```typescript +gymGains(person: Person, gymType: GymType | `${GymType}`, locationName: string): WorkStats; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| person | [Person](./bitburner.person.md) | | +| gymType | [GymType](./bitburner.gymtype.md) \| \`${[GymType](./bitburner.gymtype.md)}\` | | +| locationName | string | | + +Returns: + +[WorkStats](./bitburner.workstats.md) + +The WorkStats applied every game cycle (200ms) by taking the specified gym class. + diff --git a/markdown/bitburner.workformulas.md b/markdown/bitburner.workformulas.md index f1eaa6d07..11c4557ec 100644 --- a/markdown/bitburner.workformulas.md +++ b/markdown/bitburner.workformulas.md @@ -16,7 +16,10 @@ interface WorkFormulas | Method | Description | | --- | --- | -| [classGains(player, classType, locationName)](./bitburner.workformulas.classgains.md) | | -| [crimeGains(crimeType)](./bitburner.workformulas.crimegains.md) | | -| [factionGains(player, workType, favor)](./bitburner.workformulas.factiongains.md) | | +| [companyGains(person, companyName, workType, favor)](./bitburner.workformulas.companygains.md) | | +| [crimeGains(person, crimeType)](./bitburner.workformulas.crimegains.md) | | +| [crimeSuccessChance(person, crimeType)](./bitburner.workformulas.crimesuccesschance.md) | | +| [factionGains(person, workType, favor)](./bitburner.workformulas.factiongains.md) | | +| [gymGains(person, gymType, locationName)](./bitburner.workformulas.gymgains.md) | | +| [universityGains(person, classType, locationName)](./bitburner.workformulas.universitygains.md) | | diff --git a/markdown/bitburner.workformulas.universitygains.md b/markdown/bitburner.workformulas.universitygains.md new file mode 100644 index 000000000..bb2cbebfd --- /dev/null +++ b/markdown/bitburner.workformulas.universitygains.md @@ -0,0 +1,30 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [WorkFormulas](./bitburner.workformulas.md) > [universityGains](./bitburner.workformulas.universitygains.md) + +## WorkFormulas.universityGains() method + +Signature: + +```typescript +universityGains( + person: Person, + classType: UniversityClassType | `${UniversityClassType}`, + locationName: string, + ): WorkStats; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| person | [Person](./bitburner.person.md) | | +| classType | [UniversityClassType](./bitburner.universityclasstype.md) \| \`${[UniversityClassType](./bitburner.universityclasstype.md)}\` | | +| locationName | string | | + +Returns: + +[WorkStats](./bitburner.workstats.md) + +The WorkStats applied every game cycle (200ms) by taking the specified university class. + diff --git a/markdown/bitburner.workstats.md b/markdown/bitburner.workstats.md index 40d9f7d56..7e4156546 100644 --- a/markdown/bitburner.workstats.md +++ b/markdown/bitburner.workstats.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface WorkStats +interface WorkStats ``` ## Properties diff --git a/src/Company/data/CompaniesMetadata.ts b/src/Company/data/CompaniesMetadata.ts index 85af9e2ca..f6ce72ba0 100644 --- a/src/Company/data/CompaniesMetadata.ts +++ b/src/Company/data/CompaniesMetadata.ts @@ -1,7 +1,7 @@ import * as posNames from "./companypositionnames"; import { IConstructorParams } from "../Company"; -import { LocationName } from "../../Locations/data/LocationNames"; +import { LocationName } from "../../utils/enums"; // Create Objects containing Company Positions by category // Will help in metadata construction later diff --git a/src/Locations/City.ts b/src/Locations/City.ts index 44f69fa43..84009f1aa 100644 --- a/src/Locations/City.ts +++ b/src/Locations/City.ts @@ -1,5 +1,5 @@ import { CityName } from "./data/CityNames"; -import { LocationName } from "./data/LocationNames"; +import { LocationName } from "../utils/enums"; /** Class representing a City in the game */ export class City { diff --git a/src/Locations/Location.ts b/src/Locations/Location.ts index ae9ea5384..189610487 100644 --- a/src/Locations/Location.ts +++ b/src/Locations/Location.ts @@ -1,5 +1,5 @@ import { CityName } from "./data/CityNames"; -import { LocationName } from "./data/LocationNames"; +import { LocationName } from "../utils/enums"; import { LocationType } from "./LocationTypeEnum"; interface IInfiltrationMetadata { diff --git a/src/Locations/data/LocationNames.ts b/src/Locations/data/LocationNames.ts deleted file mode 100644 index abb02befa..000000000 --- a/src/Locations/data/LocationNames.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** Names of all locations */ -export enum LocationName { - // Aevum Locations - AevumAeroCorp = "AeroCorp", - AevumBachmanAndAssociates = "Bachman & Associates", - AevumClarkeIncorporated = "Clarke Incorporated", - AevumCrushFitnessGym = "Crush Fitness Gym", - AevumECorp = "ECorp", - AevumFulcrumTechnologies = "Fulcrum Technologies", - AevumGalacticCybersystems = "Galactic Cybersystems", - AevumNetLinkTechnologies = "NetLink Technologies", - AevumPolice = "Aevum Police Headquarters", - AevumRhoConstruction = "Rho Construction", - AevumSnapFitnessGym = "Snap Fitness Gym", - AevumSummitUniversity = "Summit University", - AevumWatchdogSecurity = "Watchdog Security", - AevumCasino = "Iker Molina Casino", - - // Chongqing locations - ChongqingKuaiGongInternational = "KuaiGong International", - ChongqingSolarisSpaceSystems = "Solaris Space Systems", - ChongqingChurchOfTheMachineGod = "Church of the Machine God", - - // Sector 12 - Sector12AlphaEnterprises = "Alpha Enterprises", - Sector12BladeIndustries = "Blade Industries", - Sector12CIA = "Central Intelligence Agency", - Sector12CarmichaelSecurity = "Carmichael Security", - Sector12CityHall = "Sector-12 City Hall", - Sector12DeltaOne = "DeltaOne", - Sector12FoodNStuff = "FoodNStuff", - Sector12FourSigma = "Four Sigma", - Sector12IcarusMicrosystems = "Icarus Microsystems", - Sector12IronGym = "Iron Gym", - Sector12JoesGuns = "Joe's Guns", - Sector12MegaCorp = "MegaCorp", - Sector12NSA = "National Security Agency", - Sector12PowerhouseGym = "Powerhouse Gym", - Sector12RothmanUniversity = "Rothman University", - Sector12UniversalEnergy = "Universal Energy", - - // New Tokyo - NewTokyoDefComm = "DefComm", - NewTokyoGlobalPharmaceuticals = "Global Pharmaceuticals", - NewTokyoNoodleBar = "Noodle Bar", - NewTokyoVitaLife = "VitaLife", - NewTokyoArcade = "Arcade", - - // Ishima - IshimaNovaMedical = "Nova Medical", - IshimaOmegaSoftware = "Omega Software", - IshimaStormTechnologies = "Storm Technologies", - IshimaGlitch = "0x6C1", - - // Volhaven - VolhavenCompuTek = "CompuTek", - VolhavenHeliosLabs = "Helios Labs", - VolhavenLexoCorp = "LexoCorp", - VolhavenMilleniumFitnessGym = "Millenium Fitness Gym", - VolhavenNWO = "NWO", - VolhavenOmniTekIncorporated = "OmniTek Incorporated", - VolhavenOmniaCybersystems = "Omnia Cybersystems", - VolhavenSysCoreSecurities = "SysCore Securities", - VolhavenZBInstituteOfTechnology = "ZB Institute of Technology", - - // Generic locations - Hospital = "Hospital", - Slums = "The Slums", - TravelAgency = "Travel Agency", - WorldStockExchange = "World Stock Exchange", - - // Default name for Location objects - Void = "The Void", -} diff --git a/src/Locations/data/LocationsMetadata.ts b/src/Locations/data/LocationsMetadata.ts index e06ee66fe..bea354fca 100644 --- a/src/Locations/data/LocationsMetadata.ts +++ b/src/Locations/data/LocationsMetadata.ts @@ -3,7 +3,7 @@ * in the game */ import { CityName } from "./CityNames"; -import { LocationName } from "./LocationNames"; +import { LocationName } from "../../utils/enums"; import { IConstructorParams } from "../Location"; import { LocationType } from "../LocationTypeEnum"; diff --git a/src/Locations/ui/City.tsx b/src/Locations/ui/City.tsx index ec6df5630..555e667fe 100644 --- a/src/Locations/ui/City.tsx +++ b/src/Locations/ui/City.tsx @@ -7,7 +7,7 @@ import * as React from "react"; import { City } from "../City"; import { Cities } from "../Cities"; -import { LocationName } from "../data/LocationNames"; +import { LocationName } from "../../utils/enums"; import { Locations } from "../Locations"; import { Location } from "../Location"; import { Settings } from "../../Settings/Settings"; diff --git a/src/Locations/ui/CompanyLocation.tsx b/src/Locations/ui/CompanyLocation.tsx index ba23830b1..0446d7c68 100644 --- a/src/Locations/ui/CompanyLocation.tsx +++ b/src/Locations/ui/CompanyLocation.tsx @@ -12,7 +12,7 @@ import Box from "@mui/material/Box"; import { ApplyToJobButton } from "./ApplyToJobButton"; import { Locations } from "../Locations"; -import { LocationName } from "../data/LocationNames"; +import { LocationName } from "../../utils/enums"; import { Companies } from "../../Company/Companies"; import { CompanyPositions } from "../../Company/CompanyPositions"; diff --git a/src/Locations/ui/SpecialLocation.tsx b/src/Locations/ui/SpecialLocation.tsx index 88fac804b..a9d389e6e 100644 --- a/src/Locations/ui/SpecialLocation.tsx +++ b/src/Locations/ui/SpecialLocation.tsx @@ -16,7 +16,7 @@ import Button from "@mui/material/Button"; import { Location } from "../Location"; import { CreateCorporationModal } from "../../Corporation/ui/modals/CreateCorporationModal"; -import { LocationName } from "../data/LocationNames"; +import { LocationName } from "../../utils/enums"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Factions } from "../../Faction/Factions"; import { joinFaction } from "../../Faction/FactionHelpers"; diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 54644e430..5d9164bdc 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -77,7 +77,7 @@ import { INetscriptExtra } from "./NetscriptFunctions/Extra"; import { ScriptDeath } from "./Netscript/ScriptDeath"; import { getBitNodeMultipliers } from "./BitNode/BitNode"; import { assert, arrayAssert, stringAssert, objectAssert } from "./utils/helpers/typeAssertion"; -import { CompanyPosNames, CrimeType, GymType, UniversityClassType } from "./utils/enums"; +import { CompanyPosName, CrimeType, GymType, LocationName, UniversityClassType } from "./utils/enums"; import { cloneDeep } from "lodash"; import { FactionWorkType } from "./utils/enums"; @@ -87,7 +87,8 @@ export const enums: NSEnums = { FactionWorkType, GymType, UniversityClassType, - CompanyPosNames, + CompanyPosName, + LocationName, }; export type NSFull = Readonly; diff --git a/src/NetscriptFunctions/Formulas.ts b/src/NetscriptFunctions/Formulas.ts index 2961a640d..6699286bd 100644 --- a/src/NetscriptFunctions/Formulas.ts +++ b/src/NetscriptFunctions/Formulas.ts @@ -43,13 +43,12 @@ import { calculateCrimeWorkStats } from "../Work/Formulas"; import { calculateCompanyWorkStats } from "../Work/Formulas"; import { Companies } from "../Company/Companies"; import { calculateClassEarnings } from "../Work/Formulas"; -import { LocationName } from "../Locations/data/LocationNames"; import { calculateFactionExp, calculateFactionRep } from "../Work/Formulas"; -import { FactionWorkType, GymType, UniversityClassType } from "../utils/enums"; +import { FactionWorkType, GymType, UniversityClassType, LocationName } from "../utils/enums"; import { defaultMultipliers } from "../PersonObjects/Multipliers"; import { checkEnum, findEnumMember } from "../utils/helpers/enum"; -import { CompanyPosNames } from "../utils/enums"; +import { CompanyPosName } from "../utils/enums"; import { CompanyPositions } from "../Company/CompanyPositions"; import { findCrime } from "../Crime/CrimeHelpers"; @@ -398,7 +397,7 @@ export function NetscriptFormulas(): InternalAPI { companyGains: (ctx) => (_person, _companyName, _positionName, _favor) => { checkFormulasAccess(ctx); const person = helpers.person(ctx, _person); - const positionName = findEnumMember(CompanyPosNames, helpers.string(ctx, "_positionName", _positionName)); + const positionName = findEnumMember(CompanyPosName, helpers.string(ctx, "_positionName", _positionName)); if (!positionName) throw new Error(`Invalid company position: ${_positionName}`); const position = CompanyPositions[positionName]; const companyName = helpers.string(ctx, "_companyName", _companyName); diff --git a/src/NetscriptFunctions/Infiltration.ts b/src/NetscriptFunctions/Infiltration.ts index 70bf12fcd..09bec5849 100644 --- a/src/NetscriptFunctions/Infiltration.ts +++ b/src/NetscriptFunctions/Infiltration.ts @@ -11,7 +11,7 @@ import { FactionNames } from "../Faction/data/FactionNames"; import { Factions } from "../Faction/Factions"; import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper"; import { checkEnum } from "../utils/helpers/enum"; -import { LocationName } from "../Locations/data/LocationNames"; +import { LocationName } from "../utils/enums"; import { helpers } from "../Netscript/NetscriptHelpers"; export function NetscriptInfiltration(): InternalAPI { diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index 211e17ea9..0754ea097 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -16,7 +16,7 @@ import { findCrime } from "../Crime/CrimeHelpers"; import { CompanyPositions } from "../Company/CompanyPositions"; import { DarkWebItems } from "../DarkWeb/DarkWebItems"; import { CityName } from "../Locations/data/CityNames"; -import { LocationName } from "../Locations/data/LocationNames"; +import { LocationName } from "../utils/enums"; import { Router } from "../ui/GameRoot"; import { SpecialServers } from "../Server/data/SpecialServers"; import { Page } from "../ui/Router"; diff --git a/src/PersonObjects/Grafting/ui/GraftingRoot.tsx b/src/PersonObjects/Grafting/ui/GraftingRoot.tsx index 575c03399..4861e6a93 100644 --- a/src/PersonObjects/Grafting/ui/GraftingRoot.tsx +++ b/src/PersonObjects/Grafting/ui/GraftingRoot.tsx @@ -7,7 +7,7 @@ import { AugmentationNames } from "../../../Augmentation/data/AugmentationNames" import { StaticAugmentations } from "../../../Augmentation/StaticAugmentations"; import { CONSTANTS } from "../../../Constants"; import { hasAugmentationPrereqs } from "../../../Faction/FactionHelpers"; -import { LocationName } from "../../../Locations/data/LocationNames"; +import { LocationName } from "../../../utils/enums"; import { Locations } from "../../../Locations/Locations"; import { PurchaseAugmentationsOrderSetting } from "../../../Settings/SettingEnums"; import { Settings } from "../../../Settings/Settings"; diff --git a/src/PersonObjects/Player/PlayerObject.ts b/src/PersonObjects/Player/PlayerObject.ts index b20b2201a..d7b7d0c03 100644 --- a/src/PersonObjects/Player/PlayerObject.ts +++ b/src/PersonObjects/Player/PlayerObject.ts @@ -10,7 +10,7 @@ import { Sleeve } from "../Sleeve/Sleeve"; import { PlayerOwnedSourceFile } from "../../SourceFile/PlayerOwnedSourceFile"; import { Exploit } from "../../Exploits/Exploit"; -import { LocationName } from "../../Locations/data/LocationNames"; +import { LocationName } from "../../utils/enums"; import { Corporation } from "../../Corporation/Corporation"; import { Gang } from "../../Gang/Gang"; import { Bladeburner } from "../../Bladeburner/Bladeburner"; diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts b/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts index 90726549a..708d0bbda 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts @@ -20,7 +20,7 @@ import { resetGangs } from "../../Gang/AllGangs"; import { Cities } from "../../Locations/Cities"; import { Locations } from "../../Locations/Locations"; import { CityName } from "../../Locations/data/CityNames"; -import { LocationName } from "../../Locations/data/LocationNames"; +import { LocationName } from "../../utils/enums"; import { Sleeve } from "../Sleeve/Sleeve"; import { isSleeveCompanyWork } from "../Sleeve/Work/SleeveCompanyWork"; import { calculateSkillProgress as calculateSkillProgressF, ISkillProgress } from "../formulas/skill"; diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 027c997b7..e9f387abe 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -23,7 +23,7 @@ import { CityName } from "../../Locations/data/CityNames"; import { Factions } from "../../Faction/Factions"; -import { LocationName } from "../../Locations/data/LocationNames"; +import { LocationName } from "../../utils/enums"; import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../../utils/JSONReviver"; import { numeralWrapper } from "../../ui/numeralFormat"; diff --git a/src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts b/src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts deleted file mode 100644 index ab8cffd19..000000000 --- a/src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** Enum for different types of tasks that a Sleeve can perform */ -export enum SleeveTaskType { - // Same Order as selectable order in UI - Idle, - Company, - Faction, - Crime, - Class, - Gym, - Bladeburner, - Recovery, - Synchro, -} diff --git a/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts b/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts index 85ba00070..b27c165a1 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveBladeburnerWork.ts @@ -7,7 +7,7 @@ import { GeneralActions } from "../../../Bladeburner/data/GeneralActions"; import { scaleWorkStats } from "../../../Work/WorkStats"; interface SleeveBladeburnerWorkParams { - type: string; + type: "General" | "Contracts"; name: string; } @@ -16,7 +16,7 @@ export const isSleeveBladeburnerWork = (w: Work | null): w is SleeveBladeburnerW export class SleeveBladeburnerWork extends Work { cyclesWorked = 0; - actionType: string; + actionType: "General" | "Contracts"; actionName: string; constructor(params?: SleeveBladeburnerWorkParams) { @@ -62,8 +62,9 @@ export class SleeveBladeburnerWork extends Work { } } - APICopy(): Record { + APICopy() { return { + type: WorkType.BLADEBURNER as "BLADEBURNER", actionType: this.actionType, actionName: this.actionName, }; diff --git a/src/PersonObjects/Sleeve/Work/SleeveClassWork.ts b/src/PersonObjects/Sleeve/Work/SleeveClassWork.ts index 245bd935f..3674eb28f 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveClassWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveClassWork.ts @@ -1,7 +1,7 @@ import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../../../utils/JSONReviver"; import { applySleeveGains, Work, WorkType } from "./Work"; import { ClassType } from "../../../Work/ClassWork"; -import { LocationName } from "../../../Locations/data/LocationNames"; +import { LocationName } from "../../../utils/enums"; import { calculateClassEarnings } from "../../../Work/Formulas"; import { Sleeve } from "../Sleeve"; import { scaleWorkStats, WorkStats } from "../../../Work/WorkStats"; @@ -38,9 +38,9 @@ export class SleeveClassWork extends Work { applySleeveGains(sleeve, rate, cycles); } - APICopy(): Record { + APICopy() { return { - type: this.type, + type: WorkType.CLASS as "CLASS", classType: this.classType, location: this.location, }; diff --git a/src/PersonObjects/Sleeve/Work/SleeveCompanyWork.ts b/src/PersonObjects/Sleeve/Work/SleeveCompanyWork.ts index fbeb92415..d2af314a9 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveCompanyWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveCompanyWork.ts @@ -1,7 +1,7 @@ import { Generic_fromJSON, Generic_toJSON, IReviverValue, Reviver } from "../../../utils/JSONReviver"; import { Sleeve } from "../Sleeve"; import { applySleeveGains, Work, WorkType } from "./Work"; -import { LocationName } from "../../../Locations/data/LocationNames"; +import { LocationName } from "../../../utils/enums"; import { Companies } from "../../../Company/Companies"; import { Company } from "../../../Company/Company"; import { calculateCompanyWorkStats } from "../../../Work/Formulas"; @@ -48,9 +48,9 @@ export class SleeveCompanyWork extends Work { influenceStockThroughCompanyWork(company, gains.reputation, cycles); } - APICopy(): Record { + APICopy() { return { - type: this.type, + type: WorkType.COMPANY as "COMPANY", companyName: this.companyName, }; } diff --git a/src/PersonObjects/Sleeve/Work/SleeveCrimeWork.ts b/src/PersonObjects/Sleeve/Work/SleeveCrimeWork.ts index ba83536b9..87446656f 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveCrimeWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveCrimeWork.ts @@ -47,9 +47,9 @@ export class SleeveCrimeWork extends Work { this.cyclesWorked -= this.cyclesNeeded(); } - APICopy(): Record { + APICopy() { return { - type: this.type, + type: WorkType.CRIME as "CRIME", crimeType: this.crimeType, }; } diff --git a/src/PersonObjects/Sleeve/Work/SleeveFactionWork.ts b/src/PersonObjects/Sleeve/Work/SleeveFactionWork.ts index 5e052dbb4..d8eb8a165 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveFactionWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveFactionWork.ts @@ -50,9 +50,9 @@ export class SleeveFactionWork extends Work { this.getFaction().playerReputation += rep * cycles; } - APICopy(): Record { + APICopy() { return { - type: this.type, + type: WorkType.FACTION as "FACTION", factionWorkType: this.factionWorkType, factionName: this.factionName, }; diff --git a/src/PersonObjects/Sleeve/Work/SleeveInfiltrateWork.ts b/src/PersonObjects/Sleeve/Work/SleeveInfiltrateWork.ts index 9b1c40dde..4c4e83d38 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveInfiltrateWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveInfiltrateWork.ts @@ -29,9 +29,9 @@ export class SleeveInfiltrateWork extends Work { } } - APICopy(): Record { + APICopy() { return { - type: this.type, + type: WorkType.INFILTRATE as "INFILTRATE", }; } diff --git a/src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts b/src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts index 8eb993f72..61893520e 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveRecoveryWork.ts @@ -15,9 +15,9 @@ export class SleeveRecoveryWork extends Work { if (sleeve.shock >= 100) sleeve.stopWork(); } - APICopy(): Record { + APICopy() { return { - type: this.type, + type: WorkType.RECOVERY as "RECOVERY", }; } diff --git a/src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts b/src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts index 365f46e86..995f4ad4f 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveSupportWork.ts @@ -19,9 +19,9 @@ export class SleeveSupportWork extends Work { Player.bladeburner?.sleeveSupport(false); } - APICopy(): Record { + APICopy() { return { - type: this.type, + type: WorkType.SUPPORT as "SUPPORT", }; } diff --git a/src/PersonObjects/Sleeve/Work/SleeveSynchroWork.ts b/src/PersonObjects/Sleeve/Work/SleeveSynchroWork.ts index 3e469d357..c5ee7d097 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveSynchroWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveSynchroWork.ts @@ -20,9 +20,9 @@ export class SleeveSynchroWork extends Work { if (sleeve.sync >= 100) sleeve.stopWork(); } - APICopy(): Record { + APICopy() { return { - type: this.type, + type: WorkType.SYNCHRO as "SYNCHRO", }; } diff --git a/src/PersonObjects/Sleeve/Work/Work.ts b/src/PersonObjects/Sleeve/Work/Work.ts index 9a140dbb8..8e3e3e7db 100644 --- a/src/PersonObjects/Sleeve/Work/Work.ts +++ b/src/PersonObjects/Sleeve/Work/Work.ts @@ -2,6 +2,7 @@ import { Player } from "@player"; import { IReviverValue } from "../../../utils/JSONReviver"; import { Sleeve } from "../Sleeve"; import { applyWorkStatsExp, WorkStats } from "../../../Work/WorkStats"; +import { SleeveTask } from "src/ScriptEditor/NetscriptDefinitions"; export const applySleeveGains = (sleeve: Sleeve, shockedStats: WorkStats, mult = 1): void => { applyWorkStatsExp(sleeve, shockedStats, mult); @@ -21,7 +22,7 @@ export abstract class Work { } abstract process(sleeve: Sleeve, cycles: number): void; - abstract APICopy(): Record; + abstract APICopy(): SleeveTask; abstract toJSON(): IReviverValue; finish(): void { /* left for children to implement */ diff --git a/src/PersonObjects/Sleeve/ui/TaskSelector.tsx b/src/PersonObjects/Sleeve/ui/TaskSelector.tsx index 4608b5999..f392b83f0 100644 --- a/src/PersonObjects/Sleeve/ui/TaskSelector.tsx +++ b/src/PersonObjects/Sleeve/ui/TaskSelector.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { Sleeve } from "../Sleeve"; import { Player } from "@player"; import { Crimes } from "../../../Crime/Crimes"; -import { LocationName } from "../../../Locations/data/LocationNames"; +import { LocationName } from "../../../utils/enums"; import { CityName } from "../../../Locations/data/CityNames"; import { Factions } from "../../../Faction/Factions"; import Select, { SelectChangeEvent } from "@mui/material/Select"; diff --git a/src/SaveObject.tsx b/src/SaveObject.tsx index f50d0f682..a7588a802 100755 --- a/src/SaveObject.tsx +++ b/src/SaveObject.tsx @@ -26,7 +26,7 @@ import { save } from "./db"; import { AwardNFG, v1APIBreak } from "./utils/v1APIBreak"; import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; import { PlayerOwnedAugmentation } from "./Augmentation/PlayerOwnedAugmentation"; -import { LocationName } from "./Locations/data/LocationNames"; +import { LocationName } from "./utils/enums"; import { PlayerObject } from "./PersonObjects/Player/PlayerObject"; import { pushGameSaved } from "./Electron"; import { defaultMonacoTheme } from "./ScriptEditor/ui/themes"; diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index ee051beaa..611d41fc8 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -1,11 +1,11 @@ /** @public */ -export interface HP { +interface HP { current: number; max: number; } /** @public */ -export interface Skills { +interface Skills { hacking: number; strength: number; defense: number; @@ -15,12 +15,7 @@ export interface Skills { intelligence: number; } -/** @public */ -export interface PossibleInfiltrationLocation { - city: string; - name: string; -} - +// TODO: provide same treatment to CodingContractData as for SleeveTask /** * Coding contract data will differ depending on coding contract. * @public @@ -96,7 +91,7 @@ interface MoneySources { } /** @public */ -export interface Multipliers { +interface Multipliers { /** Multiplier to hacking skill */ hacking: number; /** Multiplier to strength skill */ @@ -160,7 +155,7 @@ export interface Multipliers { } /** @public */ -export interface RunningScript { +interface RunningScript { /** Arguments the script was called with */ args: (string | number | boolean)[]; /** Filename of the script */ @@ -193,7 +188,7 @@ export interface RunningScript { } /** @public */ -export interface RecentScript extends RunningScript { +interface RecentScript extends RunningScript { /** Timestamp of when the script was killed */ timeOfDeath: Date; } @@ -202,7 +197,7 @@ export interface RecentScript extends RunningScript { * Data representing the internal values of a crime. * @public */ -export interface CrimeStats { +interface CrimeStats { /** Number representing the difficulty of the crime. Used for success chance calculations */ difficulty: number; /** Amount of karma lost for successfully committing this crime */ @@ -247,7 +242,7 @@ export interface CrimeStats { * Options to affect the behavior of {@link NS.hack | hack}, {@link NS.grow | grow}, and {@link NS.weaken | weaken}. * @public */ -export interface BasicHGWOptions { +interface BasicHGWOptions { /** Number of threads to use for this function. * Must be less than or equal to the number of threads the script is running with. */ threads?: number; @@ -259,7 +254,7 @@ export interface BasicHGWOptions { * Options to affect the behavior of {@link CodingContract} attempt. * @public */ -export interface CodingAttemptOptions { +interface CodingAttemptOptions { /** If truthy, then the function will return a string that states the contract’s reward when it is successfully solved. */ returnReward: boolean; } @@ -268,7 +263,7 @@ export interface CodingAttemptOptions { * Return value of {@link sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs} * @public */ -export interface AugmentPair { +interface AugmentPair { /** augmentation name */ name: string; /** augmentation cost */ @@ -276,13 +271,13 @@ export interface AugmentPair { } /** @public */ -export enum PositionTypes { +declare enum PositionTypes { Long = "L", Short = "S", } /** @public */ -export enum OrderTypes { +declare enum OrderTypes { LimitBuy = "Limit Buy Order", LimitSell = "Limit Sell Order", StopBuy = "Stop Buy Order", @@ -293,7 +288,7 @@ export enum OrderTypes { * Value in map of {@link StockOrder} * @public */ -export interface StockOrderObject { +interface StockOrderObject { /** Number of shares */ shares: number; /** Price per share */ @@ -310,7 +305,7 @@ export interface StockOrderObject { * Keys are stock symbols, properties are arrays of {@link StockOrderObject} * @public */ -export interface StockOrder { +interface StockOrder { [key: string]: StockOrderObject[]; } @@ -318,7 +313,7 @@ export interface StockOrder { * A single process on a server. * @public */ -export interface ProcessInfo { +interface ProcessInfo { /** Script name. */ filename: string; /** Number of threads script is running with */ @@ -333,7 +328,7 @@ export interface ProcessInfo { * Hack related multipliers. * @public */ -export interface HackingMultipliers { +interface HackingMultipliers { /** Player's hacking chance multiplier. */ chance: number; /** Player's hacking speed multiplier. */ @@ -348,7 +343,7 @@ export interface HackingMultipliers { * Hacknet related multipliers. * @public */ -export interface HacknetMultipliers { +interface HacknetMultipliers { /** Player's hacknet production multiplier */ production: number; /** Player's hacknet purchase cost multiplier */ @@ -365,7 +360,7 @@ export interface HacknetMultipliers { * Hacknet node related constants * @public */ -export interface HacknetNodeConstants { +interface HacknetNodeConstants { /** Amount of money gained per level */ MoneyGainPerLevel: number; /** Base cost for a new node */ @@ -396,7 +391,7 @@ export interface HacknetNodeConstants { * Hacknet server related constants * @public */ -export interface HacknetServerConstants { +interface HacknetServerConstants { /** Number of hashes calculated per level */ HashesPerLevel: number; /** Base cost for a new server */ @@ -433,7 +428,7 @@ export interface HacknetServerConstants { * A single server. * @public */ -export interface Server { +interface Server { /** * How many CPU cores this server has. Maximum of 8. * Affects magnitude of grow and weaken. @@ -523,7 +518,7 @@ export interface Server { * All multipliers affecting the difficulty of the current challenge. * @public */ -export interface BitNodeMultipliers { +interface BitNodeMultipliers { /** Influences how quickly the player's agility level (not exp) scales */ AgilityLevelMultiplier: number; /** Influences the base cost to purchase an augmentation. */ @@ -624,7 +619,7 @@ export interface BitNodeMultipliers { * Object representing all the values related to a hacknet node. * @public */ -export interface NodeStats { +interface NodeStats { /** Node's name */ name: string; /** Node's level */ @@ -648,7 +643,7 @@ export interface NodeStats { } /** @public */ -export interface SourceFileLvl { +interface SourceFileLvl { /** The number of the source file */ n: number; /** The level of the source file */ @@ -659,7 +654,7 @@ export interface SourceFileLvl { * Bladeburner current action. * @public */ -export interface BladeburnerCurAction { +interface BladeburnerCurAction { /** Type of Action */ type: string; /** Name of Action */ @@ -670,7 +665,7 @@ export interface BladeburnerCurAction { * Gang general info. * @public */ -export interface GangGenInfo { +interface GangGenInfo { /** Name of faction that the gang belongs to ("Slum Snakes", etc.) */ faction: string; /** Indicating whether or not it's a hacking gang */ @@ -698,7 +693,7 @@ export interface GangGenInfo { } /** @public */ -export interface GangOtherInfoObject { +interface GangOtherInfoObject { /** Gang power */ power: number; /** Gang territory, in decimal form */ @@ -706,7 +701,7 @@ export interface GangOtherInfoObject { } /** @public */ -export interface GangOtherInfo { +interface GangOtherInfo { [key: string]: GangOtherInfoObject; } @@ -714,7 +709,7 @@ export interface GangOtherInfo { * Object representing data representing a gang member task. * @public */ -export interface GangTaskStats { +interface GangTaskStats { /** Task name */ name: string; /** Task Description */ @@ -751,7 +746,7 @@ export interface GangTaskStats { * Object representing data representing a gang member equipment. * @public */ -export interface EquipmentStats { +interface EquipmentStats { /** Strength multiplier */ str?: number; /** Defense multiplier */ @@ -767,7 +762,7 @@ export interface EquipmentStats { } /** @public */ -export interface GangTerritory { +interface GangTerritory { /** Money gain impact on task scaling */ money: number; /** Respect gain impact on task scaling */ @@ -777,7 +772,7 @@ export interface GangTerritory { } /** @public */ -export interface GangMemberInfo { +interface GangMemberInfo { /** Name of the gang member */ name: string; /** Currently assigned task */ @@ -858,7 +853,7 @@ export interface GangMemberInfo { } /** @public */ -export interface GangMemberAscension { +interface GangMemberAscension { /** Amount of respect lost from ascending */ respect: number; /** Hacking multiplier gained from ascending */ @@ -875,24 +870,66 @@ export interface GangMemberAscension { cha: number; } -/** - * Object representing a sleeve current task. - * @public - */ -export type SleeveTask = any; +/** @public */ +type SleeveBladeburnerTask = { + type: "BLADEBURNER"; + actionType: "General" | "Contracts"; + actionName: string; +}; -/** - * Object representing a port. A port is a serialized queue. - * @public - */ -export interface NetscriptPort { - /** - * Write data to a port. +/** @public */ +type SleeveClassTask = { + type: "CLASS"; + classType: UniversityClassType | GymType | `${UniversityClassType}` | `${GymType}`; + location: LocationName | `${LocationName}`; +}; + +/** @public */ +type SleeveCompanyTask = { type: "COMPANY"; companyName: string }; + +/** @public */ +type SleeveCrimeTask = { type: "CRIME"; crimeType: CrimeType | `${CrimeType}` }; + +/** @public */ +type SleeveFactionTask = { + type: "FACTION"; + factionWorkType: FactionWorkType | `${FactionWorkType}`; + factionName: string; +}; + +/** @public */ +type SleeveInfiltrateTask = { type: "INFILTRATE" }; + +/** @public */ +type SleeveRecoveryTask = { type: "RECOVERY" }; + +/** @public */ +type SleeveSupportTask = { type: "SUPPORT" }; + +/** @public */ +type SleeveSynchroTask = { type: "SYNCHRO" }; + +/** Object representing a sleeve current task. + * @public */ +export type SleeveTask = + | SleeveBladeburnerTask + | SleeveClassTask + | SleeveCompanyTask + | SleeveCrimeTask + | SleeveFactionTask + | SleeveInfiltrateTask + | SleeveRecoveryTask + | SleeveSupportTask + | SleeveSynchroTask; + +/** Object representing a port. A port is a serialized queue. + * @public */ +interface NetscriptPort { + /** Write data to a port. * @remarks * RAM cost: 0 GB * - * @returns The data popped off the queue if it was full. - */ + * @returns The data popped off the queue if it was full. */ write(value: string | number): PortData | null; /** @@ -3507,12 +3544,13 @@ export interface sleeve { * @remarks * RAM cost: 4 GB * - * Return the current task that the sleeve is performing. type is set to “Idle” if the sleeve isn’t doing anything. + * Return the current task that the sleeve is performing, or null if the sleeve is idle. All tasks have a "type" + * property, and other available properties depend on the type of task. * * @param sleeveNumber - Index of the sleeve to retrieve task from. - * @returns Object containing information the current task that the sleeve is performing. + * @returns Object containing information for the current task that the sleeve is performing. */ - getTask(sleeveNumber: number): SleeveTask; + getTask(sleeveNumber: number): SleeveTask | null; /** * Set a sleeve to shock recovery. @@ -3795,7 +3833,7 @@ interface SkillsFormulas { } /** @public */ -export interface WorkStats { +interface WorkStats { money: number; reputation: number; hackExp: number; @@ -3829,7 +3867,7 @@ interface WorkFormulas { companyGains( person: Person, companyName: string, - workType: CompanyPosNames | `${CompanyPosNames}`, + workType: CompanyPosName | `${CompanyPosName}`, favor: number, ): WorkStats; } @@ -4123,7 +4161,7 @@ export interface Formulas { } /** @public */ -export interface Fragment { +interface Fragment { id: number; shape: boolean[][]; type: number; @@ -4132,7 +4170,7 @@ export interface Fragment { } /** @public */ -export interface ActiveFragment { +interface ActiveFragment { id: number; highestCharge: number; numCharge: number; @@ -4254,20 +4292,20 @@ interface Stanek { } /** @public */ -export interface InfiltrationReward { +interface InfiltrationReward { tradeRep: number; sellCash: number; SoARep: number; } /** @public */ -export interface ILocation { +interface ILocation { city: string; name: string; } /** @public */ -export interface InfiltrationLocation { +interface InfiltrationLocation { location: ILocation; reward: InfiltrationReward; difficulty: number; @@ -4285,7 +4323,7 @@ interface Infiltration { * * @returns all locations that can be infiltrated. */ - getPossibleLocations(): PossibleInfiltrationLocation[]; + getPossibleLocations(): ILocation[]; /** * Get all infiltrations with difficulty, location and rewards. * @remarks @@ -6859,7 +6897,7 @@ declare enum GymType { } /** @public */ -declare enum CompanyPosNames { +declare enum CompanyPosName { sw0 = "Software Engineering Intern", sw1 = "Junior Software Engineer", sw2 = "Senior Software Engineer", @@ -6930,6 +6968,74 @@ declare enum IndustryType { RealEstate = "RealEstate", } +/** Names of all locations + * @public */ +declare enum LocationName { + AevumAeroCorp = "AeroCorp", + AevumBachmanAndAssociates = "Bachman & Associates", + AevumClarkeIncorporated = "Clarke Incorporated", + AevumCrushFitnessGym = "Crush Fitness Gym", + AevumECorp = "ECorp", + AevumFulcrumTechnologies = "Fulcrum Technologies", + AevumGalacticCybersystems = "Galactic Cybersystems", + AevumNetLinkTechnologies = "NetLink Technologies", + AevumPolice = "Aevum Police Headquarters", + AevumRhoConstruction = "Rho Construction", + AevumSnapFitnessGym = "Snap Fitness Gym", + AevumSummitUniversity = "Summit University", + AevumWatchdogSecurity = "Watchdog Security", + AevumCasino = "Iker Molina Casino", + + ChongqingKuaiGongInternational = "KuaiGong International", + ChongqingSolarisSpaceSystems = "Solaris Space Systems", + ChongqingChurchOfTheMachineGod = "Church of the Machine God", + + Sector12AlphaEnterprises = "Alpha Enterprises", + Sector12BladeIndustries = "Blade Industries", + Sector12CIA = "Central Intelligence Agency", + Sector12CarmichaelSecurity = "Carmichael Security", + Sector12CityHall = "Sector-12 City Hall", + Sector12DeltaOne = "DeltaOne", + Sector12FoodNStuff = "FoodNStuff", + Sector12FourSigma = "Four Sigma", + Sector12IcarusMicrosystems = "Icarus Microsystems", + Sector12IronGym = "Iron Gym", + Sector12JoesGuns = "Joe's Guns", + Sector12MegaCorp = "MegaCorp", + Sector12NSA = "National Security Agency", + Sector12PowerhouseGym = "Powerhouse Gym", + Sector12RothmanUniversity = "Rothman University", + Sector12UniversalEnergy = "Universal Energy", + + NewTokyoDefComm = "DefComm", + NewTokyoGlobalPharmaceuticals = "Global Pharmaceuticals", + NewTokyoNoodleBar = "Noodle Bar", + NewTokyoVitaLife = "VitaLife", + NewTokyoArcade = "Arcade", + + IshimaNovaMedical = "Nova Medical", + IshimaOmegaSoftware = "Omega Software", + IshimaStormTechnologies = "Storm Technologies", + IshimaGlitch = "0x6C1", + + VolhavenCompuTek = "CompuTek", + VolhavenHeliosLabs = "Helios Labs", + VolhavenLexoCorp = "LexoCorp", + VolhavenMilleniumFitnessGym = "Millenium Fitness Gym", + VolhavenNWO = "NWO", + VolhavenOmniTekIncorporated = "OmniTek Incorporated", + VolhavenOmniaCybersystems = "Omnia Cybersystems", + VolhavenSysCoreSecurities = "SysCore Securities", + VolhavenZBInstituteOfTechnology = "ZB Institute of Technology", + + Hospital = "Hospital", + Slums = "The Slums", + TravelAgency = "Travel Agency", + WorldStockExchange = "World Stock Exchange", + + Void = "The Void", +} + /** @public */ export type NSEnums = { toast: typeof ToastVariant; @@ -6937,7 +7043,8 @@ export type NSEnums = { FactionWorkType: typeof FactionWorkType; GymType: typeof GymType; UniversityClassType: typeof UniversityClassType; - CompanyPosNames: typeof CompanyPosNames; + CompanyPosName: typeof CompanyPosName; + LocationName: typeof LocationName; }; /** diff --git a/src/Server/data/servers.ts b/src/Server/data/servers.ts index a90079f64..339509d26 100644 --- a/src/Server/data/servers.ts +++ b/src/Server/data/servers.ts @@ -3,7 +3,7 @@ import { FactionNames } from "../../Faction/data/FactionNames"; // This could actually be a JSON file as it should be constant metadata to be imported... import { IMinMaxRange } from "../../types"; -import { LocationName } from "../../Locations/data/LocationNames"; +import { LocationName } from "../../utils/enums"; import { LiteratureNames } from "../../Literature/data/LiteratureNames"; import { SpecialServers } from "./SpecialServers"; diff --git a/src/StockMarket/data/InitStockMetadata.ts b/src/StockMarket/data/InitStockMetadata.ts index 53e5a5852..8fedcd0b9 100644 --- a/src/StockMarket/data/InitStockMetadata.ts +++ b/src/StockMarket/data/InitStockMetadata.ts @@ -10,7 +10,7 @@ */ import { StockSymbols } from "./StockSymbols"; import { IConstructorParams } from "../Stock"; -import { LocationName } from "../../Locations/data/LocationNames"; +import { LocationName } from "../../utils/enums"; export const InitStockMetadata: IConstructorParams[] = [ { diff --git a/src/StockMarket/data/StockSymbols.ts b/src/StockMarket/data/StockSymbols.ts index 3be3a410a..d85a10e5b 100644 --- a/src/StockMarket/data/StockSymbols.ts +++ b/src/StockMarket/data/StockSymbols.ts @@ -1,4 +1,4 @@ -import { LocationName } from "../../Locations/data/LocationNames"; +import { LocationName } from "../../utils/enums"; //Enum-like object because some keys are created via code and have spaces. Membership can still be checked with checkEnum. export const StockSymbols = { diff --git a/src/Work/ClassWork.tsx b/src/Work/ClassWork.tsx index 8ae518d3f..8441255ce 100644 --- a/src/Work/ClassWork.tsx +++ b/src/Work/ClassWork.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver"; import { CONSTANTS } from "../Constants"; -import { LocationName } from "../Locations/data/LocationNames"; +import { LocationName } from "../utils/enums"; import { numeralWrapper } from "../ui/numeralFormat"; import { dialogBoxCreate } from "../ui/React/DialogBox"; import { Money } from "../ui/React/Money"; diff --git a/src/Work/CompanyWork.tsx b/src/Work/CompanyWork.tsx index dce14ac61..68952d05f 100644 --- a/src/Work/CompanyWork.tsx +++ b/src/Work/CompanyWork.tsx @@ -3,7 +3,7 @@ import { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../uti import { Player } from "@player"; import { Work, WorkType } from "./Work"; import { influenceStockThroughCompanyWork } from "../StockMarket/PlayerInfluencing"; -import { LocationName } from "../Locations/data/LocationNames"; +import { LocationName } from "../utils/enums"; import { calculateCompanyWorkStats } from "./Formulas"; import { Companies } from "../Company/Companies"; import { applyWorkStats, scaleWorkStats, WorkStats } from "./WorkStats"; diff --git a/src/Work/Formulas.ts b/src/Work/Formulas.ts index cbbd992ea..d0e3718b7 100644 --- a/src/Work/Formulas.ts +++ b/src/Work/Formulas.ts @@ -16,7 +16,7 @@ import { Class, Classes, ClassType } from "./ClassWork"; import { Server } from "../Server/Server"; import { GetServer } from "../Server/AllServers"; import { serverMetadata } from "../Server/data/servers"; -import { LocationName } from "../Locations/data/LocationNames"; +import { LocationName } from "../utils/enums"; import { Company } from "../Company/Company"; import { CompanyPosition } from "../Company/CompanyPosition"; import { checkEnum } from "../utils/helpers/enum"; diff --git a/src/ui/GameRoot.tsx b/src/ui/GameRoot.tsx index 9ddcc7c74..fcc2edd18 100644 --- a/src/ui/GameRoot.tsx +++ b/src/ui/GameRoot.tsx @@ -4,7 +4,7 @@ import { Player } from "@player"; import { installAugmentations } from "../Augmentation/AugmentationHelpers"; import { saveObject } from "../SaveObject"; import { onExport } from "../ExportBonus"; -import { LocationName } from "../Locations/data/LocationNames"; +import { LocationName } from "../utils/enums"; import { Location } from "../Locations/Location"; import { ITutorial, iTutorialStart } from "../InteractiveTutorial"; import { InteractiveTutorialRoot } from "./InteractiveTutorial/InteractiveTutorialRoot"; diff --git a/src/ui/WorkInProgressRoot.tsx b/src/ui/WorkInProgressRoot.tsx index fbf49510e..407b9559b 100644 --- a/src/ui/WorkInProgressRoot.tsx +++ b/src/ui/WorkInProgressRoot.tsx @@ -5,7 +5,7 @@ import { uniqueId } from "lodash"; import React, { useEffect, useState } from "react"; import { Companies } from "../Company/Companies"; import { CONSTANTS } from "../Constants"; -import { LocationName } from "../Locations/data/LocationNames"; +import { LocationName } from "../utils/enums"; import { Locations } from "../Locations/Locations"; import { Settings } from "../Settings/Settings"; import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions"; diff --git a/src/utils/enums.ts b/src/utils/enums.ts index f81df1207..766b079b8 100644 --- a/src/utils/enums.ts +++ b/src/utils/enums.ts @@ -1,4 +1,4 @@ -export enum CompanyPosNames { +export enum CompanyPosName { sw0 = "Software Engineering Intern", sw1 = "Junior Software Engineer", sw2 = "Senior Software Engineer", @@ -76,3 +76,70 @@ export enum GymType { dexterity = "dex", agility = "agi", } + +/** Names of all locations */ +export enum LocationName { + AevumAeroCorp = "AeroCorp", + AevumBachmanAndAssociates = "Bachman & Associates", + AevumClarkeIncorporated = "Clarke Incorporated", + AevumCrushFitnessGym = "Crush Fitness Gym", + AevumECorp = "ECorp", + AevumFulcrumTechnologies = "Fulcrum Technologies", + AevumGalacticCybersystems = "Galactic Cybersystems", + AevumNetLinkTechnologies = "NetLink Technologies", + AevumPolice = "Aevum Police Headquarters", + AevumRhoConstruction = "Rho Construction", + AevumSnapFitnessGym = "Snap Fitness Gym", + AevumSummitUniversity = "Summit University", + AevumWatchdogSecurity = "Watchdog Security", + AevumCasino = "Iker Molina Casino", + + ChongqingKuaiGongInternational = "KuaiGong International", + ChongqingSolarisSpaceSystems = "Solaris Space Systems", + ChongqingChurchOfTheMachineGod = "Church of the Machine God", + + Sector12AlphaEnterprises = "Alpha Enterprises", + Sector12BladeIndustries = "Blade Industries", + Sector12CIA = "Central Intelligence Agency", + Sector12CarmichaelSecurity = "Carmichael Security", + Sector12CityHall = "Sector-12 City Hall", + Sector12DeltaOne = "DeltaOne", + Sector12FoodNStuff = "FoodNStuff", + Sector12FourSigma = "Four Sigma", + Sector12IcarusMicrosystems = "Icarus Microsystems", + Sector12IronGym = "Iron Gym", + Sector12JoesGuns = "Joe's Guns", + Sector12MegaCorp = "MegaCorp", + Sector12NSA = "National Security Agency", + Sector12PowerhouseGym = "Powerhouse Gym", + Sector12RothmanUniversity = "Rothman University", + Sector12UniversalEnergy = "Universal Energy", + + NewTokyoDefComm = "DefComm", + NewTokyoGlobalPharmaceuticals = "Global Pharmaceuticals", + NewTokyoNoodleBar = "Noodle Bar", + NewTokyoVitaLife = "VitaLife", + NewTokyoArcade = "Arcade", + + IshimaNovaMedical = "Nova Medical", + IshimaOmegaSoftware = "Omega Software", + IshimaStormTechnologies = "Storm Technologies", + IshimaGlitch = "0x6C1", + + VolhavenCompuTek = "CompuTek", + VolhavenHeliosLabs = "Helios Labs", + VolhavenLexoCorp = "LexoCorp", + VolhavenMilleniumFitnessGym = "Millenium Fitness Gym", + VolhavenNWO = "NWO", + VolhavenOmniTekIncorporated = "OmniTek Incorporated", + VolhavenOmniaCybersystems = "Omnia Cybersystems", + VolhavenSysCoreSecurities = "SysCore Securities", + VolhavenZBInstituteOfTechnology = "ZB Institute of Technology", + + Hospital = "Hospital", + Slums = "The Slums", + TravelAgency = "Travel Agency", + WorldStockExchange = "World Stock Exchange", + + Void = "The Void", +} diff --git a/test/jest/Terminal/determineAllPossibilitiesForTabCompletion.test.ts b/test/jest/Terminal/determineAllPossibilitiesForTabCompletion.test.ts index 4a8d7cdbb..10a4c38c9 100644 --- a/test/jest/Terminal/determineAllPossibilitiesForTabCompletion.test.ts +++ b/test/jest/Terminal/determineAllPossibilitiesForTabCompletion.test.ts @@ -4,7 +4,7 @@ import { Player } from "../../../src/Player"; import { determineAllPossibilitiesForTabCompletion } from "../../../src/Terminal/determineAllPossibilitiesForTabCompletion"; import { Server } from "../../../src/Server/Server"; import { AddToAllServers, prestigeAllServers } from "../../../src/Server/AllServers"; -import { LocationName } from "../../../src/Locations/data/LocationNames"; +import { LocationName } from "../../../src/utils/enums"; import { CodingContract } from "../../../src/CodingContracts"; import { initDarkWebItems } from "../../../src/DarkWeb/DarkWebItems";