Commit Graph

11 Commits

Author SHA1 Message Date
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
Snarling 21a2d49de7 Finish removing player passing 2022-09-27 15:35:41 -04:00
Florian Schöffl 282dc28c8d INFILTRATION: Corrected ns formula for infiltration rewards
In commit 
7c5097ee83 the author extracted the functionality for infiltration rewards into a NS function and made it accessible via formulas.

The exposed function does however not use the same input parameters as the Victory screen after infiltration since he uses the difficulty and not the starting difficulty.

Difficulty is clamped to [0;3], so the formulas api showed for high difficulty servers a vastly lower result.
2022-08-29 02:35:39 +02:00
Snarling 931ea730a5 Move entire ns object to top-level 2022-08-09 18:09:26 -04:00
Snarling 208495e269 Initial commit 2022-08-09 18:09:24 -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
faangbait 3b59f07f88 fix for #3909
#3909 

I can't compile electron right now, but I think this ought to fix it.
2022-07-15 10:20:30 -05:00
Olivier Gagnon bc890c31c5 lint 2022-04-22 17:20:01 -04:00
Olivier Gagnon f6e5f719d1 infiltration API fixes. 2022-04-22 17:12:14 -04:00
Olivier Gagnon 9fdfb77dd4 Update infiltrators 2022-04-22 15:30:49 -04:00
phyzical 7c5097ee83 added ns functions
* refactored out logic to be reused by api
2022-03-27 15:53:13 +08:00