@skullandbonestools/snbdata 5.0.9 → 5.0.11
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 +41 -1
- package/data/commodities.json +1 -1
- package/data/cosmetics.json +1 -1
- package/data/items.json +61 -0
- package/data/materials.json +14 -10
- package/dist/daos/cosmetics.d.ts +7 -3
- package/dist/daos/cosmetics.d.ts.map +1 -1
- package/dist/daos/cosmetics.js +11 -2
- package/dist/daos/cosmetics.js.map +1 -1
- package/dist/daos/items.d.ts +5 -2
- package/dist/daos/items.d.ts.map +1 -1
- package/dist/daos/items.js +9 -2
- package/dist/daos/items.js.map +1 -1
- package/dist/daos/materials.d.ts +3 -2
- package/dist/daos/materials.d.ts.map +1 -1
- package/dist/daos/materials.js.map +1 -1
- package/dist/types/Category.d.ts +1 -1
- package/dist/types/Category.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# Skull and Bones Data
|
|
2
|
+
[](https://github.com/SkullAndBonesTools/SkullAndBonesData/releases/latest) [](https://www.npmjs.com/package/@skullandbonestools/snbdata) [](https://crowdin.com/project/skull-and-bones-tools)
|
|
2
3
|
|
|
3
4
|
Welcome to the inofficial data repository for the Skull and Bones game by Ubisoft.
|
|
4
5
|
|
|
5
6
|
This repository hosts data for the several elements in the game like **Materials**, **Items**, **Cosmetics** and more in a JSON format and provides a npm package to access the data in typescript and javascript.
|
|
6
7
|
|
|
8
|
+
This project is also compliant with the Terms of Service of Skull and Bones and approved by Ubisoft, as the data was/is collected and written down by hand and not acquired in other ways.
|
|
9
|
+
|
|
7
10
|
As the move to a public repository (see [History](#history)) includes several changes the following things are planned:
|
|
8
11
|
- [ ] Extract data stored in translation files into own data files
|
|
9
12
|
- [x] Sets
|
|
@@ -29,7 +32,7 @@ This represents the SnB game version Y2S1.2.X
|
|
|
29
32
|
|
|
30
33
|
## How to Use
|
|
31
34
|
### Raw Data
|
|
32
|
-
You can find the raw data files as JSON in the [data](https://github.com/SkullAndBonesTools/SkullAndBonesData/tree/
|
|
35
|
+
You can find the raw data files as JSON in the [data](https://github.com/SkullAndBonesTools/SkullAndBonesData/tree/main/data) folder.
|
|
33
36
|
|
|
34
37
|
### Package
|
|
35
38
|
Based on the raw data is the `snbdata` npm package available, featuring access to the data as objects with type safety and autocompletion.
|
|
@@ -42,6 +45,7 @@ npm i @skullandbonestools/snbdata
|
|
|
42
45
|
|
|
43
46
|
**Access the Data**
|
|
44
47
|
|
|
48
|
+
**Ships**\
|
|
45
49
|
Getting the season of the `Barque` (TS):
|
|
46
50
|
```typescript
|
|
47
51
|
import { Ships } from "@skullandbonestools/snbdata";
|
|
@@ -51,6 +55,7 @@ const season:Season = Ships.barque.season; // Retrieves the season object for th
|
|
|
51
55
|
console.log(season.id); // Returns ragingTides
|
|
52
56
|
```
|
|
53
57
|
|
|
58
|
+
**Materials**\
|
|
54
59
|
Getting the required materials for `Orca Intricate Apparatus` (JS):
|
|
55
60
|
```javascript
|
|
56
61
|
import { Materials } from "@skullandbonestools/snbdata";
|
|
@@ -67,6 +72,33 @@ Id: planetaryGearset - Required: cogwheel
|
|
|
67
72
|
Id: woodPitch - Required: woodTar
|
|
68
73
|
```
|
|
69
74
|
|
|
75
|
+
**Cosmetics / Items**\
|
|
76
|
+
Getting the `aBloodyPromise` sails emblem and printing all its properties.
|
|
77
|
+
```javascript
|
|
78
|
+
import { Cosmetics, Items } from '@skullandbonestools/snbdata';
|
|
79
|
+
import { Cosmetic } from '@skullandbonestools/snbdata/dist/daos/cosmetics'; //TS type
|
|
80
|
+
|
|
81
|
+
const aBloodyPromise = Cosmetics.aBloodyPromise; // Works the same for items e.g. Items.heydensGuard
|
|
82
|
+
Object.entries(aBloodyPromise).forEach(([key, value]) => {
|
|
83
|
+
if(!value) return;
|
|
84
|
+
console.log(`${key}: ${value}`);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// Output
|
|
88
|
+
id: aBloodyPromise
|
|
89
|
+
type: sailsEmblem
|
|
90
|
+
dateAdded: 2024-03-16
|
|
91
|
+
lastUpdated: 2024-03-30
|
|
92
|
+
set: ashenCorsair
|
|
93
|
+
obtainable: premiumEdition
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Translation
|
|
97
|
+
You can find the english translation of the data in the [languages](https://github.com/SkullAndBonesTools/SkullAndBonesData/tree/main/languages/en) folder.\
|
|
98
|
+
The translations for other languages can currently be found on [Crowdin](#adding-translations-for-the-data).
|
|
99
|
+
|
|
100
|
+
*It is planned that at some point the translations will also be present as files in the languages folder.*
|
|
101
|
+
|
|
70
102
|
## History
|
|
71
103
|
The data available in the repository was originally put together for [Skull and Bones Tools](https://skullandbonestools.de) and got published with **Year 2 Season 1 - Ascent into Chaos** with the goal of supporting other creators and to promote up to date informations by allowing everyone to contribute to the dataset.
|
|
72
104
|
|
|
@@ -87,6 +119,14 @@ If you want to add to or update informations of the dataset, the general open so
|
|
|
87
119
|
Which consits of creating a **Fork**, adding/updating the code in the forked repository and then creating a **Pull Request** in this repository to merge the changes of your fork into this one.
|
|
88
120
|
|
|
89
121
|
|
|
122
|
+
## Sponsor
|
|
123
|
+
### Crowdin
|
|
124
|
+
Skull and Bones Data is, as part of the Skull and Bones Tools project, supported by Crowdin 💚
|
|
125
|
+
|
|
126
|
+
[](https://crowdin.com/)
|
|
127
|
+
|
|
128
|
+
Allowing me to provide a direct integration into this github project, an overview of all translations and an easy way for everyone to participate in the translation of the project.
|
|
129
|
+
|
|
90
130
|
## Support
|
|
91
131
|
For general questions or support of any kind you can use the official Skull and Bones Tools Discord (https://discord.gg/fTgvPxR7eR) or the support@skullandbonestools.de email.
|
|
92
132
|
|
package/data/commodities.json
CHANGED
package/data/cosmetics.json
CHANGED
|
@@ -23026,7 +23026,7 @@
|
|
|
23026
23026
|
"type": "figureHead",
|
|
23027
23027
|
"effect": "emissive",
|
|
23028
23028
|
"set": "sengokuNights",
|
|
23029
|
-
"obtainable":
|
|
23029
|
+
"obtainable": "ubisoftStore",
|
|
23030
23030
|
"dateAdded": "2025-04-29",
|
|
23031
23031
|
"lastUpdated": "2025-04-29"
|
|
23032
23032
|
},
|
package/data/items.json
CHANGED
|
@@ -6108,6 +6108,11 @@
|
|
|
6108
6108
|
"tier": 5,
|
|
6109
6109
|
"value": 1,
|
|
6110
6110
|
"required": {
|
|
6111
|
+
"fineAbaka": 10,
|
|
6112
|
+
"juniperPlank": 10,
|
|
6113
|
+
"orcasMechanism": 4,
|
|
6114
|
+
"upgradeParts": 3,
|
|
6115
|
+
"piecesOfEight": 5000
|
|
6111
6116
|
},
|
|
6112
6117
|
"damageMitigation": {
|
|
6113
6118
|
"explosive": 0,
|
|
@@ -6126,6 +6131,12 @@
|
|
|
6126
6131
|
"tier": 6,
|
|
6127
6132
|
"value": 1,
|
|
6128
6133
|
"required": {
|
|
6134
|
+
"fineAbaka": 15,
|
|
6135
|
+
"juniperPlank": 15,
|
|
6136
|
+
"zincIngot": 15,
|
|
6137
|
+
"orcasMechanism": 4,
|
|
6138
|
+
"upgradeParts": 4,
|
|
6139
|
+
"piecesOfEight": 8000
|
|
6129
6140
|
},
|
|
6130
6141
|
"damageMitigation": {
|
|
6131
6142
|
"explosive": 0,
|
|
@@ -6166,6 +6177,8 @@
|
|
|
6166
6177
|
"tier": 1,
|
|
6167
6178
|
"value": 1,
|
|
6168
6179
|
"required": {
|
|
6180
|
+
"upgradeParts": 1,
|
|
6181
|
+
"silver": 18000
|
|
6169
6182
|
},
|
|
6170
6183
|
"perks": ["hulkUpgrade1", "stationsUpgrade"],
|
|
6171
6184
|
"dateAdded": "2024-06-11",
|
|
@@ -6177,6 +6190,8 @@
|
|
|
6177
6190
|
"tier": 2,
|
|
6178
6191
|
"value": 1,
|
|
6179
6192
|
"required": {
|
|
6193
|
+
"upgradeParts": 2,
|
|
6194
|
+
"silver": 25000
|
|
6180
6195
|
},
|
|
6181
6196
|
"perks": ["hulkUpgrade2"],
|
|
6182
6197
|
"dateAdded": "2024-06-11",
|
|
@@ -6188,6 +6203,8 @@
|
|
|
6188
6203
|
"tier": 3,
|
|
6189
6204
|
"value": 1,
|
|
6190
6205
|
"required": {
|
|
6206
|
+
"upgradeParts": 2,
|
|
6207
|
+
"piecesOfEight": 1000
|
|
6191
6208
|
},
|
|
6192
6209
|
"perks": ["hulkUpgrade3", "bigGuns"],
|
|
6193
6210
|
"dateAdded": "2024-06-11",
|
|
@@ -6199,6 +6216,8 @@
|
|
|
6199
6216
|
"tier": 4,
|
|
6200
6217
|
"value": 1,
|
|
6201
6218
|
"required": {
|
|
6219
|
+
"upgradeParts": 3,
|
|
6220
|
+
"piecesOfEight": 3000
|
|
6202
6221
|
},
|
|
6203
6222
|
"damageMitigation": {
|
|
6204
6223
|
"explosive": 0,
|
|
@@ -6218,6 +6237,8 @@
|
|
|
6218
6237
|
"tier": 5,
|
|
6219
6238
|
"value": 1,
|
|
6220
6239
|
"required": {
|
|
6240
|
+
"upgradeParts": 3,
|
|
6241
|
+
"piecesOfEight": 5000
|
|
6221
6242
|
},
|
|
6222
6243
|
"damageMitigation": {
|
|
6223
6244
|
"explosive": 0,
|
|
@@ -6237,6 +6258,8 @@
|
|
|
6237
6258
|
"tier": 6,
|
|
6238
6259
|
"value": 1,
|
|
6239
6260
|
"required": {
|
|
6261
|
+
"upgradeParts": 4,
|
|
6262
|
+
"piecesOfEight": 8000
|
|
6240
6263
|
},
|
|
6241
6264
|
"damageMitigation": {
|
|
6242
6265
|
"explosive": 0.05,
|
|
@@ -6327,6 +6350,11 @@
|
|
|
6327
6350
|
"tier": 4,
|
|
6328
6351
|
"value": 1,
|
|
6329
6352
|
"required": {
|
|
6353
|
+
"cobaltIngot": 20,
|
|
6354
|
+
"woodTar": 7,
|
|
6355
|
+
"cogwheel": 7,
|
|
6356
|
+
"upgradeParts": 3,
|
|
6357
|
+
"piecesOfEight": 3000
|
|
6330
6358
|
},
|
|
6331
6359
|
"damageMitigation": {
|
|
6332
6360
|
"explosive": 0,
|
|
@@ -6346,6 +6374,8 @@
|
|
|
6346
6374
|
"tier": 5,
|
|
6347
6375
|
"value": 1,
|
|
6348
6376
|
"required": {
|
|
6377
|
+
"upgradeParts": 3,
|
|
6378
|
+
"piecesOfEight": 5000
|
|
6349
6379
|
},
|
|
6350
6380
|
"damageMitigation": {
|
|
6351
6381
|
"explosive": 0,
|
|
@@ -6365,6 +6395,8 @@
|
|
|
6365
6395
|
"tier": 6,
|
|
6366
6396
|
"value": 1,
|
|
6367
6397
|
"required": {
|
|
6398
|
+
"upgradeParts": 4,
|
|
6399
|
+
"piecesOfEight": 8000
|
|
6368
6400
|
},
|
|
6369
6401
|
"damageMitigation": {
|
|
6370
6402
|
"explosive": 0,
|
|
@@ -6452,6 +6484,11 @@
|
|
|
6452
6484
|
"tier": 4,
|
|
6453
6485
|
"value": 1,
|
|
6454
6486
|
"required": {
|
|
6487
|
+
"fineAbaka": 20,
|
|
6488
|
+
"sheetGlass": 7,
|
|
6489
|
+
"screwMechanism": 7,
|
|
6490
|
+
"upgradeParts": 3,
|
|
6491
|
+
"piecesOfEight": 3000
|
|
6455
6492
|
},
|
|
6456
6493
|
"damageMitigation": {
|
|
6457
6494
|
"explosive": 0,
|
|
@@ -6471,6 +6508,8 @@
|
|
|
6471
6508
|
"tier": 5,
|
|
6472
6509
|
"value": 1,
|
|
6473
6510
|
"required": {
|
|
6511
|
+
"upgradeParts": 3,
|
|
6512
|
+
"piecesOfEight": 5000
|
|
6474
6513
|
},
|
|
6475
6514
|
"damageMitigation": {
|
|
6476
6515
|
"explosive": 0,
|
|
@@ -6490,6 +6529,8 @@
|
|
|
6490
6529
|
"tier": 6,
|
|
6491
6530
|
"value": 1,
|
|
6492
6531
|
"required": {
|
|
6532
|
+
"upgradeParts": 4,
|
|
6533
|
+
"piecesOfEight": 8000
|
|
6493
6534
|
},
|
|
6494
6535
|
"damageMitigation": {
|
|
6495
6536
|
"explosive": 0,
|
|
@@ -6535,6 +6576,8 @@
|
|
|
6535
6576
|
"tier": 1,
|
|
6536
6577
|
"value": 1,
|
|
6537
6578
|
"required": {
|
|
6579
|
+
"upgradeParts": 1,
|
|
6580
|
+
"silver": 18000
|
|
6538
6581
|
},
|
|
6539
6582
|
"perks": ["sloopUpgrade1", "gunportsUpgrade"],
|
|
6540
6583
|
"dateAdded": "2024-06-11",
|
|
@@ -6546,6 +6589,8 @@
|
|
|
6546
6589
|
"tier": 2,
|
|
6547
6590
|
"value": 1,
|
|
6548
6591
|
"required": {
|
|
6592
|
+
"upgradeParts": 2,
|
|
6593
|
+
"silver": 25000
|
|
6549
6594
|
},
|
|
6550
6595
|
"perks": ["sloopUpgrade2"],
|
|
6551
6596
|
"dateAdded": "2024-06-11",
|
|
@@ -6557,6 +6602,8 @@
|
|
|
6557
6602
|
"tier": 3,
|
|
6558
6603
|
"value": 1,
|
|
6559
6604
|
"required": {
|
|
6605
|
+
"upgradeParts": 2,
|
|
6606
|
+
"piecesOfEight": 1000
|
|
6560
6607
|
},
|
|
6561
6608
|
"perks": ["sloopUpgrade3", "heavyArsenal"],
|
|
6562
6609
|
"dateAdded": "2024-06-11",
|
|
@@ -6568,6 +6615,8 @@
|
|
|
6568
6615
|
"tier": 4,
|
|
6569
6616
|
"value": 1,
|
|
6570
6617
|
"required": {
|
|
6618
|
+
"upgradeParts": 3,
|
|
6619
|
+
"piecesOfEight": 3000
|
|
6571
6620
|
},
|
|
6572
6621
|
"damageMitigation": {
|
|
6573
6622
|
"explosive": 0.05,
|
|
@@ -6587,6 +6636,8 @@
|
|
|
6587
6636
|
"tier": 5,
|
|
6588
6637
|
"value": 1,
|
|
6589
6638
|
"required": {
|
|
6639
|
+
"upgradeParts": 3,
|
|
6640
|
+
"piecesOfEight": 5000
|
|
6590
6641
|
},
|
|
6591
6642
|
"damageMitigation": {
|
|
6592
6643
|
"explosive": 0.10,
|
|
@@ -6606,6 +6657,8 @@
|
|
|
6606
6657
|
"tier": 6,
|
|
6607
6658
|
"value": 1,
|
|
6608
6659
|
"required": {
|
|
6660
|
+
"upgradeParts": 4,
|
|
6661
|
+
"piecesOfEight": 8000
|
|
6609
6662
|
},
|
|
6610
6663
|
"damageMitigation": {
|
|
6611
6664
|
"explosive": 0.15,
|
|
@@ -7226,6 +7279,10 @@
|
|
|
7226
7279
|
"tier": 4,
|
|
7227
7280
|
"value": 1,
|
|
7228
7281
|
"required": {
|
|
7282
|
+
"magnetiteIngot": 15,
|
|
7283
|
+
"castingSand": 5,
|
|
7284
|
+
"lime": 5,
|
|
7285
|
+
"naphtha": 7,
|
|
7229
7286
|
"upgradeParts": 5,
|
|
7230
7287
|
"piecesOfEight": 4000
|
|
7231
7288
|
},
|
|
@@ -7247,6 +7304,10 @@
|
|
|
7247
7304
|
"tier": 5,
|
|
7248
7305
|
"value": 1,
|
|
7249
7306
|
"required": {
|
|
7307
|
+
"magnetiteIngot": 10,
|
|
7308
|
+
"roselleCloth": 10,
|
|
7309
|
+
"plagueDust": 1,
|
|
7310
|
+
"blightedFuel": 1,
|
|
7250
7311
|
"upgradeParts": 5,
|
|
7251
7312
|
"piecesOfEight": 6500
|
|
7252
7313
|
},
|
package/data/materials.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"silver": {
|
|
3
3
|
"rarity": "common",
|
|
4
|
-
"category": "
|
|
4
|
+
"category": "currency"
|
|
5
5
|
},
|
|
6
6
|
"piecesOfEight": {
|
|
7
7
|
"rarity": "legendary",
|
|
8
|
-
"category": "
|
|
8
|
+
"category": "currency"
|
|
9
9
|
},
|
|
10
10
|
"sovereigns": {
|
|
11
11
|
"rarity": "legendary",
|
|
12
|
-
"category": "
|
|
12
|
+
"category": "currency"
|
|
13
13
|
},
|
|
14
14
|
"reapersToll": {
|
|
15
15
|
"rarity": "common",
|
|
16
|
-
"category": "
|
|
16
|
+
"category": "currency"
|
|
17
17
|
},
|
|
18
18
|
"azuriteGem": {
|
|
19
19
|
"rarity": "rare",
|
|
20
|
-
"category": "
|
|
20
|
+
"category": "currency"
|
|
21
21
|
},
|
|
22
22
|
"halfTaels": {
|
|
23
23
|
"rarity": "legendary",
|
|
24
|
-
"category": "
|
|
24
|
+
"category": "currency"
|
|
25
25
|
},
|
|
26
26
|
"silverLions": {
|
|
27
27
|
"rarity": "common",
|
|
28
|
-
"category": "
|
|
28
|
+
"category": "currency"
|
|
29
29
|
},
|
|
30
30
|
"copperBars": {
|
|
31
31
|
"rarity": "epic",
|
|
@@ -33,15 +33,19 @@
|
|
|
33
33
|
},
|
|
34
34
|
"units": {
|
|
35
35
|
"rarity": "common",
|
|
36
|
-
"category": "
|
|
36
|
+
"category": "currency"
|
|
37
|
+
},
|
|
38
|
+
"jadeDragon": {
|
|
39
|
+
"rarity": "common",
|
|
40
|
+
"category": "currency"
|
|
37
41
|
},
|
|
38
42
|
"cork": {
|
|
39
43
|
"rarity": "common",
|
|
40
|
-
"category": "
|
|
44
|
+
"category": "currency"
|
|
41
45
|
},
|
|
42
46
|
"gold": {
|
|
43
47
|
"rarity": "legendary",
|
|
44
|
-
"category": "
|
|
48
|
+
"category": "currency"
|
|
45
49
|
},
|
|
46
50
|
"jute": {
|
|
47
51
|
"rarity": "common",
|
package/dist/daos/cosmetics.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import cosmeticsData from '../../data/cosmetics.json';
|
|
2
2
|
import { Effect } from '../types/CosmeticProperties';
|
|
3
3
|
import { Rarity } from '../types/Rarity';
|
|
4
|
+
import { Event } from './events';
|
|
4
5
|
import { Material } from './materials';
|
|
5
6
|
import { Season } from './seasons';
|
|
7
|
+
import { Set } from './sets';
|
|
8
|
+
import { WorldEvent } from './worldEvents';
|
|
6
9
|
export declare class Cosmetic {
|
|
7
10
|
readonly id: string;
|
|
8
11
|
readonly type: string;
|
|
@@ -10,7 +13,7 @@ export declare class Cosmetic {
|
|
|
10
13
|
readonly lastUpdated: string;
|
|
11
14
|
readonly rarity?: Rarity | undefined;
|
|
12
15
|
readonly tier?: number | undefined;
|
|
13
|
-
readonly set?:
|
|
16
|
+
readonly set?: Set | undefined;
|
|
14
17
|
readonly obtainable?: (string | string[] | Array<string | string[]>) | undefined;
|
|
15
18
|
readonly effect?: (Effect | Effect[]) | undefined;
|
|
16
19
|
readonly season?: Season | undefined;
|
|
@@ -20,8 +23,9 @@ export declare class Cosmetic {
|
|
|
20
23
|
readonly required?: Map<Material, number> | undefined;
|
|
21
24
|
readonly requiredRank?: string | undefined;
|
|
22
25
|
readonly bounty?: string | undefined;
|
|
23
|
-
readonly
|
|
24
|
-
|
|
26
|
+
readonly event?: Event | undefined;
|
|
27
|
+
readonly worldEvent?: (WorldEvent | WorldEvent[]) | undefined;
|
|
28
|
+
constructor(id: string, type: string, dateAdded: string, lastUpdated: string, rarity?: Rarity | undefined, tier?: number | undefined, set?: Set | undefined, obtainable?: (string | string[] | Array<string | string[]>) | undefined, effect?: (Effect | Effect[]) | undefined, season?: Season | undefined, contract?: string | undefined, basic?: Cosmetic | undefined, upgrades?: Cosmetic[] | undefined, required?: Map<Material, number> | undefined, requiredRank?: string | undefined, bounty?: string | undefined, event?: Event | undefined, worldEvent?: (WorldEvent | WorldEvent[]) | undefined);
|
|
25
29
|
static fromRawData(rawData: any): Cosmetic;
|
|
26
30
|
static updateCosmeticWithUpgrades(key: string, rawData: any, cosmetics: Record<string, Cosmetic>): void;
|
|
27
31
|
static loadCosmetics(): Record<string, Cosmetic>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmetics.d.ts","sourceRoot":"","sources":["../../src/daos/cosmetics.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAa,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,MAAM,EAAW,MAAM,WAAW,CAAC;
|
|
1
|
+
{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M,EACnB,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,IAAI,CAAC,EAAE,MAAM,YAAA,EACb,GAAG,CAAC,EAAE,GAAG,YAAA,EACT,UAAU,CAAC,GAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,aAAA,EACzD,MAAM,CAAC,GAAE,MAAM,GAAG,MAAM,EAAE,aAAA,EAC1B,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,QAAQ,CAAC,EAAE,MAAM,YAAA,EAC1B,KAAK,CAAC,EAAE,QAAQ,YAAA,EAChB,QAAQ,CAAC,EAAE,QAAQ,EAAE,YAAA,EACZ,QAAQ,CAAC,EAAE,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAA,EAChC,YAAY,CAAC,EAAE,MAAM,YAAA,EACrB,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,KAAK,CAAC,EAAE,KAAK,YAAA,EACb,UAAU,CAAC,GAAE,UAAU,GAAG,UAAU,EAAE,aAAA;WAG5C,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,QAAQ;WAqCnC,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;WAWzF,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;CAU1D;AAED,KAAK,SAAS,GAAG;KACZ,CAAC,IAAI,MAAM,OAAO,aAAa,GAAG,QAAQ;CAC9C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAAiD,CAAC"}
|
package/dist/daos/cosmetics.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import cosmeticsData from '../../data/cosmetics.json';
|
|
2
|
+
import { Events } from './events';
|
|
2
3
|
import { Materials } from './materials';
|
|
3
4
|
import { Seasons } from './seasons';
|
|
5
|
+
import { Sets } from './sets';
|
|
6
|
+
import { WorldEvents } from './worldEvents';
|
|
4
7
|
export class Cosmetic {
|
|
5
|
-
constructor(id, type, dateAdded, lastUpdated, rarity, tier, set, obtainable, effect, season, contract, basic, upgrades, required, requiredRank, bounty, worldEvent) {
|
|
8
|
+
constructor(id, type, dateAdded, lastUpdated, rarity, tier, set, obtainable, effect, season, contract, basic, upgrades, required, requiredRank, bounty, event, worldEvent) {
|
|
6
9
|
this.id = id;
|
|
7
10
|
this.type = type;
|
|
8
11
|
this.dateAdded = dateAdded;
|
|
@@ -19,10 +22,16 @@ export class Cosmetic {
|
|
|
19
22
|
this.required = required;
|
|
20
23
|
this.requiredRank = requiredRank;
|
|
21
24
|
this.bounty = bounty;
|
|
25
|
+
this.event = event;
|
|
22
26
|
this.worldEvent = worldEvent;
|
|
23
27
|
}
|
|
24
28
|
static fromRawData(rawData) {
|
|
25
29
|
const season = rawData.season;
|
|
30
|
+
const set = rawData.set;
|
|
31
|
+
const event = rawData.event;
|
|
32
|
+
const worldEvent = Array.isArray(rawData.worldEvent)
|
|
33
|
+
? rawData.worldEvent.map((_worldEvent) => WorldEvents[_worldEvent])
|
|
34
|
+
: WorldEvents[rawData.worldEvent];
|
|
26
35
|
const required = rawData.required ? new Map() : undefined;
|
|
27
36
|
if (required) {
|
|
28
37
|
for (const [requiredKey, quantity] of Object.entries(rawData.required)) {
|
|
@@ -30,7 +39,7 @@ export class Cosmetic {
|
|
|
30
39
|
required.set(Materials[requiredMaterial], quantity);
|
|
31
40
|
}
|
|
32
41
|
}
|
|
33
|
-
return new Cosmetic(rawData.id, rawData.type, rawData.dateAdded, rawData.lastUpdated, rawData.rarity ?? undefined, rawData.tier ?? undefined, rawData.set
|
|
42
|
+
return new Cosmetic(rawData.id, rawData.type, rawData.dateAdded, rawData.lastUpdated, rawData.rarity ?? undefined, rawData.tier ?? undefined, rawData.set ? Sets[set] : undefined, rawData.obtainable ?? undefined, rawData.effect ?? undefined, rawData.season ? Seasons[season] : undefined, rawData.contract ?? undefined, undefined, undefined, required, rawData.requiredRank ?? undefined, rawData.bounty ?? undefined, rawData.event ? Events[event] : undefined, worldEvent ?? undefined);
|
|
34
43
|
}
|
|
35
44
|
static updateCosmeticWithUpgrades(key, rawData, cosmetics) {
|
|
36
45
|
if (rawData.basic) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmetics.js","sourceRoot":"","sources":["../../src/daos/cosmetics.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAU,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cosmetics.js","sourceRoot":"","sources":["../../src/daos/cosmetics.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAS,MAAM,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAU,OAAO,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAO,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAc,WAAW,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,OAAO,QAAQ;IACjB,YACoB,EAAU,EACV,IAAY,EACZ,SAAiB,EACjB,WAAmB,EACnB,MAAe,EACf,IAAa,EACb,GAAS,EACT,UAAyD,EACzD,MAA0B,EAC1B,MAAe,EACf,QAAiB,EAC1B,KAAgB,EAChB,QAAqB,EACZ,QAAgC,EAChC,YAAqB,EACrB,MAAe,EACf,KAAa,EACb,UAAsC;QAjBtC,OAAE,GAAF,EAAE,CAAQ;QACV,SAAI,GAAJ,IAAI,CAAQ;QACZ,cAAS,GAAT,SAAS,CAAQ;QACjB,gBAAW,GAAX,WAAW,CAAQ;QACnB,WAAM,GAAN,MAAM,CAAS;QACf,SAAI,GAAJ,IAAI,CAAS;QACb,QAAG,GAAH,GAAG,C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,MAAM,CAAC,aAAa;QACvB,MAAM,SAAS,GAA6B,EAAE,CAAC;QAC/C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;YACvD,SAAS,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACjD,CAAC;QACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;YACvD,QAAQ,CAAC,0BAA0B,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC/D,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ;AAMD,MAAM,CAAC,MAAM,SAAS,GAAc,QAAQ,CAAC,aAAa,EAAe,CAAC"}
|
package/dist/daos/items.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import itemsData from '../../data/items.json';
|
|
2
2
|
import { Tier } from '../types/ItemProperties';
|
|
3
3
|
import { Rarity } from '../types/Rarity';
|
|
4
|
+
import { Event } from './events';
|
|
4
5
|
import { Material } from './materials';
|
|
5
6
|
import { Season } from './seasons';
|
|
7
|
+
import { WorldEvent } from './worldEvents';
|
|
6
8
|
export declare class Item {
|
|
7
9
|
readonly id: string;
|
|
8
10
|
readonly type: string;
|
|
@@ -25,11 +27,12 @@ export declare class Item {
|
|
|
25
27
|
readonly rarity?: Rarity | undefined;
|
|
26
28
|
readonly season?: Season | undefined;
|
|
27
29
|
readonly obtainable?: string | string[] | undefined;
|
|
28
|
-
readonly
|
|
30
|
+
readonly event?: Event | undefined;
|
|
31
|
+
readonly worldEvent?: (WorldEvent | WorldEvent[]) | undefined;
|
|
29
32
|
readonly armor?: number | undefined;
|
|
30
33
|
readonly damageMitigation?: Record<string, number> | undefined;
|
|
31
34
|
readonly contract?: string | undefined;
|
|
32
|
-
constructor(id: string, type: string, dateAdded: Date, lastUpdated: Date, tier?: Tier | undefined, blueprint?: string | undefined, value?: number | undefined, weight?: number | undefined, gearScore?: number | undefined, projectilesPerShot?: number | undefined, damagePerShot?: number | undefined, rateOfFire?: number | undefined, reloadSpeed?: number | undefined, optimalRange?: number | undefined, projectileSpeed?: number | undefined, required?: Map<Material, number> | undefined, requiredRank?: string | undefined, perks?: string[] | undefined, rarity?: Rarity | undefined, season?: Season | undefined, obtainable?: string | string[] | undefined, worldEvent?:
|
|
35
|
+
constructor(id: string, type: string, dateAdded: Date, lastUpdated: Date, tier?: Tier | undefined, blueprint?: string | undefined, value?: number | undefined, weight?: number | undefined, gearScore?: number | undefined, projectilesPerShot?: number | undefined, damagePerShot?: number | undefined, rateOfFire?: number | undefined, reloadSpeed?: number | undefined, optimalRange?: number | undefined, projectileSpeed?: number | undefined, required?: Map<Material, number> | undefined, requiredRank?: string | undefined, perks?: string[] | undefined, rarity?: Rarity | undefined, season?: Season | undefined, obtainable?: string | string[] | undefined, event?: Event | undefined, worldEvent?: (WorldEvent | WorldEvent[]) | undefined, armor?: number | undefined, damageMitigation?: Record<string, number> | undefined, contract?: string | undefined);
|
|
33
36
|
static fromRawData(rawData: any): Item;
|
|
34
37
|
static loadItems(): Record<string, Item>;
|
|
35
38
|
}
|
package/dist/daos/items.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/daos/items.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAa,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,MAAM,EAAW,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/daos/items.ts"],"names":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
package/dist/daos/items.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import itemsData from '../../data/items.json';
|
|
2
|
+
import { Events } from './events';
|
|
2
3
|
import { Materials } from './materials';
|
|
3
4
|
import { Seasons } from './seasons';
|
|
5
|
+
import { WorldEvents } from './worldEvents';
|
|
4
6
|
export class Item {
|
|
5
|
-
constructor(id, type, dateAdded, lastUpdated, tier, blueprint, value, weight, gearScore, projectilesPerShot, damagePerShot, rateOfFire, reloadSpeed, optimalRange, projectileSpeed, required, requiredRank, perks, rarity, season, obtainable, worldEvent, armor, damageMitigation, contract) {
|
|
7
|
+
constructor(id, type, dateAdded, lastUpdated, tier, blueprint, value, weight, gearScore, projectilesPerShot, damagePerShot, rateOfFire, reloadSpeed, optimalRange, projectileSpeed, required, requiredRank, perks, rarity, season, obtainable, event, worldEvent, armor, damageMitigation, contract) {
|
|
6
8
|
this.id = id;
|
|
7
9
|
this.type = type;
|
|
8
10
|
this.dateAdded = dateAdded;
|
|
@@ -24,6 +26,7 @@ export class Item {
|
|
|
24
26
|
this.rarity = rarity;
|
|
25
27
|
this.season = season;
|
|
26
28
|
this.obtainable = obtainable;
|
|
29
|
+
this.event = event;
|
|
27
30
|
this.worldEvent = worldEvent;
|
|
28
31
|
this.armor = armor;
|
|
29
32
|
this.damageMitigation = damageMitigation;
|
|
@@ -31,6 +34,10 @@ export class Item {
|
|
|
31
34
|
}
|
|
32
35
|
static fromRawData(rawData) {
|
|
33
36
|
const season = rawData.season;
|
|
37
|
+
const event = rawData.event;
|
|
38
|
+
const worldEvent = Array.isArray(rawData.worldEvent)
|
|
39
|
+
? rawData.worldEvent.map((_worldEvent) => WorldEvents[_worldEvent])
|
|
40
|
+
: WorldEvents[rawData.worldEvent];
|
|
34
41
|
const required = rawData.required ? new Map() : undefined;
|
|
35
42
|
if (required) {
|
|
36
43
|
for (const [requiredKey, quantity] of Object.entries(rawData.required)) {
|
|
@@ -38,7 +45,7 @@ export class Item {
|
|
|
38
45
|
required.set(Materials[requiredMaterial], quantity);
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
|
-
return new Item(rawData.id, rawData.type, new Date(rawData.dateAdded), new Date(rawData.lastUpdated), rawData.tier, rawData.blueprint ?? undefined, rawData.value ?? undefined, rawData.weight ?? undefined, rawData.gearScore ?? undefined, rawData.projectilesPerShot ?? undefined, rawData.damagePerShot ?? undefined, rawData.rateOfFire ?? undefined, rawData.reloadSpeed ?? undefined, rawData.optimalRange ?? undefined, rawData.projectileSpeed ?? undefined, required, rawData.requiredRank ?? undefined, rawData.perks ?? [], rawData.rarity ?? undefined, rawData.season ? Seasons[season] : undefined, rawData.obtainable ?? undefined, rawData.worldEvent ?? undefined, rawData.armor ?? undefined, rawData.damageMitigation ?? undefined, rawData.contract ?? undefined);
|
|
48
|
+
return new Item(rawData.id, rawData.type, new Date(rawData.dateAdded), new Date(rawData.lastUpdated), rawData.tier, rawData.blueprint ?? undefined, rawData.value ?? undefined, rawData.weight ?? undefined, rawData.gearScore ?? undefined, rawData.projectilesPerShot ?? undefined, rawData.damagePerShot ?? undefined, rawData.rateOfFire ?? undefined, rawData.reloadSpeed ?? undefined, rawData.optimalRange ?? undefined, rawData.projectileSpeed ?? undefined, required, rawData.requiredRank ?? undefined, rawData.perks ?? [], rawData.rarity ?? undefined, rawData.season ? Seasons[season] : undefined, rawData.obtainable ?? undefined, rawData.event ? Events[event] : undefined, worldEvent ?? undefined, rawData.armor ?? undefined, rawData.damageMitigation ?? undefined, rawData.contract ?? undefined);
|
|
42
49
|
}
|
|
43
50
|
static loadItems() {
|
|
44
51
|
const items = {};
|
package/dist/daos/items.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/daos/items.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAG9C,OAAO,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAU,OAAO,EAAE,MAA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AAC,SAAS,EAAW,CAAC"}
|
package/dist/daos/materials.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import materialsData from "../../data/materials.json";
|
|
2
|
+
import { MaterialCategory } from "../types/Category";
|
|
2
3
|
import { Rarity } from "../types/Rarity";
|
|
3
4
|
export declare class Material {
|
|
4
5
|
id: string;
|
|
5
6
|
rarity: Rarity;
|
|
6
|
-
category:
|
|
7
|
+
category: MaterialCategory;
|
|
7
8
|
required?: Map<Material, number>;
|
|
8
9
|
requiredRank?: string;
|
|
9
|
-
constructor(id: string, rarity: Rarity, category:
|
|
10
|
+
constructor(id: string, rarity: Rarity, category: MaterialCategory, requiredRank?: string);
|
|
10
11
|
static fromRawData(key: string, rawData: any): Material;
|
|
11
12
|
static updateMaterialWithRequired(key: string, rawData: any, materials: Record<string, Material>): void;
|
|
12
13
|
static loadMaterials(): Record<string, Material>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materials.d.ts","sourceRoot":"","sources":["../../src/daos/materials.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,QAAQ;IACjB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,QAAQ,EAAG,
|
|
1
|
+
{"version":3,"file":"materials.d.ts","sourceRoot":"","sources":["../../src/daos/materials.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,QAAQ;IACjB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,QAAQ,EAAG,gBAAgB,CAAC;IAC5B,QAAQ,CAAC,EAAE,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEV,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,CAAC,EAAE,MAAM;WAO3E,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,QAAQ;WAShD,0BAA0B,CAAC,GAAG,EAAC,MAAM,EAAE,OAAO,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;WAYvF,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;CAa1D;AAED,KAAK,SAAS,GAAG;KACZ,CAAC,IAAI,MAAM,OAAO,aAAa,GAAG,QAAQ;CAC9C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAAiD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materials.js","sourceRoot":"","sources":["../../src/daos/materials.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"materials.js","sourceRoot":"","sources":["../../src/daos/materials.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAItD,MAAM,OAAO,QAAQ;IAOjB,YAAY,EAAU,EAAE,MAAc,EAAE,QAA0B,EAAE,YAAqB;QACrF,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,GAAW,EAAE,OAAY;QAC3C,OAAO,IAAI,QAAQ,CACf,GAAG,EACH,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,QAA4B,EACpC,OAAO,CAAC,YAAY,IAA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ategory = "localFaction" | "megacorp" | "kingpin" | "theHelm";
|
|
2
|
-
export type MaterialCategory = "raw" | "refined" | "specialized" | "exotic" | "helm" | "scrap";
|
|
2
|
+
export type MaterialCategory = "raw" | "refined" | "specialized" | "exotic" | "helm" | "scrap" | "currency";
|
|
3
3
|
//# sourceMappingURL=Category.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Category.d.ts","sourceRoot":"","sources":["../../src/types/Category.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpF,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"Category.d.ts","sourceRoot":"","sources":["../../src/types/Category.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpF,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC"}
|