Commit Graph

686 Commits

Author SHA1 Message Date
Olivier Gagnon
f803355335 fix doc 2022-10-09 18:48:58 -04:00
Olivier Gagnon
7a89c0a1bb regen doc 2022-10-09 18:46:13 -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
f4668b21ca functions to generate dummy contracts 2022-10-09 02:56:11 -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
hydroflame
a5b2512269
Merge pull request #4205 from Snarling/ramTestFix
TESTS: Refined ram calculation tests
2022-10-09 00:23:04 -04:00
hydroflame
b4d6ead5d2
Merge pull request #4206 from quacksouls/doc-exec
DOC: `ns.exec()`: typo fixes and clean presentation
2022-10-09 00:22:54 -04:00
Duck McSouls
351d769122 DOC: no trailing whitespace
Remove some trailing whitespaces in `src/ScriptEditor/NetscriptDefinitions.d.ts` because `npm run format` complains about them.  The trailing whitespaces were introduced in one of my earlier patches.  Sorry about this :-(
2022-10-06 23:29:06 +11:00
Duck McSouls
e3ace9f6d5 DOC: ns.exec(): break example comments into multiple lines
The comment of each example is so long that, in the generated documentation for `ns.exec()` shown at

https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.exec.md

you must use the horizontal scrollbar to read the whole comment.  Even if you maximize the browser window, you must still use the horizontal scrollbar to read the whole comment.  Tested on Brave, Chrome, Firefox, and Opera.  Fix this by limiting each line of comment to at most 90 characters.
2022-10-06 22:56:01 +11:00
Duck McSouls
5edcdaad81 DOC: ns.exec(): typo fixes
Some typographical fixes in the documentation of `ns.exec()`.  Link to the function `ns.run()`.  Currently, the line `* * @example` causes API Extractor to output an asterisk (i.e. `*`) between the two code examples.  The function `ns.exec()` calls the function `runScriptFromScript()` from `src/NetscriptWorker.ts`, which uses the floor function to round down the number of threads.
2022-10-06 22:34:00 +11:00
Snarling
0310a98237 Lint+format fix? 2022-10-05 15:29:56 -04:00
Snarling
068533cd2f format, lint, more enums, revert fn rename 2022-10-05 14:52:48 -04:00
Snarling
8bb88a5080 Better RamCost testing (see desc)
* RamCostGenerator will have an error if ramcosts are defined for nonexistent functions, in addition to error if not all functions have ram costs defined
* Removed a few random blank comment lines in NetscriptDefinitions.d.ts
* RamCalculation.test.ts checks exact expected static and dynamic ram usage from (almost) every function, based on defined RamCosts in RamCostGenerator.
2022-10-05 10:42:07 -04:00
hydroflame
5b699fa19f
Merge pull request #4188 from quacksouls/doc-stock
DOC: `stock.getPrice()`: typo fixes and update examples
2022-10-04 11:47:24 -04:00
hydroflame
774c3ef402
Merge pull request #4185 from quacksouls/doc-print
DOC: `print()` and friends: typo fixes and examples
2022-10-04 11:45:01 -04:00
Snarling
361466b7fa unasync trywriteport 2022-10-04 07:59:50 -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
Duck McSouls
01e7ce2a05 DOC: stock.getPrice(): a simple example
Fixes #4184. The hard-coded stock symbol `"FISG"` should be `"FSIG"`.
2022-10-02 11:39:54 +11:00
Snarling
3addda7173 format and lint 2022-10-01 15:15:36 -04:00
Duck McSouls
4cf270138d DOC: stock.getPrice(): typo fix in examples
Fixes #4184.  The hard-coded stock symbol `"FISG"` should be `"FSIG"`.  The updated examples do not use a hard-coded stock symbol.  The documentation is updated to explain under which circumstances a player can run the function `stock.getPrice()`.
2022-10-01 10:07:20 +10:00
Duck McSouls
5e14d07d9a DOC: stock.getPrice(): typo fixes
Some typographical fixes for the documentation of `stock.getPrice()`.  The line for RAM cost should be separated by a blank line from the sentence about the definition of a stock's price.  Otherwise `npm run doc` would cram those information together onto one line.
2022-10-01 09:59:44 +10:00
Duck McSouls
d8ef63cfe9 NETSCRIPT: format fixes
The command `npm run format` reports some formatting issues under `src/ScriptEditor`.  Fix the reported formatting issues.
2022-09-30 14:47:33 +10:00
Duck McSouls
0488f6e7b3 DOC: print() and friends: some examples
Some examples for how to use `print()` and related functions.  Use cross-referencing to reduce duplicate examples.
2022-09-30 14:22:49 +10:00
Duck McSouls
ebdeb15d5a DOC: print() and friends: typo fixes
Some typographical fixes.  In the generated documentation for `tprintf()`, the documentation for the parameter `values` is missing because `@param msg` should be `@param values`.
2022-09-30 14:19:19 +10:00
hydroflame
7ce1adddce
Merge pull request #4151 from LJNeon/script-editor-fix
UI: Remove extra / from open script tab when files are in a folder
2022-09-27 17:50:32 -03:00
Snarling
25be5c2990 Remove unused augmentationStats interface
All augmentations have all multipliers
2022-09-27 16:20:26 -04:00
Snarling
91a69d7d8f format & lint 2022-09-27 15:35:40 -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
LJNeon
a464563e1c
chore(ScriptEditor): Remove extra / from files in a folder 2022-09-23 19:23:54 -07:00
hydroflame
cbe31fa63f
Merge pull request #4135 from Mughur/corp
CORPORATION: FIX #3880, #3876, #3322 and #3138 Bunch of corporation fixes
2022-09-23 12:35:11 -03:00
Mughur
d99d37f191 Bunch of corporation fixes 2022-09-23 13:13:33 +03:00
Duck McSouls
98d43acf9f Missing capitalization in ns.gang.ascendMember()
The return description of the function ns.gang.ascendMember() has a missing capitalization.  Fixes #4091.
2022-09-23 20:06:36 +10:00
Duck McSouls
b31c64fb9f Missing capitalization in ns.gang.getAscensionResult()
The return description for the function ns.gang.getAscensionResult() has a missing capitalization. Fixes #4090.
2022-09-23 20:03:46 +10:00
Duck McSouls
b0f1e7a997 Typo fix for focus parameter of ns.singularity.commitCrime()
The focus parameter of the function ns.singularity.commitCrime() relates to committing a crime, not creating a program.  Fixes #4127.
2022-09-23 20:01:21 +10:00
hydroflame
ed14f2a4d7
Merge pull request #4072 from Snarling/exitExits
NETSCRIPT: FIX #2376 ns.exit now exits immediately
2022-09-23 00:57:15 -03:00
hydroflame
a8e640e309
Merge pull request #4084 from Rasmoh/expose_exports
CORPORATION API: FIX #3655 Expose exports from Material
2022-09-23 00:46:28 -03:00
phyzical
ca2f1a62a5
add singularity function for exporting game save 2022-09-07 16:11:51 +08:00
Rasmoh
cc0fd197c5 Expose exports from Material 2022-09-05 17:25:32 -07:00
Snarling
1be015898c exitExits 2022-09-01 08:23:31 -04:00
Olivier Gagnon
c9a0998cc1 Improve wrong arg user message and add ui.windowSize 2022-08-29 18:07:17 -04:00
hydroflame
2463fc2012
Merge pull request #4028 from Snarling/scpAndWriteDocFix
NETSCRIPT: Update netscript definition file for scp, write, read, and flags
2022-08-25 16:37:07 -03:00
Duck McSouls
84eabad6ac Typo fixes in CodingContract, Hacknet, and Singularity.
Fix some typographical errors in the CodingContract, Hacknet, and Singularity APIs.  I have yet to look over other APIs, but I don't want to make the patch any larger than it currently is.
2022-08-25 10:52:24 +10:00
Snarling
d1aa114e29 Fix build error / additional type for flags 2022-08-24 20:28:38 -04:00
Snarling
650db2dee7 Add type fix for flags 2022-08-24 19:09:18 -04:00
Snarling
bba9317ef6 incorporate read changes 2022-08-24 18:42:42 -04:00
MycroftJr
1135508683 fix ns.read return type 2022-08-24 18:36:50 -04:00
Duck McSouls
d38ef01a94 A typo fix.
Fix a typographical error.  From a first time contributor.
2022-08-24 13:57:42 +10:00