Files
bitburner-src/src
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
..
2022-04-21 23:50:49 -07:00
2022-10-11 15:33:55 +03:00
2022-10-21 11:57:37 -04:00
2022-10-09 01:25:31 -04:00
2021-11-22 11:36:13 -05:00
2021-12-16 20:09:19 -05:00
2022-10-19 15:24:29 -04:00
2022-10-12 08:47:03 +02:00
2022-03-07 17:51:02 -05:00
2022-10-04 06:40:10 -04:00
2022-10-20 00:38:19 -04:00
2022-07-15 01:51:30 -04:00
2022-10-21 11:57:37 -04:00
2022-10-21 11:57:37 -04:00
2022-10-09 02:32:13 -04:00
2022-10-09 01:25:31 -04:00
2022-09-23 15:00:20 -04:00
2022-01-10 15:17:04 +10:00
2022-10-04 06:40:10 -04:00
2022-08-23 02:37:53 -04:00
2022-04-06 19:30:08 -04:00
2022-10-09 01:25:31 -04:00
2022-10-09 01:25:31 -04:00
2022-07-15 23:34:27 -04:00
2022-10-20 00:38:19 -04:00
2022-10-11 21:02:04 -04:00
2022-10-09 01:25:31 -04:00
2022-10-04 06:40:10 -04:00