Commit Graph

20 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
Olivier Gagnon
cbb7f58231 Make the main player object an alias, makes it easier to import 2022-10-09 18:42:14 -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
Olivier Gagnon
326d9fd7ef Move player skills and exp to their struct 2022-07-26 23:54:17 -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
rderfler
d1388a62aa Merge branch 'dev' of https://github.com/rderfler/bitburner into dev 2022-04-14 11:41:02 -04:00
rderfler
2613948bad Add bladeburner actions to sleeves
This adds bladeburner actions to sleeves. In addition this bulked out the IPerson functionality and updated bladeburner functions to be more sleeve compatible
2022-04-14 11:40:59 -04:00
Olivier Gagnon
48f80f25d6 fmt and lint 2022-04-06 19:30:08 -04:00
BB
4eb59ac70c Turned on no-useless-concat lint and fixed it in code 2022-03-16 20:44:52 +01:00
nickofolas
ab841f7530 Refactor for ... in loops 2022-01-15 18:45:03 -06:00
Olivier Gagnon
15b3a82a41 plenty of bug fix. 2021-11-10 19:28:20 -05:00
Olivier Gagnon
88b4a7d862 bugfix 2021-11-05 17:12:52 -04:00
Olivier Gagnon
14150d3e33 work on making the netscript api tighter 2021-11-03 20:19:52 -04:00
Olivier Gagnon
2578ea51c3 fix blade time 2021-11-03 13:43:03 -04:00
Olivier Gagnon
b2bf3fc21f v1 api breaks 2021-11-02 22:11:22 -04:00
Olivier Gagnon
63939509e5 Chaos has a bigger effect and Incite Violence has diminishing return 2021-10-22 15:54:14 -04:00
Olivier Gagnon
5ba7b2796d build gang in mui 2021-10-01 15:39:56 -04:00
Olivier Gagnon
86678b6290 convert blade to mui 2021-09-27 17:09:48 -04:00