Commit Graph

5831 Commits

Author SHA1 Message Date
zerbosh
14aafbe0a3
SLEEVES: fix typo in MoneySourceTracker call (#405) 2023-03-03 01:03:09 -05:00
Tyasuh
a01da24c10
Complete partial revert of infinite loop detection (#406) 2023-03-03 01:02:45 -05:00
Snarling
ea8ee743cc
NETSCRIPT: Revert infinite loop detection (#404) 2023-03-02 17:29:18 -05:00
omuretsu
75481aa195 Fix growthAnalyzeSecurity doc
Also a format fix from a previous sloppy commit
2023-02-28 09:57:02 -05:00
omuretsu
f16246f939 Fix Math Expressions contract
Previously player could submit as many wrong answers in the solution as they wanted, as long as all correct answers were included. Fixed by ensuring length matches actual answer.
2023-02-28 09:14:12 -05:00
omuretsu
45ca94b1dc Fix hackAnalyzeThreads
It was previously returning infinity any time a single thread was calculated to hack less than $1, due to an improper use of Math.floor.
2023-02-28 09:02:14 -05:00
Snarling
ee3c412933
SETTINGS: Add infinite loop detection setting (#402) 2023-02-28 06:54:01 -05:00
lucebac
ae92ea0f94
ns.scp: strip leading slashes from filenames if file is in root (#263) 2023-02-28 06:53:42 -05:00
David Walker
f1793b187b
SOURCEFILE: Fix calculation of decMult (#385)
Changed SF1 to apply a 1/incMult multiplier to hacknet costs to match how NFG, SF12, etc. handle it. Previously was calculated as a %reduction.
Changed wording on SF9 to include a %reduction in hacknet costs.
Buffed SF9 effect to 12% base from 8%, to make up for weaker hacknet cost mults from SF1.
2023-02-27 20:41:42 -05:00
T.J. Eckman
33f0150d25
BUGFIX: Memory Leak in NetscriptPorts (#399)
Co-authored-by: Snarling <84951833+Snarling@users.noreply.github.com>
2023-02-27 19:54:04 -05:00
Mughur
9d504b0dfb
updated node starting messages actually show up (#397) 2023-02-27 21:46:01 +02:00
LiamGeorge1999
3d9993215c
Fix double percentage sign in product creation (#395) 2023-02-25 08:20:59 -05:00
LiamGeorge1999
b1af58d6a6
Fixed speechmarks not making numeric terminal arguments into strings (#391) 2023-02-25 08:17:01 -05:00
quacksouls
f50b731846
Fix doc typo for "Sanitize Parentheses in Expression" contract (#389) 2023-02-24 22:31:10 -05:00
quacksouls
18eeb7c4e1
Fix doc typo for ns.stock.getPosition (#390) 2023-02-24 22:27:55 -05:00
Snarling
4166c09bd4
More script editor options (#386)
* Options are responsive again (fix from previous changes)
* Better height control on the monaco container using flexbox.
* Added options for tab size, auto-detect indentation per-file, font family, and font ligatures.
2023-02-24 07:37:29 -05:00
Snarling
71051cde9c
Upgrade monaco and bump game version to 2.3.0dev (#369) 2023-02-23 21:43:29 -05:00
omuretsu
211e2bcb95 Fix Electron API server
VSCode integration fix for Electron version
2023-02-23 21:18:29 -05:00
Mughur
57302c953f
Merge pull request #376 from Zelow79/BN9-buff
BN9: QoL improvements.
2023-02-23 17:29:52 +02:00
omuretsu
37d2f57e53 Fix atExit loop
atExit clears itself from the WorkerScript before being executed.
2023-02-23 08:39:47 -05:00
Zelow79
eb7b00a688 Update BitNode.tsx 2023-02-22 15:50:29 -05:00
Zelow79
3fde3a1a22 Update BitNode.tsx
Removed PI from BN modifiers and set them back to base/original values as per Mughur request.
2023-02-22 15:47:32 -05:00
Mughur
3c7b0622a5
Merge pull request #375 from Tyasuh/Int-Shock-Recovery-Buff
MISC: Sleeve Int applies to active/passive shock recovery
2023-02-22 14:40:51 +02:00
Snarling
d3f9554a6e
2.2.2 Release (#378) 2023-02-21 09:44:18 -05:00
tyasuh.taeragan@gmail.com
7963158470 Requested Correction 2023-02-20 21:40:47 -05:00
omuretsu
bba6b26ac1 Fix ram<1GB display bug 2023-02-20 06:31:52 -05:00
Zelow79
f573092090 Update Prestige.ts
updated comment to be a little more clear
2023-02-19 21:51:06 -05:00
Zelow79
b950c6540f bn9 QoL improvements
Increased BN multipliers for HacknetNodeMoney and WorldDaemonDifficulty to PI (3.14159...). This brings WD required hack to 9424.77796076938 (now the 2nd highest ^-^).
Bn9 now starts with the same node bn9.3 rewards (the idea here is it helps showcase the BNs new feature and just speeds up a lot of what made it so slow early on)
2023-02-19 21:14:22 -05:00
omuretsu
6b8ae1b351 Change high% display to mult form
Also includes some documentation updates from a previous PR (sleeve.setToIdle)
2023-02-19 15:24:27 -05:00
tyasuh.taeragan@gmail.com
b6433786e3 formatter 2023-02-19 05:27:09 -05:00
tyasuh.taeragan@gmail.com
012c5d4f86 Int Buff to shock recovery speed 2023-02-19 01:43:38 -05:00
Mughur
2bd5741b22
Merge pull request #371 from d0sboots/hacking
NETSCRIPT: Add `additionalMsec` to BasicHGWOptions
2023-02-19 07:42:11 +02:00
Mughur
79eca93ade
Merge pull request #373 from Mughur/uptodate
BUGFIX: new servers check reserved names properly
2023-02-19 07:28:30 +02:00
Zelow79
028199aa7d
SLEEVE: Add sleeve.setToIdle function (#374) 2023-02-19 00:13:23 -05:00
omuretsu
bd4fe19fde Fix percent display at large values 2023-02-18 08:03:16 -05:00
Mughur
d55395491c
BUGFIX: new servers check reserved names properly 2023-02-18 03:34:09 +02:00
David Walker
53755dd573 NETSCRIPT: Add additionalMsec to BasicHGWOptions
This option adds additional time to the sleep in hack/grow/weaken before
the command takes effect. The critical difference between this and doing
your own sleep is that it creates a single, uninterruptible sleep: This
opens up multiple new avenues of gameplay for batching.

Note that use of this new feature is theoretically always suboptimal,
since extending the sleep time wastes RAM.
2023-02-17 00:01:41 -08:00
David Walker
ed59f4bfe7
NETSCRIPT: Add growThreads to formulas, improve docs for hacking functions (#330) 2023-02-14 17:38:51 -05:00
Snarling
b9a2953fa6
Add totalExperience property to getOffice (#367) 2023-02-14 01:38:22 -05:00
Snarling
08e71c732b
Threads are a positive integer (#366)
* Added new positive integer ns validation helper
* `run`, `exec`, and `spawn` verify threads as a positive integer.
* `run` terminal command also fails if the provided threadcount is not a positive integer.
* Removed some references to .script files in various documentation, and removed some of the NS1 example blocks
2023-02-14 01:32:01 -05:00
Snarling
b0bdf0c7ad
DOC: Improve ns.kill documentation (#365) 2023-02-13 21:50:38 -05:00
Mughur
571f1eb8ef
Merge pull request #362 from d0sboots/corpsell
CORP: Change/fix TA.II to use configured sell amounts
2023-02-14 03:38:58 +02:00
Snarling
f16a4f1a4e
fix setTheme 2023-02-13 19:49:07 -05:00
David Walker
4dd093606c CORP: Change/fix TA.II to use configured sell amounts
It used to set prices based on current production only.
2023-02-11 23:08:39 -08:00
Snarling
6a6043c509
CODEBASE: Add custom useRerender hook (#359) 2023-02-11 13:22:55 -05:00
Snarling
b4074328ec
UI: Added new locale-aware and configurable number formatting (#354) 2023-02-11 13:18:50 -05:00
Zelow79
1f5546b721
UI: Revealed faction augments remaining in faction invite. (#357) 2023-02-11 10:41:50 -05:00
omuretsu
07b1eefe33 Run prettier 2023-02-07 21:16:18 -05:00
Mughur
67fde6167b Fix tutorial getting started link
change tformat.rst file name
2023-02-08 03:46:42 +02:00
Zelow79
37f41c89bc
MISC: Added features to DevMenu (#353)
* More blade devmenu functions
* Custom money field, set money to 0 option
* Options for removing blade/gang/corp
* Better dev menu responsiveness (dev menu rerenders after adding or removing blade/gang/corp)
* Some general code style changes
2023-02-02 10:09:38 -05:00
T.J. Eckman
a141431e08 CORP: Move Sale after Export in Corp States 2023-01-30 19:15:56 -05:00
Mughur
d5707931c6
Merge pull request #342 from MattiYT/dev
UI: Added iron man theme.
2023-01-30 22:53:56 +02:00
Mughur
741f4a0d1e Update index.ts 2023-01-30 22:50:40 +02:00
Mughur
23199ee705 fix previous commit, improve argument page on docs 2023-01-30 21:42:46 +02:00
Mughur
6369ab434b Doc changes 2023-01-30 20:51:00 +02:00
omuretsu
867236e153 autoAssignJob streamlining 2023-01-29 08:14:12 -05:00
Matti
f8f8c8c517
Add files via upload 2023-01-29 12:51:46 +00:00
Matti
caf65c4d63
Update index.ts
Added iron man theme to the list.
2023-01-29 12:49:12 +00:00
Christian Roy
d7439aae52
Fix setAutoAssignJob parameter validation. (#339) 2023-01-29 07:39:01 -05:00
David Walker
c1d3664955
CORP: Revert mandatory coffeeparty (#333) 2023-01-27 08:15:54 -05:00
Zelow79
707508a8cc
MISC: Further BB UI number updates (#340) 2023-01-27 08:04:17 -05:00
Mughur
9c365d0da5 small fixes 2023-01-24 23:28:53 +02:00
Zelow79
d6a0d5fcaa
BUGFIX: Corrected error in formatReallyBigNumber and updated BB UI to be more large number friendly (#331) 2023-01-20 08:06:50 -05:00
Tyasuh
ac8ea6b5ef
split hacknet node from server in name, with SF9 (#327) 2023-01-16 15:59:33 -05:00
hydroflame
80061b1f81
Remove donation section under options (#328) 2023-01-16 15:51:47 -05:00
Zelow79
5f923a348c
NETSCRIPT: Added cyclesWorked to certain sleeve.getTask returns, and added bladeburner.getActionSuccesses (#324) 2023-01-15 23:50:54 -05:00
Tyasuh
6f0b3d07b8
GRAFTING: Bladeburner augs can be grafted if player is in Bladeburner faction (#321) 2023-01-14 18:24:45 -05:00
David Walker
8f2014ea6f BUGFIX: Fix rendering of GenericLocation
Fixes #316. Rollback of the change to GenericLocation made in the
previous PR, plus adding keys (instead) to address the original problem.
2023-01-09 20:02:26 -08:00
David Walker
0c2d402f0b
INFRA: Update everything except React (#312) 2023-01-08 02:36:55 -05:00
zerbosh
65f22e7931
CORPORATION: prevent "Unassigned" as job in setAutoJobAssignment (#308) 2023-01-06 22:28:22 -05:00
zerbosh
b4743a9841
CORPORATION: added Checks to setAutoJobAssignment (#307) 2023-01-06 14:52:40 -05:00
Mughur
7e183c4e4a Updated ReadTheDocs links 2023-01-06 15:24:10 +02:00
David Walker
4eef9eec03
NETSCRIPT: More ns Proxy changes (#297) 2023-01-05 20:41:24 -05:00
Mughur
3281b785ce
properly fix leading '/' script bug (#296) 2023-01-05 20:33:30 -05:00
David Walker
aa32e235fa
MULTS: Make BitNodeMultipliers.ServerMaxMoney more sensible (#280) 2023-01-05 20:31:54 -05:00
David Walker
7b5080a42b
NETSCRIPT: Add undocumented function printRaw() (#277)
This is analagous to tprintRaw (enabled by ns.iKnowWhatImDoing()), but
for logs instead of the terminal. This provides a supported* method of
creating complicated UIs for scripts.

*No actual support, expressed or implied, is provided for use of this
function.
2023-01-05 20:30:34 -05:00
David Walker
c42fde9379
INFRA: Update Webpack to @latest, along with other dev packages (#290) 2023-01-05 20:29:02 -05:00
omuretsu
a76e281349 Bump to 2.2.2dev
About to merge some PRs, already added to changelog
2023-01-05 20:28:01 -05:00
omuretsu
237f9037bf Better error on fail to import save 2023-01-05 13:04:26 -05:00
Snarling
31bf0c43d1 v2.2.1 (#293)
* handle enums differently
* Enums are frozen and fed directly to the proxy
* Enums are not included in the NSFull definition, allowing samekeys for RamCostTree<API>, InternalAPI<API>, and ExternalAPI<API>
* Rewrote a lot of the ramcalc test, with better typing thanks to the samekeys above
* Fix ns1 for proxy (args, pid, and enums after above changes were not being added to ns1 scripts.)
* Fixed an overview issue where the bars could display inaccurately.
Update changelog and bump version to 2.2.1
2023-01-04 09:45:17 -05:00
David Walker
5f18b87323
New ns implementation using Proxy (#292) 2023-01-04 08:56:29 -05:00
lucebac
1ec5ab9898
reduce level of jumper3 to 325 (#291) 2023-01-03 18:39:41 -05:00
omuretsu
bb566dc57c hotfix
* Fix ramcost for corporation.bonusTime (must be 0 because other getBonusTime functions exist).
* Fix ui hook names for overview.
2023-01-03 12:23:38 -05:00
omuretsu
1670be1573 Changelog updates for latest hotfix 2023-01-03 12:04:47 -05:00
omuretsu
4ab29e9c60 Fix minimum corp employee stat
* minEmployeeDecay is now part of CorpConstants and has a value of 10. This replaces Office.minEne/minMor/minHap
* Also removed some unnecessary files in dist/ext for MathJax
* Rebuilt documentation to remove minHap/minMor/minEne from getOffice, and add minEmployeeDecay to corporation.getConstants
2023-01-03 11:55:50 -05:00
omuretsu
b2ecd82acc Update changelog 2023-01-03 10:25:05 -05:00
Snarling
dc0de2498b
Fix mathjax error (#287)
* Updated mathjax and better-react-mathjax
* Removed MathJaxWrapper. Per better-react-mathjax documentation, we were incorrectly including a new context for every equation using this wrapper.
* Wrapped entire game in a MathJaxContext at GameRoot.
2023-01-03 07:38:14 -05:00
omuretsu
77894cd9e5 Update changelog for hotfixes 2023-01-03 02:50:08 -05:00
omuretsu
c9920f35ac Fix crazy faction XP rates 2023-01-03 02:40:06 -05:00
omuretsu
f8af04e5b3 Fix broken HP 2023-01-03 02:16:48 -05:00
omuretsu
7c6d7206dd Fix broken HP 2023-01-03 02:14:00 -05:00
omuretsu
e891b06260 Safe load sleeve class work 2023-01-02 18:18:59 -05:00
omuretsu
70b8be9988 Fix args for ns1 2023-01-02 17:56:11 -05:00
omuretsu
6d72861304 Fix graceful load for type changes 2023-01-02 15:25:43 -05:00
omuretsu
3f850d71ba fix graceful material load? 2023-01-02 15:06:44 -05:00
omuretsu
2cb989243f Format fix... 2023-01-02 13:59:31 -05:00
Mughur
1baa615def
MISC: small fixes (#270)
* infiltration gain bug fix
* fix corp division description
* avoid some issues with Infinity at super high NFG levels
Co-authored-by: Daniel Perez Alvarez <danielpza@protonmail.com>
2023-01-02 13:51:59 -05:00
omuretsu
80d751e32b fix getActionRepGain 2023-01-02 13:28:31 -05:00
omuretsu
0ec4ef31ab 2.2 2023-01-02 13:20:25 -05:00
omuretsu
93aab87a16 Fix inaccurate HP on SF prestige 2023-01-02 10:35:52 -05:00
David Walker
fe5344f232
UI: Make tooltips for CoffeeParty better reflect reality (#269) 2023-01-02 09:49:36 -05:00
zerbosh
aa50378e18
CORPORATION: Give Full Api Access on BN3 (#276) 2023-01-02 09:48:02 -05:00
Mughur
e90224c63d
CORP: Industry descriptions shows what each division uses and makes (#272) 2023-01-02 09:46:53 -05:00
zerbosh
7d98c680e5
SLEEVE: added storedCycles to getSleeve() (#279) 2023-01-02 09:45:51 -05:00
omuretsu
d00ed1f4ee sync overview updates
Using EventEmitter. Also get rid of ShownContext as it is no longer needed with this event based rerender.
2023-01-02 08:54:18 -05:00
omuretsu
90fc82b86f Fix bad memoization in blade overview 2023-01-02 08:00:45 -05:00
David Walker
71bae01fd4
BUG: Fix console error about bad ref use. (#278) 2023-01-01 04:10:06 -05:00
omuretsu
313f6ada94 Fix more overview issues
Previous changes had overview become empty when collapsing it, which broke the collapse animation. It also would have broken use of the player-visible hooks, because those would have been removed from the document on collapse.
Now a context is used to store whether the overview is being shown or not, and components that update themselves will only do so when they are being shown.
2022-12-30 15:42:58 -05:00
Snarling
62a2532d05
UI: Fix broken overview (#273)
Fixes the broken overview where improper hook use was causing React errors for certain prop changes.
Overview no longer rerenders itself on a timer. Instead individual items that need to check for state updates do so themselves on a timer.
2022-12-30 14:28:49 -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
zerbosh
24ad342203
getCorporation() returns division names (#266) 2022-12-29 04:30:16 -05:00
Mughur
5c80655d62
NETSCRIPT: Added ns.corporation.issueNewShares function (#261) 2022-12-25 03:35:18 -05:00
Mughur
556fe8dd33
NETSCRIPT: Added ns.corporation.getConstants, replacing many other corporation getter functions (#260) 2022-12-25 03:33:13 -05:00
David Walker
018053d79e
NETSCRIPT: Reduce cost of two multipliers functions (#254) 2022-12-21 18:30:27 -05:00
David Walker
149d687fd6
UI: Memoize character overview (#247) 2022-12-21 18:27:51 -05:00
Mughur
addcee73fc
Tutorial: Remove NS1 tutorial, change getting started guide to .js (#258) 2022-12-21 17:49:12 -05:00
Mughur
b004b7203d
GENERAL: Reorganizing and grouping node multipliers (#259) 2022-12-21 17:39:12 -05:00
lucebac
5a86be8714
Update doc for ns.scp (#262) 2022-12-21 14:56:08 -05:00
David Walker
303c54c85c
NETSCRIPT: Fix a typo in scp (#256) 2022-12-19 14:39:03 -05:00
omuretsu
1dec0d00bd Add documentation for ns.pid 2022-12-13 09:09:12 -05:00
T.J. Eckman
52034ccedc
NETSCRIPT: Add ns.pid variable for accessing the current script's PID (#255) 2022-12-13 09:07:15 -05:00
David Walker
f943e5d603
INFILTRATION: Change "slash" to "attack", less potential confusion (#251) 2022-12-13 08:28:56 -05:00
hydroflame
45221ead06
MISC: Remove google analytics (#253) 2022-12-13 08:28:08 -05:00
hydroflame
f039760690
Update blood donation counter 2022-12-09 15:46:56 -05:00
omuretsu
2489ec43fe Sidebar tweaks 2022-12-04 23:04:33 -05:00
David Walker
a46d34bd60
UI: Break SidebarRoot into smaller components, and memoize (#246) 2022-12-04 21:05:55 -05:00
David Walker
8d793ea271
Internal refactoring of Router (#241) 2022-12-04 03:14:06 -05:00
G4mingJon4s
897a1fbc8e
Changed skill formatting from numeral to localeStr (#244) 2022-12-03 23:32:39 -05:00
G4mingJon4s
633296da15
Added check if factionWork is from faction of gang (#243) 2022-12-03 22:58:40 -05:00
David Walker
49f732d1ee
Revert "Revert "Add keycode table and switch to event.code in select places" (#224)" (#242) 2022-12-03 22:56:42 -05:00
omuretsu
680027cd4b Fix update text for dev branch 2022-12-01 16:37:51 -05:00
Snarling
5ff2cd5357
VERSION: Update game version to 2.2 (#240)
Includes some bug fixes:
* Fix sleeve shock internal/display discrepancy (0-100 vs 0-100)
* Special error message if ns function called without a this
* Change whitespace to pre-wrap for dialog box.
* Fix bug where idle sleeves do not consume cycles but still recover shock from those cycles. Now they do not recover during idle.
* attempted to tag commit as v2.2.0
2022-12-01 16:07:46 -05:00
quacksouls
6034e1c3fa
DOC: CORP: typo fixes in hire AdVert functions (#237) 2022-12-01 11:41:52 -05:00
Snarling
14e50e5533
Some corp fixes (#236) 2022-11-29 08:24:04 -05:00
Snarling
0fb7200b4b
STOCK: ns.stock.getOrganization added for getting org from stock symbol (#234)
Authored-by: SamuraiNinjaGuy <branmiller+bitburner@gmail.com>
2022-11-28 10:33:28 -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
Snarling
6af36e3b29
NETSCRIPT: Faster API wrapping on script launch. (#229)
* ns API is wrapped once
* when a new workerscript is created, each layer of ns is stamped with a private workerscript field that allows the functions to work.
* Test has been refactored to account for new method of wrapping
* BREAKING: ns functions need access to `this` value of their parent ns layer (or any ns layer)
* Enums are passed directly to player (no cloning) but are frozen.
2022-11-28 09:11:55 -05:00
Burhanuddin Mustafa Lakdawala
675c2a0456
DOC: Update documentation for limitMaterialProduction and limitProductProduction (#221) 2022-11-26 21:06:47 -05:00
quacksouls
1ee71cea19
CORP: fix typos in research descriptions (#232)
Fix various typographical errors in the descriptions of research.
2022-11-26 21:05:01 -05:00
David Walker
70fadde222
Revert "Add keycode table and switch to event.code in select places" (#224)
Using code instead of key is strongly warned against at MDN and causes issues with nonstandard layouts:
https://developer.mozilla.org/en-US/docs/Web/API/Element/keydown_event#keyboardevent.code

This also fixes ScriptEditorRoot.tsx, where some code snuck in that
wasn't using *any* of the constants.

This reverts commit 016a9a873fba71388bdbaa1423134fd1f2335a15.
2022-11-26 08:51:09 -05:00
Burhanuddin Mustafa Lakdawala
f70a25d755
Fix spacing on 'Trade for reputation` button (#222) 2022-11-25 08:00:26 -05:00
Snarling
e17380549d
Add ctrl-a support for logs (#228)
And prevent double line returns when copying logs
2022-11-24 13:04:06 -05:00
TheMas3212
533d8a4332 GANG: Fix Gang UI to correctly report the bonus time multiplier as 25x
Add Tooltop to Corporation UI to explain bonus time (matching the one in
Gang UI)
Move corporation.process to the correct location
2022-11-25 00:45:30 +11:00
Snarling
e7fc0fbb03
Fix documentation for ns.sleeve (#227) 2022-11-24 08:19:51 -05:00
Snarling
6616f7ba15
DOCS: Update documentation for ns.args (#220) 2022-11-21 12:19:16 -05:00
Snarling
79fd5f6089
Fix ansi background spacing (#219) 2022-11-21 11:08:36 -05:00
omuretsu
387c0c2786 Fix save corruptions from invalid types 2022-11-20 12:39:08 -05:00
Snarling
65cd14e33b
DOC: Add ns documentation for possible sleeve tasks (#217)
* Add specific types for sleeve tasks
* Moved LocationName enum to overall enums file
* Add LocationName enum to those provided to player
* remove trailing s on CompanyPosNames enum (now CompanyPosName, in line with LocationName)
* Also regenerated all ns documentation. This leads to an expected error when checking for generated files, because PRs should not normally touch markdown files. Also leads to a lint failure in generated file bitburner.d.ts
* also removed some exporting from NetscriptDefinitions.d.ts for anything that wasn't imported somewhere else.
2022-11-20 12:07:22 -05:00
Snarling
88d51e9a7e
MISC: A bunch of enums stuff. (#212)
* Some game enums moved to utils/enums. Others can eventually be moved there as well.
* findEnumMember function for performing fuzzy matching of player input with enum members, without needing separate fuzzy functions for every enum.
* Also used findEnumMember for safely loading save games (allows case changes in enum values)
* Changed capitalization on some enums.
* BREAKING: removed classGains work formulas function
* Split ClassType enum into UniversityClassType and GymType.
* Added universityGains and gymGains work formulas functions
* Provided the new split enums to the player on ns.enums.
2022-11-20 08:37:11 -05:00
Snarling
c929806307
fix broken party math again 2022-11-20 07:56:58 -05:00
omuretsu
673c2d9f82 Fix broken partyMult default 2022-11-19 22:42:34 -05:00
Snarling
c669e473d1
SLEEVE: Fixed inconsistencies in how sleeve work rewards are handled. (#211) 2022-11-10 21:56:46 -05:00
Snarling
426ad5f296
Sleeve criming fix (#209)
Also simplify usage of findCrime
2022-11-10 11:05:42 -05:00
Snarling
82ba5f1f13
Ignore monaco cancellation errors (#208)
Also updated monaco-editor and @monaco-editor/react to latest versions since there were no conflicts.
2022-11-10 10:08:59 -05:00
Matt Garretson
3ec4f0c98c
Fix HP gaining logic from defense skill levels (#205) 2022-11-09 22:06:27 -05:00
Snarling
b275f88053
NETSCRIPT: Expose more enums for player use (#198)
* Add support for enums at other ns layers
* APIWrapper: simplified wrapping algorithm and modified to just use cloneDeep to copy enums instead of recursively wrapping enums as if they were new API layers
* Improve APIWrapper typing
* Changed some typings at RamCostGenerator to allow for enums at different levels without enums needing a ram cost
* Added enums to ns.corporation, removed getter functions that were being used instead.
* Add FactionWorkType for player use
* Add ClassType and CompanyWorkPos enums
* Change netscriptDefinitions to expect members of these new enums where appropriate.
2022-11-09 13:46:21 -05:00
Snarling
8e0e0eaa88
NETSCRIPT: ns.sleeve.getSleeve added. getPlayer and getSleeve can both be used for formulas. (#200)
* BREAKING CHANGE: Removed getSleeveStats and getSleeveInformation because this info is provided by getSleeve in a more usable form.
* BREAKING CHANGE: Removed tor, inBladeburner, and hasCorporation fields from ns.getPlayer. Functionality still exists via added functions ns.hasTorRouter, ns.corporation.hasCorporation, and ns.bladeburner.inBladeburner.
* Separated ns definitions for Person, Sleeve, and Player interfaces with both Player and Sleeve just extending Person.
Added getSleeve, which provides a Sleeve object similar to getPlayer.
* Renamed the sleeve ns layer's interface as sleeve lowercase because of name conflict. todo: May move all the ns layers interface names to lowercase for consistency
* Added ns.formulas.work.crimeSuccessChance and reworked to allow both sleeve and player calculations.
* Removed internal Person.getIntelligenceBonus function which was just a wrapper for calculateIntelligenceBonus. Any use of the former in formulas creates a conflict where ns-provided Person objects throw an error.
* Renamed helpers.player to helpers.person for netscript person validation. Reduced number of fields validated due to Person being a smaller interface.
* Fixed bug in bladeburner where Player multipliers and int were being used no matter which person was performing the task
* Fixed leak of Player.jobs at ns.getPlayer
* Person / Player / Sleeve classes now implement the netscript equivalent interfaces. Netscript helper for person no longer asserts that it's a real Person class member, only that it's a Person interface. Functions that use netscript persons have been changed to expect just a person interface to prevent needing this incorrect type assertion.
2022-11-09 07:26:26 -05:00
Snarling
6f08aee8f6
Fix zombie scripts (#203)
Also made installAugmentations synchronously perform reset, but added a short timeout to the callback script launch for balance.
2022-11-08 12:17:34 -05:00
Snarling
01b131526a
Rework coffee/party (#201)
* Removed unused partyEmployees and coffeeEmployees members of OfficeSpace
* Reworked formula for performance loss per market cycle.
* Rework both coffee and party formulas to allow easier recovery from low values.
2022-11-07 09:09:53 -05:00
quacksouls
8367b68f46
CORPORATION: typo fixes in modals to sell materials and products (#197) 2022-11-06 21:36:38 -05:00
Rai
c17af3ad35
UI: SoftResetButton.tsx Tooltip changed to make more sense (#186) 2022-11-06 17:30:01 -05:00
quacksouls
83730d89fd
UI: use newline to separate sentences in popup message (#188) 2022-11-06 17:27:40 -05:00
Snarling
9e869bc876
NETSCRIPT: Add ns.formulas.work.companyGains function (#195)
* added ns.formulas.work.companyGains.
* Removed Work/Formulas folder, added Work/Formulas.ts
* CompanyPosition.calculateJobPerformance now takes in a Person instead of taking in a full set of stats, and it takes INT into account.
* formulas.crimeGains takes in a person object.
* Renamed ns Player type to Person.
* added multWorkStats, which multiplies a WorkStats object with a multipliers object.
* Remove unused types in NetscriptDefinitons.d.ts
* reuse formulas code in other parts of game
* getSleeveInformation also returns skills

Co-authored-by: Alexey <alexey.kozhemiakin@gmail.com>
2022-11-06 17:27:04 -05:00
Snarling
5205ff2837
Remove unused error blocks (#194) 2022-11-04 08:08:06 -04:00
Snarling
7ef2675e2c
Make writePort synchronous (#193) 2022-11-04 07:56:20 -04:00
quacksouls
55b2cbb549
UI: cat: proper line breaks when showing .js, .script, or .txt files (#192)
Currently, the HTML line break sequence `<br /><br />` is hardcoded into the dialog box message when showing the content of these file types: ".js", ".script", and ".txt".  By default, the function `dialogBoxCreate()` currently assumes that its first parameter is not HTML, but a text string, so whatever is in the string will appear in the dialog box.  Use the newline character instead for line break.
2022-11-04 07:23:33 -04:00
omuretsu
6ac04717fe Add missing line breaks on showMessage 2022-11-03 11:31:25 -04:00
omuretsu
e42b1c2edd lint 2022-11-03 08:46:01 -04:00
omuretsu
b057e2e5f2 Fix sleeves unable to commit crime 2022-11-03 08:39:34 -04:00
LJ
9eb5f7ef23
NETSCRIPT: added portHandle.nextWrite() (#187) 2022-11-03 06:17:29 -04:00
Snarling
3ce4dcf612
DOC: Update documentation for workForFaction and workForCompany (#180)
* DOC: `ns.singularity.workForFaction()`: update doc and examples
* Additional Doc Fixes
* Remove unnecessary fluff in singularity.workForFaction examples
* Fix documentation for singularity.workForCompany similar to fixes already applied to workForFaction
* Correct some inaccuracies in workForFaction and workForCompany remarks sections
* Shorten some comment lines that are over 120 characters in NetscriptDefinitions.d.ts, for consistency.

Co-authored-by: Duck McSouls <quacksouls@gmail.com>
2022-11-01 12:24:25 -04:00
quacksouls
634611f9db
DOC: Improve CCT documentation for HammingCodes (#167) 2022-10-30 04:24:09 -04:00
LJ
0519b6adf7
De-uglify ns.print examples (#164) 2022-10-28 17:20:01 -04:00
omuretsu
4bf215f241 Fix documentation build error 2022-10-27 07:04:46 -04:00
jaculler
a40aa1bab2
Fix Tutorial Ram Text (#162)
This updates the tutorial (and tests) to match the updated value of 8GB starting ram.
2022-10-27 06:25:45 -04:00
Snarling
239834dba6
Connect to owned servers from anywhere (#159)
* purchasedByPlayer allows connect-from-anywhere as if the server was backdoored.
* Also added optional backdoorInstalled variable to type for BaseServer. This has no runtime effect, but it allows accessing that variable without TS needing us to verify whether it's instanceof Server first.
2022-10-25 17:48:46 -04:00
omuretsu
8837c01d21 Tolerate & recover from null player money 2022-10-25 14:56:47 -04:00
omuretsu
d0820c81ce Recover from null moneyTracker
There shouldn't be any way to get null, but it was reported to occur and this will recover when this happens.
2022-10-25 14:37:25 -04:00
Snarling
959307aa13
CORP: Better fix for MP validation (#158)
* Prevent negative profit selling
* Update validation strings for MP
* Allow negative MP formula price
2022-10-25 12:51:03 -04:00
Snarling
5b2a96fa0c
CORPORATION: Happiness/Energy/Morale trend down even for productive corps (#157) 2022-10-25 10:32:20 -04:00
Snarling
a79621612f
Only allow one reference to MP in sell price (#156) 2022-10-25 08:51:37 -04:00
quacksouls
3f0a7786f8
DOC: cleanup in doc of Netscript functions (#155)
* A bunch of typographical fixes in the documentation of various Netscript functions.  A main fix is standardizing the use of "hostname".
* Cross-reference the documentation of various Netscript functions.  This makes it clear that we are referring to a particular Netscript function.
* Clarify the return values of various Netscript functions.  Clarify the documentation of other functions.
2022-10-25 07:17:53 -04:00
Snarling
5fe89d5599
CORPORATION: Reorganize Industry data (#154) 2022-10-24 21:54:54 -04:00
Snarling
d7193ca8ff
fix negative time display (#153) 2022-10-24 20:09:10 -04:00
Snarling
df70458e4f
CORPORATION: Give Employees some RNG (#152)
Authored-by: zerbosh <115591472+zerbosh@users.noreply.github.com>
2022-10-24 16:33:25 -04:00
G4mingJon4s
6dc5990b63
CORPORATION: Added check to buy amount (#149) 2022-10-24 16:09:53 -04:00
G4mingJon4s
3861e56ced
CORPORATION: Check there is room to make a new product before opening popup. (#147) 2022-10-24 08:58:51 -04:00
quacksouls
e9e9ac1def
DOC: CCT: typo fixes (#145)
Fixes #144.  Some typographical fixes in the description of a Coding Contract.
2022-10-24 08:46:26 -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
hydroflame
317c3c3fc4
Update NetscriptDefinitions.d.ts 2022-10-22 00:27:29 -04:00
hydroflame
7784c2f8b2
Update NetscriptDefinitions.d.ts 2022-10-22 00:23:10 -04:00
Snarling
d74c380e42
WIP: Crimes streamlining. (#138)
* streamline crimes

* Crimes object is now indexed by CrimeType enum instead of an entirely new set of keys that aren't used for anything else. This eliminated a lot of instances of iterating to find the right crime for a given CrimeType.
* Removed unused `None` CrimeType which allowed typing Crimes as a Record<CrimeType, Crime>.
* Added slums tooltip text as a crime property, to allow streamlining slums.
* Refactor slums location - removed repetitive code, rerenders 1/sec to update chances
* Fix bugged descriptive text when sleeve is committing a crime (was "is attempting to DRUGS", now uses correct text e.g. "to deal drugs").
* Remove unused and now unneeded NewCrimeType enum. Values were identical to existing CrimeType values after removing unused None.

* Add CrimeType enum in NetscriptDefinition.d.ts

* Also update broken ToastVariant type. Better support for enums in player scripts.
* Still todo is modifying some NS functions to expect CrimeType as input (rough crime names will continue to work to avoid breaking scripts)

* Expect enum use for crime functions

Affected functions:
* ns.singularity.commitCrime
* ns.singularity.getCrimeChance
* ns.singularity.getCrimeStats
* ns.sleeve.setToCommitCrime
* formulas.work.crimeGains (param type only)

- Affected functions still will fall back to rough names, except formulas.work.crimeGains which already only accepted the enum members.
- Some documentation changes:
  * examples updated to use uppercase expected form.
  * Note on sleeve.setToCommitCrime that it only accepts exact matches removed. It already, and still does, accept any rough crime name (but the enum is expected input).
  * note about needing to use isBusy to schedule crimes remove - crimes autoloop now.
  * Since expected string inputs are documented directly on the type, removed list of crimes from sleeve.setToCommitCrimes
2022-10-21 11:57:37 -04:00
Snarling
19e8946d9a
fix Stock Initializer (#137)
* stock symbols initializer is called by stockmarket initializer
* remove redundant second initStockMarketFn function
2022-10-20 00:38:19 -04:00
Snarling
1d0d4f8da6
fix grow doc (#136) 2022-10-19 17:25:54 -04:00
Snarling
3af6e7db45
Remove incorrect note about disableLog (#135) 2022-10-19 17:20:31 -04:00
Snarling
2cc6e41a7e
uncaught promises no longer spam console (#134) 2022-10-19 17:13:15 -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
Snarling
b6efe46d4c
slashGame fix (#132)
* difficulty scales correct phase
* player loses game immediately after guard attacks
2022-10-19 15:24:29 -04:00
Olivier Gagnon
af1a1ac58d Rename lots of reference from old to new repo 2022-10-20 03:56:59 +11:00
hydroflame
0f46d72a01
Merge pull request #4245 from dbachran/4239-adjust-write-documentation
MISC: Adjust write() documentation, only accepts strings now
2022-10-19 11:46:08 -04:00
hydroflame
51f8d29e7a
Merge pull request #4247 from quacksouls/doc-prompt
DOC: `ns.prompt()`: some cleanup and examples
2022-10-19 11:45:49 -04:00
hydroflame
532b32c51a
Merge pull request #4248 from borisflagell/hospital
UI: #4242 Fix hospital ReactComponent
2022-10-19 11:45:20 -04:00
hydroflame
1b7b4fa466
Merge pull request #4249 from Snarling/typeAssertion
NETSCRIPT: Fix ns.prompt typechecking
2022-10-19 11:44:59 -04:00
hydroflame
b25b4b5e27
Merge pull request #4255 from quacksouls/doc-gang-canRecruitMember
DOC: `gang.canRecruitMember()`: typo fix and elaboration
2022-10-19 11:44:03 -04:00
Olivier Gagnon
c3b2c6396c lint and made a some code more robust to older save file 2022-10-16 14:25:42 -04:00
Duck McSouls
6f1822bf4d DOC: gang.canRecruitMember(): when this returns true or false
Elaborate on the conditions under which the function would return true or false.  In particular, after a gang is successfully created the function always return true so the player can recruit a number of founding members to their gang.  When the gang is at capacity, the function always return false.  In between, the function returns true or false depending on the amount of respect the player has.
2022-10-16 18:34:34 +11:00
Duck McSouls
ac0e7c9595 DOC: gang.canRecruitMember(): typo fixes
Some typographical fixes.
2022-10-16 17:56:45 +11:00
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
9908f4aaa5 Error message fixes 2022-10-14 11:08:24 -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
borisflagell
baa149fa80 Update HospitalLocation.tsx
Add auto-refreshing to the component
2022-10-14 14:13:53 +03:00
borisflagell
1b61ec0e12 Update HospitalLocation.tsx 2022-10-14 13:59:56 +03: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
6c84d64e67 rm unecessary return type 2022-10-13 01:07:10 -04:00
Olivier Gagnon
4c4f050214 simplify get money source 2022-10-13 00:55:57 -04: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
d0fe28f8fb
Merge pull request #4220 from cptpiepmatz/fix-nano-not-opening-root-script-if-in-dir
UI: Fixed `nano` not correctly opening a script in root of a server if `cd`'d into a directory
2022-10-12 23:58:59 -04:00
hydroflame
14914eb190
Merge pull request #4229 from borisflagell/wxsQDSSQF
SLEEVE: Fix #4194 Bladeburner Contract in Sleeve were not giving proper reward.
2022-10-12 23:54:15 -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
aa39728f67
Merge pull request #4230 from borisflagell/SoA_RepCost
SOA: Fix #3884 Implement unused SoARepMult constant to SoA's augmentations price + linked UI modification
2022-10-12 23:52:14 -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
hydroflame
c1ab4e82f2
Merge pull request #4232 from borisflagell/UI_reputation_color
UI: Fix #3719 Inconsistent colors of reputation gains on Install Augmentations screen
2022-10-12 23:51:23 -04:00
hydroflame
74a1b9b180
Merge pull request #4234 from Jakob002/Jakob002-patch-1
MISC: Fixed typo in Literatures.ts
2022-10-12 23:51:10 -04:00
hydroflame
68e90b8e6e
Merge pull request #4236 from Snarling/typeFix
NETSCRIPT: Fix internal typechecking of functions
2022-10-12 23:50:22 -04:00
omuretsu
e192ad53ec Actually format + lint 2022-10-12 10:18:56 -04:00
Jakob002
c2ed9067e0
MISC: message formatting
Replaced someArray.toString() with someArray.join(", "). This will return "foo, bar, baz" (with spaces) instead of "foo,bar,baz" (no spaces).
2022-10-12 15:16:10 +02: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
Jakob002
fc50625dcf
Fixed typo in Literatures.ts 2022-10-12 08:47:03 +02: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
borisflagell
b3f2fe5e02 Update PlayerMultipliers.tsx 2022-10-11 19:22:06 +03:00
borisflagell
def2cb281b Update AugmentationsPage.tsx 2022-10-11 19:03:58 +03:00
borisflagell
b2886ba623 Update NetscriptDefinitions.d.ts 2022-10-11 18:45:38 +03:00
borisflagell
6c625a5ca3 Update AugmentationsPage.tsx 2022-10-11 18:30:41 +03:00
borisflagell
5c1777a6d4 Update AugmentationsPage.tsx
Tooltip's text refining
2022-10-11 18:29:17 +03:00
borisflagell
125cd04383 Fix #3884
Fix #3884
2022-10-11 18:12:06 +03:00
borisflagell
bbe6421b06 Update Bladeburner.tsx
Prettier
2022-10-11 15:33:55 +03:00
borisflagell
f3becee15b Fix Bladeburner Contract in Sleeve 2022-10-11 15:25:16 +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
Tim Hesse
7121b456f4 fix: nano does not open root script if cd'd into a dir 2022-10-09 14:49:18 +02:00
Olivier Gagnon
3c03ac4f18 fix fileExists not finding coding contrafcts 2022-10-09 02:57:43 -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
0fdf74ceeb typo 2022-10-09 01:32:44 -04:00
Olivier Gagnon
f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -04:00
hydroflame
f8a3a046de
Merge pull request #4156 from G4mingJon4s/contractFix
Coding Contract: Saving and reloading no longer generates extra coding contracts.
2022-10-09 00:31:42 -04:00
hydroflame
608ea0ba59
Merge pull request #4196 from connertennery/4125
INFILTRATION: Slash minigame fixed so attacking when the guard is preparing doesn't cause failure, fixed indicator when player has Might of Ares augmentation
2022-10-09 00:29:59 -04:00
hydroflame
87ad634859
Merge pull request #4201 from stalefishies/has-augmentation-fix
MISC: Fix bug in person.hasAugmentation
2022-10-09 00:27:05 -04:00
hydroflame
b0ba0b30b5
Merge pull request #4211 from fdellwing/patch-2
FACTION: Include BN multiplier in faction donation
2022-10-09 00:26:16 -04:00
hydroflame
0e26515c81
Merge pull request #4213 from borisflagell/SleeveZOE
STANEK: Reapply aug's multiplier to sleeve when applying Stanek gift to them
2022-10-09 00:25:52 -04:00
hydroflame
c930487c21
Merge pull request #4215 from borisflagell/crime-sleeve
SLEEVE: Fixes 2 issues in Sleeve's implementation of crime work
2022-10-09 00:25:13 -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
hydroflame
ed0a28d292
Merge pull request #4207 from quacksouls/doc-prettier
DOC: no trailing whitespace
2022-10-09 00:22:25 -04:00
borisflagell
6d86852969 FIX crime by sleeve
Bitnode multiplier was applied twice in th UI.
Sleeve's multiplier weren't applied (neither in UI, nor engine).
2022-10-08 17:19:20 +03:00
borisflagell
08b6c7a177 Fix #4195
Whenever StanekGift updated Sleeve's mult,
all mult were reset to default value (1.0 usually).
then stanek mult were merged.
but aug's mults never were.

=> Added a small loop to StanekGift updateMults() which reapply Aug's mult.
2022-10-08 15:28:51 +03:00
Duck McSouls
1d739f295c DOC: gang task: typo fix
The current version `black mail` should be `blackmail` because the description is referring to the crime of blackmail.
2022-10-08 14:21:30 +11:00
Fabian Dellwing
ea39e5e1f4
Include BN multiplier in faction donation 2022-10-07 21:28:19 +02: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
Staszek Welsh
ad8c7b7ffe Fix change in behaviour of person.hasAugmentation 2022-10-04 22:55:35 +01:00
Conner Tennery
40e8e82b6d
Merge branch 'dev' into 4125 2022-10-04 09:39:12 -07:00
hydroflame
4d1e72bf7a
Merge pull request #4172 from Snarling/IPs-fix
CCT: Generate IPs contract type accepts properly formatted js array
2022-10-04 11:58:26 -04:00
hydroflame
075daf6fac
Merge pull request #4175 from mycroftjr/patch-2
BLADEBURNER: Make Datamancer apply to Tracking
2022-10-04 11:47:46 -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
2b8ced4fff
Merge pull request #4182 from OverlordQ/patch-1
MISC: Remove spurious console spam
2022-10-04 11:45:09 -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
Conner Tennery
0d6b6b404d
fix "Slash when his guard is down!" actually means "Slash when he's attacking!" Also the Might of Ares timer is wrong. #4125
- Added ignoreAugment_WKSharmonizer to GameTimer to allow for strict, unmodified timers
- Changed SlashGame failure check
- Changed `timeUntilAttacking` value so the progress bar in SlashGame is accurate
2022-10-03 01:42:17 -07: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
ab56d18e1e group initializers 2022-10-01 15:49:23 -04:00
Snarling
3addda7173 format and lint 2022-10-01 15:15:36 -04:00
Snarling
9774235404 initial test fix attempt 2022-10-01 15:03:47 -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
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
OverlordQ
046ba80935
Update killWorkerScript.ts
Remove spurious console debugging line
2022-09-29 08:20:49 -04:00
hydroflame
5e4a393495
Merge pull request #4180 from Snarling/growthAnalyzeSecurityFix
NETSCRIPT: growthAnalyzeSecurity no longer fails if the optional cores parameter was omitted
2022-09-29 01:09:21 -03:00
Snarling
b682d441e3 better fix for cores check 2022-09-29 00:02:33 -04:00
Snarling
17be0911b2 fix growthAnalyzeSecurity 2022-09-28 23:59:58 -04:00
Olivier Gagnon
cb064ce8d7 fix new save file not loading 2022-09-28 23:35:01 -04:00