Commit Graph

129 Commits

Author SHA1 Message Date
Jesse Clark 3ae3f947ac CORPORATION: Rework share price calculation + UI improvements (#782) 2023-09-20 00:36:48 -04:00
Yichi Zhang 1b81fe8766 CORPORATION: Rework valuation calculation (#789) 2023-09-19 08:47:16 -04:00
Caldwell bba2ccd83a CORPORATION: add issueNewSharesCooldown and makesMaterial (#774) 2023-09-12 01:23:36 -04:00
Snarling 4ca598defb API: Fix removed functions (#720) 2023-08-07 02:38:38 -04:00
omuretsu 61a27fb9c7 Fix default value for hireEmployee
Not providing a position now hires unassigned just like the documentation says
2023-07-11 11:50:55 -04:00
Snarling 3981f72149 Add investment info to API representation of product (#661) 2023-07-05 19:50:29 -04:00
Snarling 312e3eb71f Fix for invalid materials in warehouse (#660) 2023-07-05 19:36:22 -04:00
Snarling 9a0a843ffc TYPESAFETY: FactionName (#644) 2023-06-25 22:53:35 -04:00
Snarling a4b826683e TYPESAFETY: Strict internal typing for AugmentationName (#608) 2023-06-16 17:52:42 -04:00
Snarling 6732549196 ENUMS: Initial Enum Helper rework + Reorganization (#596) 2023-06-12 00:34:20 -04:00
Aleksei Bezrodnov 174f10d1f5 MISC: tiny corp code style improvement (#586) 2023-06-09 19:34:35 -04:00
Snarling cbff2a420b CORP: Robotics industry NaN fix + better exports validation (#578) 2023-06-06 23:50:23 -04:00
Kateract 10215a924c CORP: Add maxProducts property to division, consolidate maxProducts logic (#551) 2023-06-01 15:20:54 -04:00
omuretsu c1f842e5c7 More corporation renaming
Just renaming files / functions. Industries are the static categories that divisions can operate within, divisions are the actual branches of the company. A lot of stuff was still written as if Industries are the actual branches of the company, which is even less accurate now that a corporation is allowed to have multiple divisions operating in the same industry.

Also removed the incorrect tooltip description of what tea does (it's now just a flat +2 increase)
2023-05-17 17:28:24 -04:00
Snarling 2ae3ac52f1 CORPORATION: Corp changes prior to 2.3 finalization (#503) 2023-05-15 18:06:57 -04:00
Snarling ebae35b1fb CODEBASE: Expand lint rules, and Aliases are stored as maps (#501) 2023-05-05 03:55:59 -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
Snarling b9a2953fa6 Add totalExperience property to getOffice (#367) 2023-02-14 01:38:22 -05:00
omuretsu 867236e153 autoAssignJob streamlining 2023-01-29 08:14:12 -05:00
Christian Roy d7439aae52 Fix setAutoAssignJob parameter validation. (#339) 2023-01-29 07:39:01 -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
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 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
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
Snarling 14e50e5533 Some corp fixes (#236) 2022-11-29 08:24:04 -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 5b2a96fa0c CORPORATION: Happiness/Energy/Morale trend down even for productive corps (#157) 2022-10-25 10:32:20 -04:00
Snarling 5fe89d5599 CORPORATION: Reorganize Industry data (#154) 2022-10-24 21:54:54 -04:00
G4mingJon4s 6dc5990b63 CORPORATION: Added check to buy amount (#149) 2022-10-24 16:09:53 -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
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
Olivier Gagnon 0fdf74ceeb typo 2022-10-09 01:32:44 -04:00
Snarling 068533cd2f format, lint, more enums, revert fn rename 2022-10-05 14:52:48 -04:00
Snarling 50f14b4f58 Commit1 2022-10-03 12:12:16 -04:00
Snarling bc7c15ad77 corp: classes are types 2022-09-27 15:35:42 -04:00
Snarling 83d357e758 commit1 2022-09-27 15:35:40 -04:00
hydroflame 5101b345ec Merge pull request #4069 from Mughur/corp
API: Corp functions now return copy of constant arrays instead of the original
2022-09-23 00:58:32 -03:00
hydroflame ee67aa90f9 Merge pull request #4131 from Mughur/valuation
CORPORATION: Gave investors some economics classes
2022-09-23 00:58:06 -03:00
hydroflame a8e640e309 Merge pull request #4084 from Rasmoh/expose_exports
CORPORATION API: FIX #3655 Expose exports from Material
2022-09-23 00:46:28 -03:00
Mughur d4c06eba24 Change corporatio valuation calculations 2022-09-23 05:05:18 +03:00
Rasmoh cc0fd197c5 Expose exports from Material 2022-09-05 17:25:32 -07:00
phyzical 2a8ddb8147 fix up param order to match docs
hotfix/4058

File List:
src/NetscriptFunctions/Corporation.ts
2022-09-02 11:58:12 +08:00
Mughur c467a49a38 corp functions now return copy instead of original 2022-08-31 12:05:36 +03:00
Risenafis b224321222 fix selfFund was reversed 2022-08-20 23:37:39 +09:00