@schedule1-tools/mixer 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,12 +10,11 @@ npm install @schedule1-tools/mixer
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
import { decodeMixState, encodeMixState, mixSubstances } from '@schedule1-tools/mixer';
|
|
13
|
+
### Calculate a mix
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
```typescript
|
|
17
16
|
const result = mixSubstances('OG Kush', ['Cuke', 'Flu Medicine', 'Gasoline']);
|
|
18
|
-
|
|
17
|
+
|
|
19
18
|
/*
|
|
20
19
|
{
|
|
21
20
|
effects: [ 'Be', 'Eu', 'Se', 'To' ],
|
|
@@ -25,17 +24,24 @@ console.log(result);
|
|
|
25
24
|
profitMargin: 0.27
|
|
26
25
|
}
|
|
27
26
|
*/
|
|
27
|
+
```
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
### Encode a mix state for sharing
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
30
32
|
const encoded = encodeMixState({
|
|
31
33
|
product: 'OG Kush',
|
|
32
34
|
substances: ['Cuke', 'Flu Medicine', 'Gasoline'],
|
|
33
35
|
});
|
|
34
|
-
console.log(encoded); // "T0cgS3VzaDpBQkM"
|
|
35
36
|
|
|
36
|
-
//
|
|
37
|
+
// "T0cgS3VzaDpBQkM"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Decode a mix state
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
37
43
|
const decoded = decodeMixState('T0cgS3VzaDpBQkM');
|
|
38
|
-
|
|
44
|
+
|
|
39
45
|
/*
|
|
40
46
|
{
|
|
41
47
|
product: 'OG Kush',
|
|
@@ -52,3 +58,7 @@ The package also exports the following data objects:
|
|
|
52
58
|
- `products`: Information about all products
|
|
53
59
|
- `substances`: Information about all substances
|
|
54
60
|
- `effectRulesBySubstance`: Rules for how substances transform effects
|
|
61
|
+
|
|
62
|
+
## Notice
|
|
63
|
+
|
|
64
|
+
This is a fan-made project and is not affiliated with, authorized, maintained, sponsored, or endorsed by the developers of Schedule I the game. All game-related content, including but not limited to names, trademarks, and copyrights, belong to their respective owners.
|