Commit Graph

108 Commits

Author SHA1 Message Date
omuretsu
e42b1c2edd lint 2022-11-03 08:46:01 -04:00
omuretsu
b057e2e5f2 Fix sleeves unable to commit crime 2022-11-03 08:39:34 -04:00
Snarling
d74c380e42
WIP: Crimes streamlining. (#138)
* streamline crimes

* Crimes object is now indexed by CrimeType enum instead of an entirely new set of keys that aren't used for anything else. This eliminated a lot of instances of iterating to find the right crime for a given CrimeType.
* Removed unused `None` CrimeType which allowed typing Crimes as a Record<CrimeType, Crime>.
* Added slums tooltip text as a crime property, to allow streamlining slums.
* Refactor slums location - removed repetitive code, rerenders 1/sec to update chances
* Fix bugged descriptive text when sleeve is committing a crime (was "is attempting to DRUGS", now uses correct text e.g. "to deal drugs").
* Remove unused and now unneeded NewCrimeType enum. Values were identical to existing CrimeType values after removing unused None.

* Add CrimeType enum in NetscriptDefinition.d.ts

* Also update broken ToastVariant type. Better support for enums in player scripts.
* Still todo is modifying some NS functions to expect CrimeType as input (rough crime names will continue to work to avoid breaking scripts)

* Expect enum use for crime functions

Affected functions:
* ns.singularity.commitCrime
* ns.singularity.getCrimeChance
* ns.singularity.getCrimeStats
* ns.sleeve.setToCommitCrime
* formulas.work.crimeGains (param type only)

- Affected functions still will fall back to rough names, except formulas.work.crimeGains which already only accepted the enum members.
- Some documentation changes:
  * examples updated to use uppercase expected form.
  * Note on sleeve.setToCommitCrime that it only accepts exact matches removed. It already, and still does, accept any rough crime name (but the enum is expected input).
  * note about needing to use isBusy to schedule crimes remove - crimes autoloop now.
  * Since expected string inputs are documented directly on the type, removed list of crimes from sleeve.setToCommitCrimes
2022-10-21 11:57:37 -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
f6f023eeb4 Fix tons of typos 2022-10-09 01:25:31 -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
a4b7128e6c Sleeve bladeburner fix 2022-09-27 16:36:37 -04:00
Snarling
16fac67257 fix broken rebase 2022-09-27 16:23:53 -04:00
Snarling
38063f62a7 build fix, lint, remove some instanceof checks 2022-09-27 16:09:32 -04:00
Snarling
8a9515f154 More classes as types 2022-09-27 16:08:16 -04:00
Snarling
0dbe80a841 Player is now a Person
Use correct class inheritance, use class as type and remove IPlayer
2022-09-27 16:07:58 -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
475a8812bb findSleevePurchasableAugs as a class member 2022-09-27 15:35:41 -04:00
Snarling
83d357e758 commit1 2022-09-27 15:35:40 -04:00
Olivier Gagnon
fb197be206 Fix hostname generation being weird about dash 0 added 2022-09-23 12:04:21 -04:00
hydroflame
944ee71ab9
Merge pull request #4065 from Snarling/sleeveBladeContractFix
SLEEVES: FIX #4063 fix crash when player tries to assign more than 3 sleeves to Bladeburner contracts
2022-09-23 00:59:46 -03:00
Noah Kantrowitz
232dcab5cd Reset sleeves to max HP when starting a new node. 2022-09-10 17:44:50 -07:00
Noah Kantrowitz
596a04515d Allow using the regeneration chamber with sleeves to heal them.
This also allows using sleeves to generate stamina faster even if at full HP.
2022-09-10 17:39:40 -07:00
Snarling
e8c8bb76ff Don't let sleeve start invalid contract 2022-08-30 09:26:24 -04:00
Mughur
bf33734def Sleeve shock goes down, but not to negative 2022-08-25 18:49:01 +03:00
Olivier Gagnon
39cf0cb57f allbuild commit 8e859d84 2022-07-29 17:05:56 -04:00
Olivier Gagnon
07c7f0641a allbuild commit c8440ef2 2022-07-28 14:35:55 -04: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
ebe953b498 work on sleeve new work system 2022-07-27 20:37:32 -04:00
Olivier Gagnon
315b2adf30 Make invalid hostname better 2022-07-27 00:59:43 -04:00
Olivier Gagnon
7f72d77428 clean some sleeve stuff 2022-07-27 00:50:21 -04:00
Olivier Gagnon
326d9fd7ef Move player skills and exp to their struct 2022-07-26 23:54:17 -04:00
Olivier Gagnon
1d46adbce1 allbuild commit fc0fef59 2022-07-21 19:37:05 -04:00
hydroflame
b66d7e7d51
Merge branch 'dev' into FIX#3366 2022-07-21 16:17:08 -04:00
hydroflame
5d3955de50
Merge pull request #3795 from borisflagell/FIX#3794
SLEEVE: FIX #3794 Sleeve were getting less shocked when hospitalized (was positive, should have detrimental)
2022-07-21 02:15: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
Olivier Gagnon
f7805c4a51 convert faction work to new work system 2022-07-12 01:54:19 -04:00
borisflagell
2f1d47b466 SLEEVE: FIX #3794 2022-05-29 21:17:04 +02:00
borisflagell
8af4fb1d5a UI: Fix #3366 Sleeve UI would sometime display the stat in TaskSelector while working out.
fixes #3366

 Sleeve.gymStatType will now be constrainded to the following values by Sleeve.workoutAtGym() :
"none" , "str", "def", "dex", "agi". (could previously be anything inputted by player through API)
Sleeve.updateGainTaskRate() and TaskSelector.tasks's initializer block will now use a switch, expecting one of those value, instead of reevaluating the string.

(fixing commit issue)
2022-05-24 15:08:47 +02:00
Olivier Gagnon
27a8582df8 balance infiltrate synthoids 2022-05-20 18:18:42 -04:00
Olivier Gagnon
42dcbf889e fix typo 2022-05-20 17:28:21 -04:00
rderfler
77073836cb Merge remote-tracking branch 'upstream/dev' into dev 2022-05-06 22:44:24 -04:00
rderfler
7cf21629a7 Address review
Add ns function setToBladeburnerAction
Formatting updates
fix sleeves using player stamina
Correct supporting sleeve causing error
2022-04-30 15:25:36 -04:00
phyzical
a7a725de22 merge dev 2022-04-26 20:58:39 +08:00
rderfler
46c6884c89 Make Infiltrate synthoids a little more clear
By adding a short description
2022-04-25 15:48:02 -04:00
rderfler
5f46775950 Cant stop wont stop studying
Correct merge, and known bug that prevents stopping studying
2022-04-25 13:41:43 -04:00
rderfler
e381e857a5 Merge remote-tracking branch 'upstream/dev' into dev 2022-04-25 13:32:38 -04:00
nickofolas
d576d5e063 Reset Sleeve task if faction becomes gang 2022-04-24 20:25:09 -05:00
rderfler
332b803332 Fmt and lint 2022-04-14 15:28:13 -04:00
phyzical
db97125d22 remove level, base cost and rep requirment from base augmentation obj
* added in place calculations for cost and level of augmentations given player context
* removed redundant logic for dynamically calculating cost,rep and level against the augmentation object
* replaced references to startingCost to baseCost as it is now always whatever it started at
2022-04-15 01:39:38 +08:00
rderfler
9d18118208 Format, but git forgot this last time 2022-04-14 12:00:17 -04:00
rderfler
0406272942 Clean up
linter
2022-04-14 11:57:01 -04:00
rderfler
d1388a62aa Merge branch 'dev' of https://github.com/rderfler/bitburner into dev 2022-04-14 11:41:02 -04:00