Commit Graph

30 Commits

Author SHA1 Message Date
Bart Kuijper
6a3d22d7bd
CONTRACTS: createDummyContract returns filename (#1129) 2024-03-01 23:12:04 -05:00
Snarling
373ced2efe
GO: Various changes before 2.6.0 (#1120) 2024-02-26 08:05:10 -05:00
LJ
fd5b0f8241
MISC: Use structuredClone() for deep cloning (#1077) 2024-02-10 04:10:19 -05:00
LJ
011d5e8fd6
BUGFIX: Properly deep copy array data for coding contracts (#1064) 2024-01-31 19:43:04 -05:00
Snarling
fb1f95c26e
VARIOUS: Various changes prior to release 2.2 (#271)
See PR #271 description
2022-12-29 20:28:53 -05:00
Snarling
837c6bd1c2
CONTRACT: codingcontract.attempt always returns a string (#231)
* ns.codingcontract always returns a string (reward on success, empty on fail), simplifying usage and documentation of function.
* Because of the above, return value still works when used as a boolean, as long as no direct equality comparison to true/false.
* Documentation expanded and examples added.
Co-authored by @quacksouls
2022-11-28 09:15:09 -05: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
Olivier Gagnon
f4668b21ca functions to generate dummy contracts 2022-10-09 02:56:11 -04:00
Snarling
ef1f376c09 format, lint, remove unused "running" property on ws 2022-08-27 22:32:48 -04:00
Alain Bryden
359def2b61
Don't stringify answer if already a string 2022-08-24 11:09:35 -03:00
Olivier Gagnon
7cb48f4612 fix compile error 2022-08-23 12:04:09 -04:00
hydroflame
486ab7aad8
Merge branch 'dev' into contractFix 2022-08-23 12:44:21 -03:00
Snarling
931ea730a5 Move entire ns object to top-level 2022-08-09 18:09:26 -04:00
Snarling
01e63b10a1 move ctx.log to NetscriptHelpers 2022-08-09 18:09:26 -04:00
Snarling
208495e269 Initial commit 2022-08-09 18:09:24 -04:00
Snarling
47d51391e3 fix typechecking and documentation for attempt 2022-08-02 11:30:28 -04:00
Snarling
b700b0246b Fix contract input handling 2022-08-02 11:11:49 -04:00
Olivier Gagnon
8312710b0d fix contracts 2022-07-20 11:50:26 -04:00
Olivier Gagnon
c3a10d5d95 fix more anys 2022-07-19 18:25:06 -04:00
Olivier Gagnon
1b90b42881 rm more any 2022-07-18 02:28:21 -04:00
Olivier Gagnon
c6806caca2 Wrap most of the API 2022-05-07 19:08:07 -04:00
phyzical
18af3f8413 moved updateRam to first call to avoid lack of mocks for tests
* added wrapper funcs to simplify updateRam
* added static parser tests and skiped what isnt worker still for next person to try and fix
2022-03-31 21:41:19 +08:00
Olivier Gagnon
4d9a8e7bba unknown-ify coding contract API. 2022-03-29 20:29:05 -04:00
Jeffrey A. Robinson
910c9d9e7e Correctly label functions so that disableLog will work 2022-01-12 16:55:45 -08:00
Olivier Gagnon
c59a267437 change sf4 2022-01-04 19:09:34 -05:00
Olivier Gagnon
c05518e162 workerscript log takes a function now, hopefully this will increase performance. 2021-11-26 18:30:58 -05:00
Olivier Gagnon
f035457efc build part pr 2021-11-20 15:01:04 -05:00
Olivier Gagnon
14150d3e33 work on making the netscript api tighter 2021-11-03 20:19:52 -04:00
Olivier Gagnon
c5fb5155f3 work on making sure all the functions are accounted for 2021-11-03 18:16:10 -04:00
Olivier Gagnon
d3fc6a9d48 split NetscriptFunctions 2021-10-14 03:22:02 -04:00