Commit Graph

92 Commits

Author SHA1 Message Date
Jesse Clark
417671ecb8
CORPORATION: Account for CapEx and Cap Gains differently (#977) 2023-12-16 04:56:57 -05:00
Jesse Clark
902306530c
CORPORATION: Use accounting methods for all funds transactions (#949) 2023-12-07 21:22:21 -05:00
TheAimMan
ca12bddaf5
BUGFIX: Check Corp Research pre-reqs in research api call (#884) 2023-10-30 03:09:34 -04:00
TheAimMan
71e37823dd
BUGFIX: Update warehouseSizeUsed after bulk purchase (#871) 2023-10-23 04:54:43 -04:00
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
bf5e638891
CORPORATION: Fix "Use same 'Sell Amount' for all cities" toggle for products (#775) 2023-09-12 04:31:51 -04:00
Snarling
312e3eb71f
Fix for invalid materials in warehouse (#660) 2023-07-05 19:36:22 -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
Kateract
cc5247ac89
Update exportMaterial amount to number | string (#583) 2023-06-07 13:48:23 -04:00
Snarling
c67f32cdc1
CORP: Validate city with office for product development (#579) 2023-06-07 00:30:10 -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
Snarling
1aa53739cc Hotfix 30 May 2023 (#555) 2023-05-30 18:48:16 -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
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
omuretsu
867236e153 autoAssignJob streamlining 2023-01-29 08:14:12 -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
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
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
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
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
cbb7f58231 Make the main player object an alias, makes it easier to import 2022-10-09 18:42:14 -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
38063f62a7 build fix, lint, remove some instanceof checks 2022-09-27 16:09:32 -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
Mughur
d99d37f191 Bunch of corporation fixes 2022-09-23 13:13:33 +03:00
phyzical
016dbe67d9
add an early out if already researched
hotfix/3977

File List:
src/Corporation/Actions.ts
2022-08-17 17:46:18 +08:00
Staszek Welsh
75a9151e74 Merge branch 'dev' into corp-remove-async 2022-07-20 21:12:27 +01:00
Staszek Welsh
02b07bb332 Fix relevant linter errors and run formatter 2022-06-02 22:54:50 +01:00
Staszek Welsh
ba7b76369b Remove industry upgrades
There are only two industry upgrades, one of which is buying coffee
which is not an upgrade, and for the office not the industry. Moving
that to the office leaves just hiring AdVerts, which is better as an
explicitly named set of methods.
2022-06-02 02:43:22 +01:00
Staszek Welsh
04efd899a0 Remove async from buyCoffee and throwParty 2022-06-01 23:36:15 +01:00
Staszek Welsh
ffaa38d086 Unify code paths for buying coffee and throwing parties 2022-06-01 23:26:32 +01:00
Staszek Welsh
b9356ea782 Only switch employee jobs at the start of corp cycles 2022-06-01 18:11:33 +01:00
Staszek Welsh
8d474a7610 Change corporation.dividendPercentage to corporation.dividendRate 2022-05-30 21:45:36 +01:00
Olivier Gagnon
d8382ec762 Corp upgrades are now defined types 2022-04-14 00:21:33 -04:00
phyzical
43248bbc42 merge dev 2022-04-07 16:25:33 +08:00
phyzical
10fafd39f3 fix the amt issue for modal also 2022-04-02 20:17:30 +08:00
phyzical
0fbb8553e6 add fix for bulk buy when purchase amount exceeds warehouse size
* add logic to disable button when input is invalid
2022-04-02 19:38:26 +08:00
BB
c7a95ccb2d Fixed eslint warning for unused vars 2022-04-02 13:11:55 +02:00
phyzical
50cfa99b24 fix for reseting limit production
closes #3175
2022-04-01 23:21:05 +08:00