Commit Graph

7672 Commits

Author SHA1 Message Date
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
5a66045e1d format fix 2022-12-13 09:13:15 -05:00
omuretsu
1dec0d00bd Add documentation for ns.pid 2022-12-13 09:09:12 -05:00
omuretsu
75d2d8b7e8 Add documentation for ns.pid 2022-12-13 09:08:23 -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
David Walker
ce1879fb62
Add a test for basic Netscript functionality. (#235) 2022-11-29 07:32:08 -05:00
omuretsu
6a4d40ce2b Update docs 2022-11-28 10:44: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
629d610532
Update and rename deploy.yml to deploy-dev.yml 2022-11-20 08:16:22 -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