Commit Graph

127 Commits

Author SHA1 Message Date
Snarling
fb1f95c26e
VARIOUS: Various changes prior to release 2.2 (#271)
See PR #271 description
2022-12-29 20:28:53 -05:00
Mughur
b004b7203d
GENERAL: Reorganizing and grouping node multipliers (#259) 2022-12-21 17:39:12 -05:00
Snarling
65cd14e33b
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.
2022-11-20 12:07:22 -05:00
Snarling
8e0e0eaa88
NETSCRIPT: ns.sleeve.getSleeve added. getPlayer and getSleeve can both be used for formulas. (#200)
* BREAKING CHANGE: Removed getSleeveStats and getSleeveInformation because this info is provided by getSleeve in a more usable form.
* BREAKING CHANGE: Removed tor, inBladeburner, and hasCorporation fields from ns.getPlayer. Functionality still exists via added functions ns.hasTorRouter, ns.corporation.hasCorporation, and ns.bladeburner.inBladeburner.
* Separated ns definitions for Person, Sleeve, and Player interfaces with both Player and Sleeve just extending Person.
Added getSleeve, which provides a Sleeve object similar to getPlayer.
* Renamed the sleeve ns layer's interface as sleeve lowercase because of name conflict. todo: May move all the ns layers interface names to lowercase for consistency
* Added ns.formulas.work.crimeSuccessChance and reworked to allow both sleeve and player calculations.
* Removed internal Person.getIntelligenceBonus function which was just a wrapper for calculateIntelligenceBonus. Any use of the former in formulas creates a conflict where ns-provided Person objects throw an error.
* Renamed helpers.player to helpers.person for netscript person validation. Reduced number of fields validated due to Person being a smaller interface.
* Fixed bug in bladeburner where Player multipliers and int were being used no matter which person was performing the task
* Fixed leak of Player.jobs at ns.getPlayer
* Person / Player / Sleeve classes now implement the netscript equivalent interfaces. Netscript helper for person no longer asserts that it's a real Person class member, only that it's a Person interface. Functions that use netscript persons have been changed to expect just a person interface to prevent needing this incorrect type assertion.
2022-11-09 07:26:26 -05:00
Snarling
239834dba6
Connect to owned servers from anywhere (#159)
* purchasedByPlayer allows connect-from-anywhere as if the server was backdoored.
* Also added optional backdoorInstalled variable to type for BaseServer. This has no runtime effect, but it allows accessing that variable without TS needing us to verify whether it's instanceof Server first.
2022-10-25 17:48:46 -04:00
Olivier Gagnon
cbb7f58231 Make the main player object an alias, makes it easier to import 2022-10-09 18:42:14 -04:00
Olivier Gagnon
5d4b72e1d1 Added some purchased server functions 2022-10-09 02:32:13 -04:00
Olivier Gagnon
f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -04:00
Snarling
aa80cf6451 See description
Reverted ToastVariant back to an enum internally. Still exposed to player as just possible strings.
Changed all 1-line documentation comments to actually be 1-line. Moved some because they were not providing documentation for the thing they were trying to.
2022-10-04 06:40:10 -04:00
Snarling
50f14b4f58 Commit1 2022-10-03 12:12:16 -04:00
Snarling
38063f62a7 build fix, lint, remove some instanceof checks 2022-09-27 16:09:32 -04:00
Snarling
c510e47885 Player is now a Person
Use correct class inheritance, use class as type and remove IPlayer
2022-09-27 15:35:41 -04:00
Snarling
21a2d49de7 Finish removing player passing 2022-09-27 15:35:41 -04:00
Snarling
83d357e758 commit1 2022-09-27 15:35:40 -04:00
Snarling
572c68738f Unify error handling 2022-09-27 15:34:47 -04:00
Olivier Gagnon
6390f3618e Added few augs 2022-09-23 12:05:16 -04:00
Olivier Gagnon
fb197be206 Fix hostname generation being weird about dash 0 added 2022-09-23 12:04:21 -04:00
Shiiyu
e1bff8bcb1 fix: 🐛 fix server minimum difficulty changing when server starting difficulty is capped 2022-09-23 02:39:58 -04:00
Shiiyu
cf11612abc style: 🎨 fix - forgot to run format first 2022-09-23 02:07:32 -04:00
Shiiyu
ecaa906682 fix: 🐛 fix server starting security going above 100 2022-09-23 00:42:47 -04:00
hydroflame
9946a2a667
Merge pull request #3841 from crimsonhawk47/fix-ip-exists-function
BUGFIX: Fix #3803 Servers can no longer have duplicate IPs
2022-07-21 01:33:35 -04:00
Olivier Gagnon
810f3a87b9 rm more anys 2022-07-19 21:53:43 -04:00
Olivier Gagnon
55c5190986 fix any in BaseServer 2022-07-18 03:20:11 -04:00
Olivier Gagnon
7195c1b540 fix any in AllServers 2022-07-18 03:06:17 -04:00
Olivier Gagnon
88d9a76b04 yet another any 2022-07-18 02:43:59 -04:00
Olivier Gagnon
6b630753f0 nuke some use of any 2022-07-14 19:00:10 -04:00
Olivier Gagnon
5629c16def extract multipliers in its own type 2022-07-14 18:43:33 -04:00
Olivier Gagnon
606f1bf6c4 create program and grafting done 2022-07-10 01:37:36 -04:00
Olivier Gagnon
647392626e convert taking class ot new work system 2022-07-07 17:28:23 -04:00
Gabriel Hawk
60c6536f8e npm format 2022-06-13 01:13:36 -05:00
Gabriel Hawk
1e2e42af75 ipExists acceses server list correctly 2022-06-13 01:07:21 -05:00
Olivier Gagnon
9af553f63c Fix 2022-05-19 02:09:00 -04:00
Olivier Gagnon
f1a3fb7d3e fix buying programs and writing them at the same time. 2022-04-13 00:21:51 -04:00
Olivier Gagnon
48f80f25d6 fmt and lint 2022-04-06 19:30:08 -04:00
Olivier Gagnon
4d9a8e7bba unknown-ify coding contract API. 2022-03-29 20:29:05 -04:00
hydroflame
290f36b600
Merge pull request #2881 from dwRchyngqxs/reverse_grow_newton
growthAnalyze (choice 2 / documented math) - only merge one of these
2022-03-20 21:40:02 -04:00
hydroflame
15fae213ab
Merge pull request #2872 from SagePtr/getserver-hasownproperty
Add hasOwnProperty check to GetServer
2022-03-20 21:16:04 -04:00
phyzical
44ea479043 update constants
* added OperationNames
* added faction names
* used citynames where appropriate
2022-03-19 16:09:59 +08:00
hydroflame
561219a0ab
Merge branch 'dev' into bugfix/2877-2 2022-03-17 12:05:38 -04:00
phyzical
9949cc9a1e removed ip references 2022-03-17 21:50:23 +08:00
InDieTasten
17cba1d853 Fix unique ip generation
The previous implementation had a bug in it, where the generated IP
wouldn't be unique, if the generated IP wouldn't be unique two times in
a row.
2022-03-12 18:29:01 +01:00
Olivier Gagnon
b810e523ee update patch notes 2022-02-23 02:01:48 -05:00
qcorradi
5a39a92270 Merge branch 'patch-8' of github.com:zeddrak/bitburner into reverse_grow_newton 2022-02-06 14:00:05 +01:00
zeddrak
bfaecc644d
startMoney check should be >= moneyMax, not ==
Just realized that I checked for exactly equal (as would be likely when operating internally), but really, it should treat anything greater than or equal to as a zero growth scenario (just better protection from a wider range of potential issues)
2022-02-01 14:34:27 -08:00
zeddrak
5cc7a6a0a2
added numCycleForGrowthByMultiplier (ie old growthAnalyze parameters)
implemented numCycleForGrowthByMultiplier (fully compatible with old growthAnalyze - though still slightly wrong, it does so in a way that could be seen as beneficial and is compatible with existing scripts)
Also some fixes to numCycleForGrowthByHackAmt (wrong parameter order)
2022-01-31 20:41:42 -08:00
zeddrak
76cc1532a7
Added note to numCycleForGrowthByHackAmt
* NOTE: the prehackMoney parameter can be removed and server.moneyMax used in its place. The return value would then give a thread count
 * that would slowly grow the server more than it is hacked until reaching moneyMax where it would return the correct number of threads.
2022-01-31 20:15:55 -08:00
zeddrak
63e833317b
more otpys
fuinction => function
2022-01-31 20:06:13 -08:00
zeddrak
94bcd0484a
Small comment change
had an "a the" and the point was redundant, so removed it
2022-01-31 20:04:39 -08:00
zeddrak
28a32ed3a0
Ytpo fix
Missed one
2022-01-31 19:56:02 -08:00
zeddrak
7bb3a8169e
Comment Ytop fixes
Sigh, my fingers are soo old and don't work right any more... :)
Thanks for the info.
2022-01-31 19:54:38 -08:00