lol-constants 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/StatRunes.d.ts +6 -6
- package/assets/StatRunes.js +6 -6
- package/assets/StatRunesV2.d.ts +17 -0
- package/assets/StatRunesV2.js +20 -0
- package/assets/scripts/Helpers/{enableSpreadValues.d.ts → enableEscapedValues.d.ts} +2 -2
- package/assets/scripts/Helpers/{enableSpreadValues.js → enableEscapedValues.js} +4 -4
- package/assets/scripts/Helpers/getExportStatement.d.ts +1 -1
- package/assets/scripts/Helpers/getExportStatement.js +4 -4
- package/assets/scripts/Helpers/writeToTmpFile.d.ts +1 -1
- package/assets/scripts/Helpers/writeToTmpFile.js +2 -2
- package/assets/scripts/generate-all.d.ts +0 -4
- package/assets/scripts/generate-all.js +8 -4
- package/assets/scripts/generate-rune-sets-by-rune-names.js +72 -47
- package/assets/scripts/generate-rune-sets.js +73 -81
- package/dist/Constants/Runes/RuneSets.d.ts +274 -10
- package/dist/Constants/Runes/RuneSets.js +9 -7
- package/dist/Constants/Runes/RuneSetsByRuneNames.d.ts +282 -18
- package/dist/Constants/Runes/RuneSetsByRuneNames.js +9 -7
- package/dist/Helpers/Runes/getRuneCategoryByRuneName.js +6 -7
- package/dist/Helpers/Runes/getRuneIdByName.js +2 -2
- package/dist/Helpers/Runes/getRuneNameById.js +2 -2
- package/dist/Helpers/Runes/getStatRuneIdByName.js +2 -2
- package/dist/Helpers/Runes/getStatRuneNameById.js +2 -2
- package/dist/Helpers/Runes/isDominationTreeRuneId.js +1 -1
- package/dist/Helpers/Runes/isInspirationTreeRuneId.js +1 -1
- package/dist/Helpers/Runes/isKeystoneRuneId.js +1 -1
- package/dist/Helpers/Runes/isPrecisionTreeRuneId.js +1 -1
- package/dist/Helpers/Runes/isResolveTreeRuneId.js +1 -1
- package/dist/Helpers/Runes/isRuneId.js +2 -2
- package/dist/Helpers/Runes/isRuneName.js +2 -2
- package/dist/Helpers/Runes/isSorceryTreeRuneId.js +1 -1
- package/dist/Helpers/Runes/isStatRuneId.js +2 -2
- package/dist/Helpers/Runes/isStatRuneName.js +2 -2
- package/dist/index.d.ts +3 -6
- package/dist/index.js +18 -10
- package/dist/types/index.d.ts +14 -18
- package/package.json +1 -1
- package/dist/Constants/Runes/RuneIds.d.ts +0 -74
- package/dist/Constants/Runes/RuneIds.js +0 -9
- package/dist/Constants/Runes/RuneNames.d.ts +0 -74
- package/dist/Constants/Runes/RuneNames.js +0 -9
- package/dist/Constants/Runes/StatRuneIds.d.ts +0 -11
- package/dist/Constants/Runes/StatRuneIds.js +0 -4
- package/dist/Constants/Runes/StatRuneNames.d.ts +0 -11
- package/dist/Constants/Runes/StatRuneNames.js +0 -4
package/assets/StatRunes.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
export declare const StatRunes: {
|
2
|
-
readonly '5001': "Defense (HP)";
|
3
|
-
readonly '5002': "Defense (AR)";
|
4
|
-
readonly '5003': "Defense (MR)";
|
5
|
-
readonly '5002f': "Flex (AR)";
|
6
|
-
readonly '5003f': "Flex (MR)";
|
7
|
-
readonly '5008f': "Flex (AF)";
|
8
2
|
readonly '5005': "Offense (AS)";
|
9
3
|
readonly '5007': "Offense (AH)";
|
10
4
|
readonly '5008': "Offense (AF)";
|
5
|
+
readonly '5002f': "Flex (AR)";
|
6
|
+
readonly '5003f': "Flex (MR)";
|
7
|
+
readonly '5008f': "Flex (AF)";
|
8
|
+
readonly '5001': "Defense (HP)";
|
9
|
+
readonly '5002': "Defense (AR)";
|
10
|
+
readonly '5003': "Defense (MR)";
|
11
11
|
};
|
package/assets/StatRunes.js
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.StatRunes = void 0;
|
4
4
|
exports.StatRunes = {
|
5
|
-
'5001': 'Defense (HP)',
|
6
|
-
'5002': 'Defense (AR)',
|
7
|
-
'5003': 'Defense (MR)',
|
8
|
-
'5002f': 'Flex (AR)',
|
9
|
-
'5003f': 'Flex (MR)',
|
10
|
-
'5008f': 'Flex (AF)',
|
11
5
|
'5005': 'Offense (AS)',
|
12
6
|
'5007': 'Offense (AH)',
|
13
7
|
'5008': 'Offense (AF)',
|
8
|
+
'5002f': 'Flex (AR)',
|
9
|
+
'5003f': 'Flex (MR)',
|
10
|
+
'5008f': 'Flex (AF)',
|
11
|
+
'5001': 'Defense (HP)',
|
12
|
+
'5002': 'Defense (AR)',
|
13
|
+
'5003': 'Defense (MR)',
|
14
14
|
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export declare const StatRunesV2: {
|
2
|
+
readonly 0: {
|
3
|
+
readonly '5005': "Offense (AS)";
|
4
|
+
readonly '5007': "Offense (AH)";
|
5
|
+
readonly '5008': "Offense (AF)";
|
6
|
+
};
|
7
|
+
readonly 1: {
|
8
|
+
readonly '5002f': "Flex (AR)";
|
9
|
+
readonly '5003f': "Flex (MR)";
|
10
|
+
readonly '5008f': "Flex (AF)";
|
11
|
+
};
|
12
|
+
readonly 2: {
|
13
|
+
readonly '5001': "Defense (HP)";
|
14
|
+
readonly '5002': "Defense (AR)";
|
15
|
+
readonly '5003': "Defense (MR)";
|
16
|
+
};
|
17
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.StatRunesV2 = void 0;
|
4
|
+
exports.StatRunesV2 = {
|
5
|
+
0: {
|
6
|
+
'5005': 'Offense (AS)',
|
7
|
+
'5007': 'Offense (AH)',
|
8
|
+
'5008': 'Offense (AF)',
|
9
|
+
},
|
10
|
+
1: {
|
11
|
+
'5002f': 'Flex (AR)',
|
12
|
+
'5003f': 'Flex (MR)',
|
13
|
+
'5008f': 'Flex (AF)',
|
14
|
+
},
|
15
|
+
2: {
|
16
|
+
'5001': 'Defense (HP)',
|
17
|
+
'5002': 'Defense (AR)',
|
18
|
+
'5003': 'Defense (MR)',
|
19
|
+
},
|
20
|
+
};
|
@@ -10,6 +10,6 @@
|
|
10
10
|
* Example:
|
11
11
|
* `{"key":"...ConstantValue"} => {...ConstantValue}`
|
12
12
|
*/
|
13
|
-
export declare function
|
13
|
+
export declare function enableEscapedValues(obj: {
|
14
14
|
[k: string]: any;
|
15
|
-
},
|
15
|
+
}, keysToEscape: (string | number)[]): string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.enableEscapedValues = void 0;
|
4
4
|
/**
|
5
5
|
* Basically a modified `JSON.stringify()` function.
|
6
6
|
*
|
@@ -13,9 +13,9 @@ exports.enableSpreadValues = void 0;
|
|
13
13
|
* Example:
|
14
14
|
* `{"key":"...ConstantValue"} => {...ConstantValue}`
|
15
15
|
*/
|
16
|
-
function
|
16
|
+
function enableEscapedValues(obj, keysToEscape) {
|
17
17
|
let json = JSON.stringify(obj);
|
18
|
-
for (let key of
|
18
|
+
for (let key of keysToEscape) {
|
19
19
|
const stringifiedKey = `"${key}":`;
|
20
20
|
let stKeyIdx = json.indexOf(stringifiedKey);
|
21
21
|
// Skip if for whatever reason not found
|
@@ -35,4 +35,4 @@ function enableSpreadValues(obj, keysToSpread) {
|
|
35
35
|
}
|
36
36
|
return json;
|
37
37
|
}
|
38
|
-
exports.
|
38
|
+
exports.enableEscapedValues = enableEscapedValues;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getExportStatement = void 0;
|
4
|
-
const
|
4
|
+
const enableEscapedValues_1 = require("./enableEscapedValues");
|
5
5
|
const getFmtdComment_1 = require("./getFmtdComment");
|
6
6
|
/**
|
7
7
|
* Wraps the provided JSON in a TS export-as-const statement.
|
8
8
|
*/
|
9
|
-
function getExportStatement(constName, json,
|
10
|
-
const stringifiedJson =
|
11
|
-
? (0,
|
9
|
+
function getExportStatement(constName, json, keysToEscape, comment) {
|
10
|
+
const stringifiedJson = keysToEscape
|
11
|
+
? (0, enableEscapedValues_1.enableEscapedValues)(json, keysToEscape)
|
12
12
|
: JSON.stringify(json);
|
13
13
|
const fmtdComment = comment ? (0, getFmtdComment_1.getFmtdComment)(comment) : '';
|
14
14
|
return fmtdComment + `export const ${constName} = ${stringifiedJson} as const`;
|
@@ -5,8 +5,8 @@ const fs_1 = require("fs");
|
|
5
5
|
const getExportStatement_1 = require("./getExportStatement");
|
6
6
|
function writeToTmpFile(mainConstName, ...constants) {
|
7
7
|
return new Promise((res, rej) => {
|
8
|
-
const exportStatements = constants.reduce((finalSt, { constName, comment, json,
|
9
|
-
let exportStatement = (0, getExportStatement_1.getExportStatement)(constName, json,
|
8
|
+
const exportStatements = constants.reduce((finalSt, { constName, comment, json, keysToEscape, }, i) => {
|
9
|
+
let exportStatement = (0, getExportStatement_1.getExportStatement)(constName, json, keysToEscape, comment);
|
10
10
|
return (finalSt
|
11
11
|
+ exportStatement
|
12
12
|
// On last statement, provide only a single empty ending line
|
@@ -4,8 +4,6 @@ import './generate-champion-keys';
|
|
4
4
|
import './generate-champion-names';
|
5
5
|
import './generate-item-keys';
|
6
6
|
import './generate-item-names';
|
7
|
-
import './generate-rune-ids';
|
8
|
-
import './generate-rune-names';
|
9
7
|
import './generate-rune-picking-relationships';
|
10
8
|
import './generate-rune-sets-by-rune-names';
|
11
9
|
import './generate-rune-sets';
|
@@ -13,7 +11,5 @@ import './generate-spell-ids-by-name';
|
|
13
11
|
import './generate-spell-ids';
|
14
12
|
import './generate-spell-keys';
|
15
13
|
import './generate-spell-names';
|
16
|
-
import './generate-stat-rune-ids';
|
17
|
-
import './generate-stat-rune-names';
|
18
14
|
import './generate-tree-rune-ids';
|
19
15
|
import './generate-tree-rune-names';
|
@@ -6,8 +6,10 @@ require("./generate-champion-keys");
|
|
6
6
|
require("./generate-champion-names");
|
7
7
|
require("./generate-item-keys");
|
8
8
|
require("./generate-item-names");
|
9
|
-
|
10
|
-
|
9
|
+
// @deprecated
|
10
|
+
// import './generate-rune-ids'
|
11
|
+
// @deprecated
|
12
|
+
// import './generate-rune-names'
|
11
13
|
require("./generate-rune-picking-relationships");
|
12
14
|
require("./generate-rune-sets-by-rune-names");
|
13
15
|
require("./generate-rune-sets");
|
@@ -15,7 +17,9 @@ require("./generate-spell-ids-by-name");
|
|
15
17
|
require("./generate-spell-ids");
|
16
18
|
require("./generate-spell-keys");
|
17
19
|
require("./generate-spell-names");
|
18
|
-
|
19
|
-
|
20
|
+
// @deprecated
|
21
|
+
// import './generate-stat-rune-ids'
|
22
|
+
// @deprecated
|
23
|
+
// import './generate-stat-rune-names'
|
20
24
|
require("./generate-tree-rune-ids");
|
21
25
|
require("./generate-tree-rune-names");
|
@@ -4,15 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const runesReforged_json_1 = __importDefault(require("../runesReforged.json"));
|
7
|
-
const
|
7
|
+
const StatRunesV2_1 = require("../StatRunesV2");
|
8
8
|
const writeToTmpFile_1 = require("./Helpers/writeToTmpFile");
|
9
9
|
(async () => {
|
10
10
|
const constant = 'RuneSetsByRuneNames';
|
11
11
|
const runeSets = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
PrimaryRuneTrees: {},
|
13
|
+
SecondaryRuneTrees: {},
|
14
|
+
KeystoneIds: {},
|
15
|
+
StatRuneIds: {},
|
16
|
+
RuneTreeHSets: {},
|
17
|
+
StatRuneHSets: {},
|
16
18
|
};
|
17
19
|
const keystoneHSetIdx = 0;
|
18
20
|
let totalRuneAmt = 0;
|
@@ -23,72 +25,95 @@ const writeToTmpFile_1 = require("./Helpers/writeToTmpFile");
|
|
23
25
|
for (const { runes, } of horizontalSets) {
|
24
26
|
for (let { id, name: runeName, } of runes) {
|
25
27
|
totalRuneAmt += 1;
|
26
|
-
// Add to
|
27
|
-
if (!(runeTreeName in runeSets.
|
28
|
-
runeSets.
|
29
|
-
runeSets.
|
30
|
-
// Add to
|
31
|
-
if (!(runeTreeName in runeSets.
|
32
|
-
runeSets.
|
28
|
+
// Add to PrimaryRuneTrees
|
29
|
+
if (!(runeTreeName in runeSets.PrimaryRuneTrees))
|
30
|
+
runeSets.PrimaryRuneTrees[runeTreeName] = {};
|
31
|
+
runeSets.PrimaryRuneTrees[runeTreeName][runeName] = String(id);
|
32
|
+
// Add to SecondaryRuneTrees
|
33
|
+
if (!(runeTreeName in runeSets.SecondaryRuneTrees))
|
34
|
+
runeSets.SecondaryRuneTrees[runeTreeName] = {};
|
33
35
|
// But only if it isn't a keystone rune
|
34
36
|
if (currentHSetIdx != keystoneHSetIdx) {
|
35
|
-
runeSets.
|
37
|
+
runeSets.SecondaryRuneTrees[runeTreeName][runeName] = String(id);
|
36
38
|
}
|
37
|
-
// Add to
|
39
|
+
// Add to KeystoneIds
|
38
40
|
// But only if it is a keystone rune
|
39
41
|
if (currentHSetIdx == keystoneHSetIdx) {
|
40
|
-
runeSets.
|
42
|
+
runeSets.KeystoneIds[runeName] = String(id);
|
41
43
|
}
|
44
|
+
// Add to RuneTreeHSets
|
45
|
+
if (!(runeTreeName in runeSets.RuneTreeHSets))
|
46
|
+
runeSets.RuneTreeHSets[runeTreeName] = {};
|
47
|
+
if (!runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx])
|
48
|
+
runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx] = {};
|
49
|
+
runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx][runeName] = String(id);
|
42
50
|
}
|
43
51
|
++currentHSetIdx;
|
44
52
|
}
|
45
53
|
}
|
46
|
-
let
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
54
|
+
for (let hSetIdx in StatRunesV2_1.StatRunesV2) {
|
55
|
+
const hSetRunes = StatRunesV2_1.StatRunesV2[hSetIdx];
|
56
|
+
for (let [statRuneId, statRuneName] of Object.entries(hSetRunes)) {
|
57
|
+
// Keep track
|
58
|
+
totalRuneAmt += 1;
|
59
|
+
// Add to StatRuneIds
|
60
|
+
runeSets.StatRuneIds[statRuneName] = statRuneId;
|
61
|
+
// Add to StatRuneHSets
|
62
|
+
if (!(hSetIdx in runeSets.StatRuneHSets))
|
63
|
+
runeSets.StatRuneHSets[hSetIdx] = {};
|
64
|
+
runeSets.StatRuneHSets[hSetIdx][statRuneName] = statRuneId;
|
65
|
+
}
|
51
66
|
}
|
52
67
|
// Write to file
|
53
68
|
await (0, writeToTmpFile_1.writeToTmpFile)(constant, {
|
54
|
-
constName: '
|
55
|
-
json: runeSets.
|
69
|
+
constName: 'PrimaryRuneTrees',
|
70
|
+
json: runeSets.PrimaryRuneTrees,
|
56
71
|
}, {
|
57
|
-
constName: '
|
58
|
-
json: runeSets.
|
72
|
+
constName: 'SecondaryRuneTrees',
|
73
|
+
json: runeSets.SecondaryRuneTrees,
|
59
74
|
}, {
|
60
|
-
constName: '
|
61
|
-
json: runeSets.
|
75
|
+
constName: 'KeystoneIds',
|
76
|
+
json: runeSets.KeystoneIds,
|
62
77
|
}, {
|
63
|
-
constName: '
|
64
|
-
json: runeSets.
|
78
|
+
constName: 'StatRuneIds',
|
79
|
+
json: runeSets.StatRuneIds,
|
65
80
|
}, {
|
66
|
-
constName: '
|
81
|
+
constName: 'RuneIds',
|
67
82
|
json: {
|
68
|
-
1: '...
|
69
|
-
2: '...
|
70
|
-
3: '...
|
71
|
-
4: '...
|
72
|
-
5: '...
|
73
|
-
6: '...
|
83
|
+
1: '...PrimaryRuneTrees.Precision',
|
84
|
+
2: '...PrimaryRuneTrees.Domination',
|
85
|
+
3: '...PrimaryRuneTrees.Sorcery',
|
86
|
+
4: '...PrimaryRuneTrees.Resolve',
|
87
|
+
5: '...PrimaryRuneTrees.Inspiration',
|
88
|
+
6: '...StatRuneIds',
|
74
89
|
},
|
75
|
-
|
90
|
+
keysToEscape: [1, 2, 3, 4, 5, 6],
|
91
|
+
}, {
|
92
|
+
constName: 'RuneTreeHSets',
|
93
|
+
json: runeSets.RuneTreeHSets,
|
94
|
+
}, {
|
95
|
+
constName: 'StatRuneHSets',
|
96
|
+
json: runeSets.StatRuneHSets,
|
76
97
|
}, {
|
77
98
|
constName: constant,
|
78
99
|
comment: `Contains all Rune IDs that are known to man in the game of League of Legends. Sorted by various useful categories. There are a total of ${totalRuneAmt} runes in the game.`,
|
79
100
|
json: {
|
80
|
-
'
|
81
|
-
'
|
82
|
-
'
|
83
|
-
'
|
84
|
-
'
|
101
|
+
'PrimaryRuneTrees': 'PrimaryRuneTrees',
|
102
|
+
'SecondaryRuneTrees': 'SecondaryRuneTrees',
|
103
|
+
'KeystoneIds': 'KeystoneIds',
|
104
|
+
'StatRuneIds': 'StatRuneIds',
|
105
|
+
'RuneIds': 'RuneIds',
|
106
|
+
'RuneTreeHSets': 'RuneTreeHSets',
|
107
|
+
'StatRuneHSets': 'StatRuneHSets',
|
85
108
|
},
|
86
|
-
|
87
|
-
'
|
88
|
-
'
|
89
|
-
'
|
90
|
-
'
|
91
|
-
'
|
109
|
+
keysToEscape: [
|
110
|
+
'PrimaryRuneTrees',
|
111
|
+
'SecondaryRuneTrees',
|
112
|
+
'KeystoneIds',
|
113
|
+
'StatRuneIds',
|
114
|
+
'RuneIds',
|
115
|
+
'RuneTreeHSets',
|
116
|
+
'StatRuneHSets',
|
92
117
|
],
|
93
118
|
});
|
94
119
|
})();
|
@@ -4,18 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const runesReforged_json_1 = __importDefault(require("../runesReforged.json"));
|
7
|
-
const
|
7
|
+
const StatRunesV2_1 = require("../StatRunesV2");
|
8
8
|
const writeToTmpFile_1 = require("./Helpers/writeToTmpFile");
|
9
9
|
(async () => {
|
10
10
|
const constant = 'RuneSets';
|
11
11
|
const runeSets = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
// StatRunesByHSet: [],
|
12
|
+
PrimaryRuneTrees: {},
|
13
|
+
SecondaryRuneTrees: {},
|
14
|
+
KeystoneNames: {},
|
15
|
+
StatRuneNames: {},
|
16
|
+
RuneTreeHSets: {},
|
17
|
+
StatRuneHSets: {},
|
19
18
|
};
|
20
19
|
const keystoneHSetIdx = 0;
|
21
20
|
let totalRuneAmt = 0;
|
@@ -26,102 +25,95 @@ const writeToTmpFile_1 = require("./Helpers/writeToTmpFile");
|
|
26
25
|
for (const { runes, } of horizontalSets) {
|
27
26
|
for (let { id, name: runeName, } of runes) {
|
28
27
|
totalRuneAmt += 1;
|
29
|
-
// Add to
|
30
|
-
if (!(runeTreeName in runeSets.
|
31
|
-
runeSets.
|
32
|
-
runeSets.
|
33
|
-
// Add to
|
34
|
-
if (!(runeTreeName in runeSets.
|
35
|
-
runeSets.
|
28
|
+
// Add to PrimaryRuneTrees
|
29
|
+
if (!(runeTreeName in runeSets.PrimaryRuneTrees))
|
30
|
+
runeSets.PrimaryRuneTrees[runeTreeName] = {};
|
31
|
+
runeSets.PrimaryRuneTrees[runeTreeName][id] = runeName;
|
32
|
+
// Add to SecondaryRuneTrees
|
33
|
+
if (!(runeTreeName in runeSets.SecondaryRuneTrees))
|
34
|
+
runeSets.SecondaryRuneTrees[runeTreeName] = {};
|
36
35
|
// But only if it isn't a keystone rune
|
37
36
|
if (currentHSetIdx != keystoneHSetIdx) {
|
38
|
-
runeSets.
|
37
|
+
runeSets.SecondaryRuneTrees[runeTreeName][id] = runeName;
|
39
38
|
}
|
40
|
-
// Add to
|
39
|
+
// Add to KeystoneNames
|
41
40
|
// But only if it is a keystone rune
|
42
41
|
if (currentHSetIdx == keystoneHSetIdx) {
|
43
|
-
runeSets.
|
42
|
+
runeSets.KeystoneNames[id] = runeName;
|
44
43
|
}
|
45
|
-
//
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
44
|
+
// Add to RuneTreeHSets
|
45
|
+
if (!(runeTreeName in runeSets.RuneTreeHSets))
|
46
|
+
runeSets.RuneTreeHSets[runeTreeName] = {};
|
47
|
+
if (!runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx])
|
48
|
+
runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx] = {};
|
49
|
+
runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx][id] = runeName;
|
50
50
|
}
|
51
51
|
++currentHSetIdx;
|
52
52
|
}
|
53
53
|
}
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
// ++currentRuneIdx
|
67
|
-
// if (currentRuneIdx % 3 == 0) ++currentHSetIdx
|
54
|
+
for (let hSetIdx in StatRunesV2_1.StatRunesV2) {
|
55
|
+
const hSetRunes = StatRunesV2_1.StatRunesV2[hSetIdx];
|
56
|
+
for (let [statRuneId, statRuneName] of Object.entries(hSetRunes)) {
|
57
|
+
// Keep track
|
58
|
+
totalRuneAmt += 1;
|
59
|
+
// Add to StatRuneNames
|
60
|
+
runeSets.StatRuneNames[statRuneId] = statRuneName;
|
61
|
+
// Add to StatRuneHSets
|
62
|
+
if (!(hSetIdx in runeSets.StatRuneHSets))
|
63
|
+
runeSets.StatRuneHSets[hSetIdx] = {};
|
64
|
+
runeSets.StatRuneHSets[hSetIdx][statRuneId] = statRuneName;
|
65
|
+
}
|
68
66
|
}
|
69
67
|
// Write to file
|
70
68
|
await (0, writeToTmpFile_1.writeToTmpFile)(constant, {
|
71
|
-
constName: '
|
72
|
-
json: runeSets.
|
69
|
+
constName: 'PrimaryRuneTrees',
|
70
|
+
json: runeSets.PrimaryRuneTrees,
|
73
71
|
}, {
|
74
|
-
constName: '
|
75
|
-
json: runeSets.
|
72
|
+
constName: 'SecondaryRuneTrees',
|
73
|
+
json: runeSets.SecondaryRuneTrees,
|
76
74
|
}, {
|
77
|
-
constName: '
|
78
|
-
json: runeSets.
|
75
|
+
constName: 'KeystoneNames',
|
76
|
+
json: runeSets.KeystoneNames,
|
79
77
|
}, {
|
80
|
-
constName: '
|
81
|
-
json: runeSets.
|
78
|
+
constName: 'StatRuneNames',
|
79
|
+
json: runeSets.StatRuneNames,
|
82
80
|
}, {
|
83
|
-
constName: '
|
81
|
+
constName: 'RuneNames',
|
84
82
|
json: {
|
85
|
-
1: '...
|
86
|
-
2: '...
|
87
|
-
3: '...
|
88
|
-
4: '...
|
89
|
-
5: '...
|
90
|
-
6: '...
|
83
|
+
1: '...PrimaryRuneTrees.Precision',
|
84
|
+
2: '...PrimaryRuneTrees.Domination',
|
85
|
+
3: '...PrimaryRuneTrees.Sorcery',
|
86
|
+
4: '...PrimaryRuneTrees.Resolve',
|
87
|
+
5: '...PrimaryRuneTrees.Inspiration',
|
88
|
+
6: '...StatRuneNames',
|
91
89
|
},
|
92
|
-
|
93
|
-
},
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
// constName: 'StatRunesByHSet',
|
101
|
-
// json: runeSets.StatRunesByHSet,
|
102
|
-
// },
|
103
|
-
{
|
90
|
+
keysToEscape: [1, 2, 3, 4, 5, 6],
|
91
|
+
}, {
|
92
|
+
constName: 'RuneTreeHSets',
|
93
|
+
json: runeSets.RuneTreeHSets,
|
94
|
+
}, {
|
95
|
+
constName: 'StatRuneHSets',
|
96
|
+
json: runeSets.StatRuneHSets,
|
97
|
+
}, {
|
104
98
|
constName: constant,
|
105
99
|
comment: `Contains all Rune IDs that are known to man in the game of League of Legends. Sorted by various useful categories. There are a total of ${totalRuneAmt} runes in the game.`,
|
106
100
|
json: {
|
107
|
-
'
|
108
|
-
'
|
109
|
-
'
|
110
|
-
'
|
111
|
-
'
|
112
|
-
|
113
|
-
|
114
|
-
// 'StatRunesByHSet': 'StatRunesByHSet',
|
101
|
+
'PrimaryRuneTrees': 'PrimaryRuneTrees',
|
102
|
+
'SecondaryRuneTrees': 'SecondaryRuneTrees',
|
103
|
+
'KeystoneNames': 'KeystoneNames',
|
104
|
+
'StatRuneNames': 'StatRuneNames',
|
105
|
+
'RuneNames': 'RuneNames',
|
106
|
+
'RuneTreeHSets': 'RuneTreeHSets',
|
107
|
+
'StatRuneHSets': 'StatRuneHSets',
|
115
108
|
},
|
116
|
-
|
117
|
-
'
|
118
|
-
'
|
119
|
-
'
|
120
|
-
'
|
121
|
-
'
|
122
|
-
|
123
|
-
|
124
|
-
// 'StatRunesByHSet',
|
109
|
+
keysToEscape: [
|
110
|
+
'PrimaryRuneTrees',
|
111
|
+
'SecondaryRuneTrees',
|
112
|
+
'KeystoneNames',
|
113
|
+
'StatRuneNames',
|
114
|
+
'RuneNames',
|
115
|
+
'RuneTreeHSets',
|
116
|
+
'StatRuneHSets',
|
125
117
|
],
|
126
118
|
});
|
127
119
|
})();
|