Commit Graph

207 Commits

Author SHA1 Message Date
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
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
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
f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -04:00
hydroflame
a5b2512269
Merge pull request #4205 from Snarling/ramTestFix
TESTS: Refined ram calculation tests
2022-10-09 00:23:04 -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
MycroftJr
c7d85e1d42
Make Datamancer apply to Tracking
Makes the Datamancer skill for Bladeburner apply to the Population Estimate change of the Tracking contract. If this was not desired, then the description of Datamancer needs to be made more accurate :D
2022-09-27 22:08:14 -07:00
Snarling
38063f62a7 build fix, lint, remove some instanceof checks 2022-09-27 16:09:32 -04:00
Snarling
6e3a6be106 Remove some redundant typing 2022-09-27 15:35:42 -04:00
Snarling
557bc12562 More classes as types 2022-09-27 15:35:42 -04:00
Snarling
2213d06159 Using bladeburner and action classes as types 2022-09-27 15:35:41 -04:00
Snarling
c510e47885 Player is now a Person
Use correct class inheritance, use class as type and remove IPlayer
2022-09-27 15:35:41 -04:00
Snarling
91a69d7d8f format & lint 2022-09-27 15:35:40 -04:00
Snarling
a21b1029d7 No more player/router context 2022-09-27 15:35:40 -04:00
Snarling
83d357e758 commit1 2022-09-27 15:35:40 -04:00
Kelenius
aeedcad96d Removed three empty lines from BB status screen 2022-09-07 13:12:40 +03:00
Olivier Gagnon
04f811276a allbuild commit a0475cc6 2022-08-29 10:35:30 -04:00
Mughur
cf09057836 BB action rewards now tied to who does the action 2022-08-28 13:20:27 +03:00
Olivier Gagnon
3b35b07860 remove unused fields on sleeves 2022-07-28 03:08:39 -04:00
Olivier Gagnon
4549b0d467 finish sleeve rework 2022-07-28 02:46:34 -04:00
Olivier Gagnon
326d9fd7ef Move player skills and exp to their struct 2022-07-26 23:54:17 -04:00
Olivier Gagnon
d01fd55bde lint fmt 2022-07-21 01:58:47 -04:00
hydroflame
ab674980bd
Merge pull request #3852 from TheCrazyT/dev
BLADEBURNER: FIX reduce redundant code in Bladeburner.tsx
2022-07-21 01:32:44 -04:00
Olivier Gagnon
c9b9c2c55b merge dev 2022-07-20 12:16:42 -04:00
Olivier Gagnon
6afeb6972f fix any in IBladeburner 2022-07-18 03:16:36 -04:00
Olivier Gagnon
ceed844523 fix any in Console 2022-07-18 03:13:31 -04:00
Olivier Gagnon
691770fa9b fix any in SkillPage 2022-07-18 03:04:58 -04:00
Olivier Gagnon
40ad1a4758 fix any in SkillElem 2022-07-18 03:03:07 -04:00
hydroflame
f339e49aa7
Merge pull request #3787 from Undeemiss/bladeburner-multi-upgrade
BLADEBURNER: Added bulk upgrades to upgradeSkill NS API
2022-07-15 23:40:55 -04:00
Olivier Gagnon
4bee746576 rm any 2022-07-15 01:51:30 -04:00
Olivier Gagnon
6b630753f0 nuke some use of any 2022-07-14 19:00:10 -04:00
Olivier Gagnon
5629c16def extract multipliers in its own type 2022-07-14 18:43:33 -04:00
Olivier Gagnon
0550bc188c refactor some stuff 2022-07-14 17:43:08 -04:00
Olivier Gagnon
fac6633347 remove so many fields and values used by the old system 2022-07-12 23:13:40 -04:00
Olivier Gagnon
e86a42716c lint 2022-07-11 15:58:23 -04:00
hydroflame
4f617e7d3d
Merge pull request #3818 from ApamNapat/fixed_some_typos_and_style_issues
MISC: Fixed some typos and style issues
2022-07-06 14:35:31 -04:00
hydroflame
9f6ba6c802
Merge pull request #3864 from marcowesii/patch-1
DOCUMENTATION: arguments documentation example for ns2 scripts
2022-07-06 14:28:42 -04:00
TheCrazyT
6f7981ff25
Merge branch 'dev' into dev 2022-06-18 22:10:38 +02:00
TheCrazyT
d052d40612
reduce redundant code in Bladeburner.tsx 2022-06-18 21:40:33 +02:00
BB
de01ae20b9 Fixed some typos and style issues 2022-06-07 15:26:33 +02:00
Undeemiss
a0bff34761 Refactored the internal calculateCost function for readability 2022-05-29 11:35:28 -05:00
Undeemiss
06acc423ae Added count to NS cost function, input checking, fixed documentation
Also changed upgradeSkill back to returning a bool instead of a
number.
2022-05-29 11:13:49 -05:00
Undeemiss
f8f3c099e0 Formatted/linted (There are some errors, but they aren't mine afaik) 2022-05-28 21:35:20 -05:00
Undeemiss
8b026f606b Fixed off-by-one error in the fast calculateCost function
The off-by-one error was in the original sum, so it's not obvious
in the simplified version of the sum. Fixing this greatly improved
the accuracy of the simple calculation for small counts, but I'm
leaving the recursive mode in. Maybe I'll lower the threshold,
though. 100 isn't a terribly small number.
2022-05-28 21:26:11 -05:00
Undeemiss
8d9e077b66 calculateCost now works more accurately for count<=100 2022-05-28 21:06:25 -05:00
Undeemiss
908d5e9570 Proof-of-concept, handling purchases of 1e150 lvls at once
Threw something together with a formula that should, for large
purchases, be roughly the same cost as normal. The formula change
may cause noticeable deviation from expected costs for low numbers
of upgrades, though, so I plan to fix that by having high
quantities handled differently than low ones if necessary.
2022-05-28 20:37:33 -05:00
Undeemiss
709fc3ab63 Began attempting to implement a multi-upgrade function for bb 2022-05-28 14:12:07 -05:00
Olivier Gagnon
f2721fefd2 Bladeburner final op no longer directly sends you to the bitverse but instead makes a button appear that sends you there 2022-05-26 12:59:05 -04:00