Commit Graph

156 Commits

Author SHA1 Message Date
LJ f6871f0911 GANG: Clarify install behavior & add getInstallResult() (#1119)
New function returns post-install ascension ratios.

* Add ascension penalty to Gang constants
* Improve wording of Gang install message
* Add GangMember#getInstallResults()
* Update prestiging to use getInstallResults()
* Add ns.gang.getInstallResults(memberName)
* Update definitions
* Add ram cost for ns.gang.getInstallResult()
* Fix typo
* More specific wording in documentation
* Fix another typo
* Run prettier
* Rename getInstallResults to getPostInstallPoints
* Update Prestige.ts
* Update Gang.ts
2024-02-23 12:58:22 -08:00
LJ 157ff8ea88 PORTS: Add ns.nextPortWrite() as a safer option (#1036) 2024-01-15 06:10:39 -05:00
Michael Ficocelli 7ef12a0323 BITNODE: IPvGO territory control strategy game (#934) 2023-12-26 11:45:27 -05:00
Jesse Clark 473217ef31 API: Programming-friendly interface to getFactionInviteRequirements (#953) 2023-12-16 04:27:22 -05:00
Snarling f93bbfbd5d UPDATE: 2.5.1 Release (#952) 2023-11-30 16:46:56 -05:00
Jesse Clark fdcb8306d9 FACTIONS: Add "Rumors" system for learning about faction join requirements (#888) 2023-11-02 10:20:24 -04:00
Jesse Clark 61c311a126 API: Add nextUpdate() promise for systems with bonus time (#845) 2023-10-23 04:24:30 -04:00
missymae#2783 1007ce5e68 API: Add ns.bladeburner.getNextBlackOp() (#815) 2023-10-17 02:18:54 -04:00
Jesse Clark ad6f919d64 CORPORATION: Dramatically lower API RAM costs (#818) 2023-09-27 17:38:30 -04:00
missymae#2783 8d3f2bd750 GANG: Updates to Docs, UI, API (#773)
API Changes:
Adds ns.gang.getRecruitsAvailable: Gets the number of additional gang members that can currently be recruited
Adds ns.gang.respectForNextRecruit: Gets the respect threshold for recruiting the next gang member
Adds ns.gang.renameMember: Renames a gang member

Plus many doc and ui improvements
2023-09-05 18:07:19 -04:00
Snarling 4ca598defb API: Fix removed functions (#720) 2023-08-07 02:38:38 -04:00
myCatsName aed01b0979 NETSCRIPT: added ns.singularity.getAugmentationFactions (#706) 2023-08-06 00:04:36 -04:00
Snarling 1c6369ffa4 NETSCRIPT: Add ns.stock.getConstants (#692) 2023-07-31 23:08:42 -04:00
David Walker 4503da6226 UI: LogBox overhaul (#508) 2023-05-26 08:07:37 -04:00
G4mingJon4s 113af6e711 Add ns.getFunctionRamCost (#526) 2023-05-26 07:46:08 -04:00
Snarling 87f2ae459d UI: Better support for custom player React content (#513) 2023-05-22 05:28:24 -04:00
Snarling 2ae3ac52f1 CORPORATION: Corp changes prior to 2.3 finalization (#503) 2023-05-15 18:06:57 -04:00
Snarling 6024c81113 NETSCRIPT: add ns.getResetInfo(#490)
* Move lastAugReset and lastNodeReset back to main API under getResetInfo, also included currentNode.
* The associated properties are deprecated on getPlayer()
2023-04-25 05:22:36 -04:00
G4mingJon4s d01ba91654 SINGULARITY: Added aug and node identifiers (timestamps of last resets) (#472) 2023-04-12 13:13:42 -04:00
T.J. Eckman 677686fa20 SINGULARITY: getCompanyPositionInfo (#460) 2023-04-04 12:00:54 -04:00
T.J. Eckman df334ea6de SINGULARITY: Added getCompanyPositions (#459)
Also workForCompany will throw an error if provided a bad company name, instead of returning false
2023-04-01 21:30:46 -04:00
Zelow79 eb8bcd00e3 NETSCRIPT: reduce RAM cost for renamePurchasedServer to 0 (#450) 2023-03-28 16:01:09 -04:00
Mughur 1f98eecb57 CORP: rework (#428)
* corp overhaul: Corp production quality now depends on materials

* corp overhaul: Product price can be set separately for each city

* corp overhaul: export uses relatives

* corp overhaul: ignore energy in quality

* corp overhaul: getProduct() is city dependant

* corp overhaul: bulkbuy available from start

* corp overhaul: add multibuy for leveled upgrads

* corp overhaul: changes to UI

* corp overhaul: base quality 1, reqmat changes

* corp overhaul: puchased material quality is 1

* corp overhaul: get rid of the text box from ta2

* corp overhaul: sold shares limitations

* corp overhaul: coffee -> tea, training -> intern

* corp overhaul: smartsupply has multiple options

* corp overhaul: restart, literature, investore, ui

* corp overhaul: nerf advertising

* corp overhaul: bunch of stuff
2023-03-18 03:12:43 +02:00
Zelow79 028199aa7d SLEEVE: Add sleeve.setToIdle function (#374) 2023-02-19 00:13:23 -05:00
David Walker ed59f4bfe7 NETSCRIPT: Add growThreads to formulas, improve docs for hacking functions (#330) 2023-02-14 17:38:51 -05:00
Snarling b4074328ec UI: Added new locale-aware and configurable number formatting (#354) 2023-02-11 13:18:50 -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
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
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
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 0ec4ef31ab 2.2 2023-01-02 13:20:25 -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
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
omuretsu 1dec0d00bd Add documentation for ns.pid 2022-12-13 09:09:12 -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 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 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 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 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
Olivier Gagnon ae5fc168bf Add getMoneySources 2022-10-13 00:10:59 -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