Commit Graph

282 Commits

Author SHA1 Message Date
Snarling
5fe89d5599
CORPORATION: Reorganize Industry data (#154) 2022-10-24 21:54:54 -04:00
Snarling
0a3ff56331
WIP: Remove corp employees as objects (#143)
* Removed employees as objects from corporations
* Remove employees from office JSON after loading / convert to new parameters
* Showed down morale/etc gain; added optional position to hireEmployee
* enum support for corp employee positions

Mostly authored-by: Kelenius <kelenius@ya.ru>
2022-10-24 08:44:01 -04:00
Snarling
124e64379a
Improve unexpected error message (#133)
* Add ws details if available
* Add likely cause of error
* Attempt to display error
2022-10-19 16:32:39 -04:00
omuretsu
7683990d17 format and lint 2022-10-14 11:03:50 -04: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
Olivier Gagnon
ae5fc168bf Add getMoneySources 2022-10-13 00:10:59 -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
omuretsu
41b6f0b87b add hoop before exposing 2022-10-11 21:02:04 -04:00
omuretsu
7d07f44b3e move to global scope 2022-10-11 20:01:10 -04:00
omuretsu
84b99c569a extra printRaw function 2022-10-11 16:07:45 -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
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
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
OverlordQ
046ba80935
Update killWorkerScript.ts
Remove spurious console debugging line
2022-09-29 08:20:49 -04:00
Snarling
25be5c2990 Remove unused augmentationStats interface
All augmentations have all multipliers
2022-09-27 16:20:26 -04:00
Snarling
0e67fbee21 Unify error handling 2022-09-27 15:51:25 -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
cc2246213f Add more error types 2022-09-27 15:35:39 -04:00
Snarling
824d8db653 simplify/dehardcode failOnHacknetServer 2022-09-27 15:35:39 -04:00
Snarling
7d37736058 unified errors 2022-09-27 15:35:39 -04:00
Snarling
8d0347577d Less hardcoding 2022-09-27 15:34:48 -04:00
Snarling
572c68738f Unify error handling 2022-09-27 15:34:47 -04:00
Snarling
5798c4c7d3 Unify error handling 2022-09-27 15:32:09 -04:00
Olivier Gagnon
2fc17423ff Improve the robustness of the tutorial. 2022-09-27 13:35:51 -04:00
hydroflame
2a43b90ed3
Merge pull request #4039 from ezylot/patch-1
GANG: Added weight to GangMemberTask construction call
2022-09-23 01:15:29 -03:00
Olivier Gagnon
2a0dd6b6f8 Minor improvements to Netscript Port loading and unloading 2022-09-22 23:55:16 -04:00
hydroflame
0044761fd3
Merge pull request #4073 from Hoekstraa/unlimited-ports
API: More ports (previously max 20, now practically unlimited)
2022-09-23 00:51:50 -03:00
phyzical
ca2f1a62a5
add singularity function for exporting game save 2022-09-07 16:11:51 +08:00
Zoë Hoekstra
55df97d3d5
Format 2022-09-01 16:27:31 +02:00
Zoë Hoekstra
ec81fb60c3
Create ports on demand. Increase max to infinity. 2022-09-01 16:13:10 +02:00
Olivier Gagnon
2675fd23ec fix stack trace missing in some errors 2022-08-29 18:14:54 -04:00
Olivier Gagnon
c9a0998cc1 Improve wrong arg user message and add ui.windowSize 2022-08-29 18:07:17 -04:00
Olivier Gagnon
f07a29c73b fix dynamic ram miscalc not triggering 2022-08-29 15:26:34 -04:00
hydroflame
c2796e164a
Merge pull request #4052 from Snarling/ns1wrapper
NETSCRIPT: FIX #4037 ns1 wraps deeper layers correctly.
2022-08-29 11:14:32 -03:00
Snarling
185549e7e4 fix dynamic ram check 2022-08-28 07:44:41 -04:00
Snarling
ef1f376c09 format, lint, remove unused "running" property on ws 2022-08-27 22:32:48 -04:00
Florian Schöffl
0c93764ef8
Added weight to GangMemberTask construction call
Added hackWeight: 100 to GangMember Task construction call to prevent error messages from the constructor checks. 
Since we only compare with roughlyIs() this will have no impact on functionality
2022-08-25 11:08:33 +02: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
Olivier Gagnon
0e569344e7 rm console log 2022-08-23 11:28:40 -04:00
hydroflame
67be694b68
Merge pull request #3978 from Snarling/atExitFix
NETSCRIPT: FIX #2931 atExit now allows synchronous ns functions
2022-08-23 12:27:43 -03:00
Olivier Gagnon
a8bef50ef5 Added a few formulas to calculate work gains 2022-08-17 14:32:52 -04:00
Snarling
32afaae3e2 Improve atExit error message 2022-08-16 20:37:50 -04:00