Duck McSouls
93090691b5
DOC: ns.prompt()
: some examples
...
Add some examples to illustrate the use of the various options. As per suggestion by @Snarling, simplify the examples on free-form text box and drop-down list.
2022-10-15 11:27:56 +11:00
Duck McSouls
473e6a2674
DOC: ns.prompt()
: explain the various options
...
Elaborate on the effects of `options.type` and `options.choices`. Break the explanation into bullet points for clearer presentation. Thanks to @Snarling for pointing out that the default is to create a boolean dialog box.
2022-10-15 11:03:36 +11:00
omuretsu
ad0be471ce
fix ns.prompt typechecking
...
Introduced some new type assertion functions, initial step in larger type safety rework.
2022-10-14 11:00:29 -04:00
Duck McSouls
a368c6904e
DOC: ns.prompt()
: a typo fix
...
A simple typographical fix.
2022-10-14 14:50:35 +11:00
Daniel Bachran
5acd5e84a3
#4239 Adjust write() documentation
...
write() only accepts strings now.
2022-10-13 17:45:40 +02:00
Olivier Gagnon
8ff840edfa
getBitnodeM takes 2 arg
2022-10-13 00:51:53 -04:00
Olivier Gagnon
ae5fc168bf
Add getMoneySources
2022-10-13 00:10:59 -04:00
hydroflame
93769c7089
Merge pull request #4224 from quacksouls/doc-scan
...
DOC: `ns.scan()`: typo fixes and add 2 examples
2022-10-12 23:52:34 -04:00
hydroflame
50bc41bf5b
Merge pull request #4231 from borisflagell/TypoRepReq#3811
...
API: Fix #3811 Update NetscriptDefinitions.d.ts
2022-10-12 23:51:39 -04:00
omuretsu
7a384d53f4
typefix netscriptFunctions (see desc)
...
* Types for InternalFunction and ExternalFunction have been modified to actually typecheck ns functions against docs.
* Internal functions are required to use unknown for any params on the inner function.
* Return types for internal function inner-function must match the respective external function.
* Added new typecheck assertion function for asserting dynamic object types, to allow unknownifying params that were previously hardcoded objec structures.
* Because type assertion for parameter types and return types is enforced by InternalAPI, removed all duplicate type declarations on NetscriptFunction params and returns.
2022-10-12 08:49:27 -04:00
borisflagell
b2886ba623
Update NetscriptDefinitions.d.ts
2022-10-11 18:45:38 +03:00
Duck McSouls
b03288a700
DOC: ns.scan(): add 2 examples
...
The first example shows how to use `ns.scan()` without passing an argument. The second example uses `ns.scan()` by passing the hostname of a target server. Both examples can be written more succinctly by using the `forEach()` method of array, but for the purposes of illustration the `for` loop should be easier for beginners to read.
2022-10-11 18:48:47 +11:00
Duck McSouls
afe6a837c3
DOC: ns.sleeve.setToCommitCrime()
: add 1 example
...
An example on how to set a sleeve to commit a crime. The example shows that sleeves are indexed from 0.
2022-10-10 20:49:33 +11:00
Duck McSouls
c728c550f5
DOC: ns.sleeve.setToCommitCrime()
: add all crimes a sleeve can commit
...
Add a list of crimes that a sleeve can commit. Update the parameter documentation to refer to this list.
2022-10-10 13:18:00 +11:00
Duck McSouls
304b7645b0
DOC: ns.sleeve.setToCommitCrime()
: starting index of sleeves
...
Document the index of the first sleeve. Sleeves are indexed starting from zero, i.e. 0. Increment by 1 to get the index of the next sleeve. And so on.
2022-10-10 12:47:20 +11:00
Duck McSouls
67f5d60116
DOC: ns.scan()
: typo fixes
...
Some typographical fixes in the documentation of the function `ns.scan()`. The function returns an array, not a string.
2022-10-10 09:55:31 +11:00
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
Snarling
4d47785f28
Fix ns documentation for scp and write
2022-08-23 22:06:05 -04:00
Snarling
445e365959
debounce updateRAM
2022-08-23 16:38:30 -04:00
Olivier Gagnon
89aa23f4b3
Add dummy function to generate a mock server or player for formulas stuff
2022-08-23 16:01:34 -04:00
hydroflame
486ab7aad8
Merge branch 'dev' into contractFix
2022-08-23 12:44:21 -03:00
hydroflame
849046df3a
Merge pull request #3985 from Snarling/synchronize
...
NETSCRIPT: ns.scp and ns.write are now synchronous + fix exec race condition
2022-08-23 12:25:24 -03:00
hydroflame
46f5640dcd
Merge pull request #3976 from Snarling/ScriptEditorResponsiveness
...
UI: FIX #3975 , #3882 Script Editor more responsive on resize, and fix dirty file indicator
2022-08-23 12:12:21 -03:00
MageKing17
0a4c64a8fa
Correct documentation for run()
with 0 threads.
...
For consistency, the same phrasing has been applied to the documentation for `exec()` and `spawn()`.
2022-08-20 18:47:37 -07:00
Snarling
f6a8d5d337
synchronize scp and write
2022-08-17 18:55:12 -04:00
Olivier Gagnon
a8bef50ef5
Added a few formulas to calculate work gains
2022-08-17 14:32:52 -04:00
Snarling
e6f9f9ed75
const openScripts (format)
2022-08-16 15:19:33 -04:00
Snarling
57fa1b743a
const openScripts
2022-08-16 15:17:44 -04:00
Snarling
8cbb8aac2e
Remove unnecessary assignments & spreads
2022-08-16 12:24:50 -04:00
Snarling
fbee07ffd7
Fix dirty indicator
2022-08-16 10:41:40 -04:00
Snarling
fd3ff76976
Improve ScriptEditor responsiveness
2022-08-16 02:32:25 -04:00
Snarling
ea7c2c4981
fixing other commits after rebase
2022-08-09 18:25:02 -04:00
hydroflame
74f3d6507f
Merge pull request #3942 from Mughur/dev
...
API: add corp get<constant> functions, UI: fix coffee hover text
2022-08-09 12:04:03 -03:00
Snarling
9f6ccc94b1
format & lint
2022-08-02 11:32:04 -04:00
Snarling
47d51391e3
fix typechecking and documentation for attempt
2022-08-02 11:30:28 -04:00
phyzical
f441d390e1
left over code from old infil implementation
...
hotfix/3938
File List:
src/ScriptEditor/NetscriptDefinitions.d.ts
2022-08-01 16:09:47 +08:00
Mughur
a88f36e2f4
add corp get functions, fix coffee hover text
2022-07-30 18:57:33 +03:00
Olivier Gagnon
07c7f0641a
allbuild commit c8440ef2
2022-07-28 14:35:55 -04:00
Olivier Gagnon
3b35b07860
remove unused fields on sleeves
2022-07-28 03:08:39 -04:00
Olivier Gagnon
4549b0d467
finish sleeve rework
2022-07-28 02:46:34 -04:00
Olivier Gagnon
32bd629317
lint
2022-07-27 00:08:07 -04:00
Olivier Gagnon
326d9fd7ef
Move player skills and exp to their struct
2022-07-26 23:54:17 -04:00
Olivier Gagnon
3e4f26ac0a
allbuild commit e6d14eff
2022-07-26 15:30:12 -04:00
Olivier Gagnon
18c3572423
removed the ability to bribe for shares
2022-07-26 08:20:22 -04:00
Olivier Gagnon
faa3e212f3
fix a bunch of small v2 related bugs
2022-07-26 08:08:51 -04:00
Olivier Gagnon
590bc37db0
Fix typo in net def
2022-07-21 15:33:50 -04:00
Olivier Gagnon
7f20dc2ee8
fix getPossibleInfiltrations not returning enough info and fix donation saying Invalid input before unlocking
2022-07-21 15:32:54 -04:00
Olivier Gagnon
2d522ea1e6
allbuild commit e9254edf
2022-07-21 15:09:55 -04:00
Olivier Gagnon
6498a720bb
Merge branch 'dev' of github.com:danielyxie/bitburner into dev
2022-07-21 02:42:52 -04:00
Olivier Gagnon
693baf26df
add sleeve aug price and rep function
2022-07-21 02:42:48 -04:00
hydroflame
2fd3451780
Merge pull request #3724 from borisflagell/FIX#3661
...
API: Fix #3661 Add missing memory property to Sleeve API
2022-07-21 02:26:55 -04:00
Olivier Gagnon
43b8cfec5c
fix test suite
2022-07-21 02:13:47 -04:00
Olivier Gagnon
d01fd55bde
lint fmt
2022-07-21 01:58:47 -04:00
hydroflame
0d95533470
Merge pull request #3810 from Undeemiss/multi-hash-sell
...
BLADEBURNER: Add batch functionality to NS spendHashes API
2022-07-21 01:39:02 -04:00
Olivier Gagnon
207e55c7b8
add colon x to vim mode
2022-07-21 01:25:43 -04:00
Olivier Gagnon
ec17cfdaf3
merge corp not async
2022-07-20 17:27:11 -04:00
Olivier Gagnon
ef42ee7232
few more api break
2022-07-20 17:03:08 -04:00
Staszek Welsh
75a9151e74
Merge branch 'dev' into corp-remove-async
2022-07-20 21:12:27 +01:00
hydroflame
17c2f06ae0
Merge pull request #3802 from stalefishies/corp-dividends
...
CORPORATION: (BREAKING) Dividend fixes and exposing dividends info via scripts
2022-07-20 15:08:41 -04:00
Olivier Gagnon
c9b9c2c55b
merge dev
2022-07-20 12:16:42 -04:00
Olivier Gagnon
4518eabc29
Remove some any and add getAugmentationBasePrice
2022-07-20 01:20:11 -04:00
Olivier Gagnon
ce2ebf576e
fix an any
2022-07-19 22:44:45 -04:00
Olivier Gagnon
96654d4c0a
rm some anys
2022-07-19 21:38:50 -04:00
Olivier Gagnon
dfadfe6eb2
working with monaco anys
2022-07-19 20:10:30 -04:00
Olivier Gagnon
0c07dddb36
fix a bunch of any in NetDef
2022-07-19 19:20:14 -04:00
Olivier Gagnon
70d5390e4d
most anys in NetFunc
2022-07-19 19:04:06 -04:00
Olivier Gagnon
2442402af5
fix more anys
2022-07-19 16:46:03 -04:00
Olivier Gagnon
bb8af88b77
prep v2
2022-07-19 14:21:12 -04:00
Olivier Gagnon
e9788536ed
yet another any
2022-07-18 02:36:51 -04:00
Olivier Gagnon
97105b8e76
rm another any
2022-07-18 02:31:09 -04:00
hydroflame
f339e49aa7
Merge pull request #3787 from Undeemiss/bladeburner-multi-upgrade
...
BLADEBURNER: Added bulk upgrades to upgradeSkill NS API
2022-07-15 23:40:55 -04:00
Olivier Gagnon
1d4d86719e
rm any
2022-07-15 01:58:00 -04:00
Olivier Gagnon
4bee746576
rm any
2022-07-15 01:51:30 -04:00
Olivier Gagnon
5629c16def
extract multipliers in its own type
2022-07-14 18:43:33 -04:00
Olivier Gagnon
fac6633347
remove so many fields and values used by the old system
2022-07-12 23:13:40 -04:00
Olivier Gagnon
f7805c4a51
convert faction work to new work system
2022-07-12 01:54:19 -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
Olivier Gagnon
3ee7d593d0
Convert crime to new work model
2022-07-07 02:00:23 -04:00
hydroflame
b067e05738
Merge pull request #3813 from stalefishies/doc-fix
...
DOCUMENTATION: FIX #2602 Remove incorrect info from getHackTime and friends
2022-07-06 14:33:40 -04:00
hydroflame
eeb01b77d6
Merge pull request #3834 from stalefishies/types-fix
...
MISC: FIX #3831 Fix NS declarations with incorrect script arg types
2022-07-06 14:31:44 -04:00
Douwe Schulte
d472c1239b
Missing link to used library in tprintf
2022-06-22 12:37:46 +02:00
Staszek Welsh
d2d76d40e0
npm run format
2022-06-10 20:03:43 +01:00
Staszek Welsh
ecc56213bc
Fix function declarations with incorrect script arg types
2022-06-10 19:54:11 +01:00
Staszek Welsh
6c73ea44ef
Remove potentially spoilery comments about Hacknet Servers from ns docs
2022-06-03 02:20:35 +01:00
Staszek Welsh
144a56e6e0
Remove incorrect doc comment about second arguments for getHackTime and friends
2022-06-03 02:18:06 +01:00
Staszek Welsh
04efd899a0
Remove async from buyCoffee and throwParty
2022-06-01 23:36:15 +01:00
Staszek Welsh
ffaa38d086
Unify code paths for buying coffee and throwing parties
2022-06-01 23:26:32 +01:00
Staszek Welsh
7d3a43f7b5
Remove async from employee assignment functions
2022-06-01 18:18:53 +01:00
Undeemiss
f0dc532513
Add optional count parameter to hashCost and spendHashes
2022-05-31 21:13:03 -05:00
Staszek Welsh
4a3558098c
Fix error check in issueDividends expecting 0-100 when it actually takes 0-1
2022-05-30 22:31:51 +01:00
Staszek Welsh
c117b55df9
Expose dividend info through ns.corporation.getCorporation()
2022-05-30 22:21:27 +01:00
Undeemiss
06acc423ae
Added count to NS cost function, input checking, fixed documentation
...
Also changed upgradeSkill back to returning a bool instead of a
number.
2022-05-29 11:13:49 -05:00
Undeemiss
f8f3c099e0
Formatted/linted (There are some errors, but they aren't mine afaik)
2022-05-28 21:35:20 -05:00
Undeemiss
709fc3ab63
Began attempting to implement a multi-upgrade function for bb
2022-05-28 14:12:07 -05:00
borisflagell
eed6f355fb
Update NetscriptDefinitions.d.ts
...
Fix two instance of in-game API doc referencing the wrong time unit.
2022-05-26 23:39:57 +02:00
Olivier Gagnon
76ccb0ba36
lint
2022-05-25 11:43:43 -04:00
borisflagell
ff75097149
API: Fix #3661 Add missing memory property to Sleeve API
...
fixes #3661
Add the missing memory stat to NS.SleeveSkills Interface.
Update ns.Sleeve.GetSleeveStats accordingly.
(fixing commit issue)
2022-05-24 15:09:22 +02:00
hydroflame
cb4fd4cf90
Merge pull request #3722 from borisflagell/FIX#2884
...
API: FIX#2884 Add the missing className property to Sleeve'sAPI
2022-05-24 08:48:35 -04:00
Olivier Gagnon
8159dad5fa
allbuild commit de644247
2022-05-24 08:12:49 -04:00
borisflagell
051393fac9
API: FIX#2884 Add the missing className property to Sleeve'sAPI
...
fixes #2884 .
2022-05-23 19:20:33 +02:00