Commit Graph

125 Commits

Author SHA1 Message Date
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
hydroflame
c930487c21
Merge pull request #4215 from borisflagell/crime-sleeve
SLEEVE: Fixes 2 issues in Sleeve's implementation of crime work
2022-10-09 00:25:13 -04:00
borisflagell
6d86852969 FIX crime by sleeve
Bitnode multiplier was applied twice in th UI.
Sleeve's multiplier weren't applied (neither in UI, nor engine).
2022-10-08 17:19:20 +03: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
475a8812bb findSleevePurchasableAugs as a class member 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
Mughur
5e0d284cf0 updated sleeve FAQ 2022-09-23 16:01:53 +03:00
Noah Kantrowitz
e4961f452e ✏️ Copy paste typo. 2022-09-10 17:52:06 -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
Mughur
9d1b48e076 Fixing my previous mistakes 2022-08-26 00:30:27 +03:00
Mughur
2e4e7fadfc fix Sleeve UI gains 2022-08-25 18:19:14 +03: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
326d9fd7ef Move player skills and exp to their struct 2022-07-26 23:54:17 -04:00
hydroflame
b66d7e7d51
Merge branch 'dev' into FIX#3366 2022-07-21 16:17:08 -04:00
hydroflame
8f7bbaf62c
Merge pull request #3723 from borisflagell/FIX#3132
UI: Fixes #3132 several Sleeve can no longer works concurrently in the same company
2022-07-21 02:27:59 -04:00
Olivier Gagnon
c977a9def7 tidy up eslint.js 2022-07-19 12:19:32 -04:00
Olivier Gagnon
9057bcc8fb fix any in StatsElement 2022-07-18 03:11:49 -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
BB
de01ae20b9 Fixed some typos and style issues 2022-06-07 15:26:33 +02:00
borisflagell
9091441389 Prettier
(fixing commit issue)
2022-05-24 15:09:43 +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
borisflagell
08d8f405c0 UI: Fixes #3132 several Sleeve can no longer works concurrently in the same company
fixes #3132
fixes #3394

Fixed the faulty possibleJob() logic in Sleeve/UI/TaskSelector
2022-05-23 19:31:46 +02:00
rderfler
b683bc0340 fmt 2022-05-08 14:14:05 -04:00
rderfler
77073836cb Merge remote-tracking branch 'upstream/dev' into dev 2022-05-06 22:44:24 -04:00
nickofolas
bcb6176952 Merge branch 'dev' into improvement/work-in-progress-ui 2022-05-04 12:28:33 -05:00
hydroflame
44641fee07
Merge pull request #3544 from phyzical/feature/refactor-augmentation
REFACTOR:  augmentation cost, rep cost and level to be calculated in place
2022-05-04 12:08:24 -04:00
phyzical
0767043166 added logic to avoid stale object reference on sleeve during augmentation 2022-05-03 19:22:05 +08:00
nickofolas
d942d27a85 Reduce component usage in sleeve element 2022-05-02 17:49:10 -05:00
nickofolas
57673ae281 Add new progress bar to sleeve UI 2022-05-02 17:48:49 -05:00
rderfler
2f320d00a2
Merge branch 'danielyxie:dev' into dev 2022-04-30 15:26:18 -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
af8284381c merge base 2022-04-27 19:00:42 +08: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
e381e857a5 Merge remote-tracking branch 'upstream/dev' into dev 2022-04-25 13:32:38 -04:00
nickofolas
9f001b25d2 Merge branch 'dev' into improvement/purchase-augs-ui 2022-04-25 12:11:51 -05:00
nickofolas
e11a8fddd8 Use lg Container width 2022-04-24 22:06:40 -05:00
nickofolas
79d6d77f98 Add task UI guard 2022-04-24 20:38:07 -05:00
nickofolas
c6cb70a117 Fix displayed Aug cost for sleeves 2022-04-23 10:49:20 -05:00
nickofolas
e6df46e520 Fix spelling 2022-04-22 23:27:05 -05:00
phyzical
cdfbda1379 merge dev 2022-04-23 10:26:51 +08:00
nickofolas
a7d980c2dd Polish sleeve aug modal and faction aug page 2022-04-22 19:48:40 -05:00