lol-constants 1.13.0 → 2.0.0
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/assets/{Constants → constants}/BootsItemNames.d.ts +6 -4
- package/assets/{Constants → constants}/BootsItemNames.js +21 -17
- package/assets/{Constants → constants}/Champion.d.ts +7668 -7621
- package/assets/constants/Champion.js +4 -0
- package/assets/{Constants → constants}/Item.d.ts +10073 -10073
- package/assets/constants/Item.js +4 -0
- package/assets/{Constants → constants}/LegendaryItemNames.d.ts +6 -4
- package/assets/{Constants → constants}/LegendaryItemNames.js +86 -82
- package/assets/{Constants → constants}/MythicItemNames.d.ts +6 -4
- package/assets/{Constants → constants}/MythicItemNames.js +40 -36
- package/assets/{Constants → constants}/RunesReforged.d.ts +512 -512
- package/assets/{Constants → constants}/RunesReforged.js +4 -4
- package/assets/{Constants → constants}/StatRunes.d.ts +15 -14
- package/assets/{Constants → constants}/StatRunes.js +17 -17
- package/assets/{Constants → constants}/StatRunesByRow.d.ts +20 -20
- package/assets/{Constants → constants}/StatRunesByRow.js +23 -23
- package/assets/{Constants → constants}/Summoner.d.ts +518 -518
- package/assets/{Constants → constants}/Summoner.js +4 -4
- package/assets/index.d.ts +9 -9
- package/assets/index.js +28 -24
- package/assets/scripts/generate-all.d.ts +17 -17
- package/assets/scripts/generate-all.js +19 -19
- package/assets/scripts/generate-categorized-item-keys.d.ts +1 -1
- package/assets/scripts/generate-categorized-item-keys.js +57 -57
- package/assets/scripts/generate-categorized-item-names.d.ts +1 -1
- package/assets/scripts/generate-categorized-item-names.js +57 -57
- package/assets/scripts/generate-champion-ids-by-name.d.ts +1 -1
- package/assets/scripts/generate-champion-ids-by-name.js +17 -17
- package/assets/scripts/generate-champion-ids.d.ts +1 -1
- package/assets/scripts/generate-champion-ids.js +17 -17
- package/assets/scripts/generate-champion-keys.d.ts +1 -1
- package/assets/scripts/generate-champion-keys.js +17 -17
- package/assets/scripts/generate-champion-names.d.ts +1 -1
- package/assets/scripts/generate-champion-names.js +17 -17
- package/assets/scripts/generate-item-keys.d.ts +1 -1
- package/assets/scripts/generate-item-keys.js +18 -18
- package/assets/scripts/generate-item-names.d.ts +1 -1
- package/assets/scripts/generate-item-names.js +18 -18
- package/assets/scripts/generate-rune-ids.d.ts +1 -1
- package/assets/scripts/generate-rune-ids.js +26 -26
- package/assets/scripts/generate-rune-names.d.ts +1 -1
- package/assets/scripts/generate-rune-names.js +26 -26
- package/assets/scripts/generate-rune-picking-relationships.d.ts +1 -1
- package/assets/scripts/generate-rune-picking-relationships.js +54 -54
- package/assets/scripts/generate-rune-sets-by-rune-names.d.ts +1 -1
- package/assets/scripts/generate-rune-sets-by-rune-names.js +116 -116
- package/assets/scripts/generate-rune-sets.d.ts +1 -1
- package/assets/scripts/generate-rune-sets.js +116 -116
- package/assets/scripts/generate-spell-ids-by-name.d.ts +1 -1
- package/assets/scripts/generate-spell-ids-by-name.js +17 -17
- package/assets/scripts/generate-spell-ids.d.ts +1 -1
- package/assets/scripts/generate-spell-ids.js +17 -17
- package/assets/scripts/generate-spell-keys.d.ts +1 -1
- package/assets/scripts/generate-spell-keys.js +17 -17
- package/assets/scripts/generate-spell-names.d.ts +1 -1
- package/assets/scripts/generate-spell-names.js +17 -17
- package/assets/scripts/generate-stat-rune-ids.d.ts +1 -1
- package/assets/scripts/generate-stat-rune-ids.js +17 -17
- package/assets/scripts/generate-stat-rune-names.d.ts +1 -1
- package/assets/scripts/generate-stat-rune-names.js +17 -17
- package/assets/scripts/generate-tree-rune-ids.d.ts +1 -1
- package/assets/scripts/generate-tree-rune-ids.js +19 -19
- package/assets/scripts/generate-tree-rune-names.d.ts +1 -1
- package/assets/scripts/generate-tree-rune-names.js +19 -19
- package/assets/scripts/{Helpers → helpers}/enableEscapedValues.d.ts +15 -15
- package/assets/scripts/{Helpers → helpers}/enableEscapedValues.js +38 -38
- package/assets/scripts/{Helpers → helpers}/getExportStatement.d.ts +6 -6
- package/assets/scripts/{Helpers → helpers}/getExportStatement.js +16 -16
- package/assets/scripts/{Helpers → helpers}/getFmtdComment.d.ts +5 -5
- package/assets/scripts/{Helpers → helpers}/getFmtdComment.js +15 -15
- package/assets/scripts/{Helpers → helpers}/writeToTmpFile.d.ts +8 -8
- package/assets/scripts/{Helpers → helpers}/writeToTmpFile.js +22 -22
- package/core/{Constants → constants}/Champions/ChampionIds.d.ts +165 -164
- package/core/{Constants → constants}/Champions/ChampionIds.js +4 -4
- package/core/{Constants → constants}/Champions/ChampionIdsByName.d.ts +165 -164
- package/core/constants/Champions/ChampionIdsByName.js +4 -0
- package/core/{Constants → constants}/Champions/ChampionKeys.d.ts +165 -164
- package/core/constants/Champions/ChampionKeys.js +4 -0
- package/core/{Constants → constants}/Champions/ChampionNames.d.ts +165 -164
- package/core/{Constants → constants}/Champions/ChampionNames.js +4 -4
- package/core/{Constants/DDPaths.d.ts → constants/DataDragonUrls.d.ts} +38 -38
- package/core/{Constants/DDPaths.js → constants/DataDragonUrls.js} +45 -45
- package/core/constants/GameModes.d.ts +12 -0
- package/core/constants/GameModes.js +17 -0
- package/core/constants/GameTypes.d.ts +7 -0
- package/core/constants/GameTypes.js +12 -0
- package/core/{Constants → constants}/Items/BootsItemKeys.d.ts +11 -11
- package/core/{Constants → constants}/Items/BootsItemKeys.js +4 -4
- package/core/{Constants → constants}/Items/BootsItemNames.d.ts +11 -11
- package/core/{Constants → constants}/Items/BootsItemNames.js +4 -4
- package/core/{Constants → constants}/Items/ItemKeys.d.ts +263 -263
- package/core/{Constants → constants}/Items/ItemKeys.js +4 -4
- package/core/{Constants → constants}/Items/ItemNames.d.ts +271 -271
- package/core/{Constants → constants}/Items/ItemNames.js +4 -4
- package/core/{Constants → constants}/Items/ItemTypes.d.ts +8 -6
- package/core/{Constants → constants}/Items/ItemTypes.js +13 -9
- package/core/{Constants → constants}/Items/LegendaryItemKeys.d.ts +76 -76
- package/core/{Constants → constants}/Items/LegendaryItemKeys.js +4 -4
- package/core/{Constants → constants}/Items/LegendaryItemNames.d.ts +76 -76
- package/core/{Constants → constants}/Items/LegendaryItemNames.js +4 -4
- package/core/{Constants → constants}/Items/MythicItemKeys.d.ts +30 -30
- package/core/{Constants → constants}/Items/MythicItemKeys.js +4 -4
- package/core/{Constants → constants}/Items/MythicItemNames.d.ts +30 -30
- package/core/{Constants → constants}/Items/MythicItemNames.js +4 -4
- package/core/{Constants → constants}/Lanes.d.ts +8 -6
- package/core/{Constants → constants}/Lanes.js +13 -9
- package/core/{Constants → constants}/Levels.d.ts +22 -20
- package/core/{Constants → constants}/Levels.js +27 -23
- package/core/constants/Locales.d.ts +32 -0
- package/core/constants/Locales.js +37 -0
- package/core/constants/PlatformIds.d.ts +15 -0
- package/core/constants/PlatformIds.js +20 -0
- package/core/{Constants → constants}/Positions.d.ts +9 -7
- package/core/{Constants → constants}/Positions.js +14 -10
- package/core/constants/Queues.d.ts +7 -0
- package/core/constants/Queues.js +12 -0
- package/core/constants/RankedRanks.d.ts +8 -0
- package/core/constants/RankedRanks.js +13 -0
- package/core/constants/RankedTiers.d.ts +13 -0
- package/core/constants/RankedTiers.js +18 -0
- package/core/constants/Regions.d.ts +21 -0
- package/core/constants/Regions.js +26 -0
- package/core/constants/RelativeTeams.d.ts +6 -0
- package/core/constants/RelativeTeams.js +11 -0
- package/core/constants/Roles.d.ts +8 -0
- package/core/constants/Roles.js +13 -0
- package/core/{Constants → constants}/Runes/RuneIconFileNames.d.ts +13 -12
- package/core/{Constants → constants}/Runes/RuneIconFileNames.js +101 -101
- package/core/{Constants → constants}/Runes/RunePickingRelationships.d.ts +77 -77
- package/core/{Constants → constants}/Runes/RunePickingRelationships.js +7 -7
- package/core/{Constants → constants}/Runes/RuneSets.d.ts +743 -743
- package/core/{Constants → constants}/Runes/RuneSets.js +14 -14
- package/core/{Constants → constants}/Runes/RuneSetsByRuneNames.d.ts +743 -743
- package/core/constants/Runes/RuneSetsByRuneNames.js +14 -0
- package/core/constants/Runes/RuneTreeIds.d.ts +11 -0
- package/core/constants/Runes/RuneTreeIds.js +19 -0
- package/core/constants/Runes/RuneTreeNames.d.ts +11 -0
- package/core/constants/Runes/RuneTreeNames.js +19 -0
- package/core/constants/Runes/RuneTreeTypes.d.ts +6 -0
- package/core/constants/Runes/RuneTreeTypes.js +11 -0
- package/core/{Constants → constants}/Runes/TreeRuneIds.d.ts +65 -65
- package/core/{Constants → constants}/Runes/TreeRuneIds.js +4 -4
- package/core/{Constants → constants}/Runes/TreeRuneNames.d.ts +65 -65
- package/core/{Constants → constants}/Runes/TreeRuneNames.js +4 -4
- package/core/{Constants → constants}/Skills.d.ts +8 -6
- package/core/constants/Skills.js +13 -0
- package/core/{Constants → constants}/Spells/SpellIds.d.ts +18 -18
- package/core/{Constants → constants}/Spells/SpellIds.js +4 -4
- package/core/{Constants → constants}/Spells/SpellIdsByName.d.ts +17 -17
- package/core/{Constants → constants}/Spells/SpellIdsByName.js +4 -4
- package/core/{Constants → constants}/Spells/SpellKeys.d.ts +18 -18
- package/core/{Constants → constants}/Spells/SpellKeys.js +4 -4
- package/core/{Constants → constants}/Spells/SpellNames.d.ts +18 -18
- package/core/{Constants → constants}/Spells/SpellNames.js +4 -4
- package/core/constants/WardTypes.d.ts +7 -0
- package/core/constants/WardTypes.js +12 -0
- package/core/{Helpers → helpers}/Champions/getChampionIdByKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/getChampionIdByKey.js +8 -8
- package/core/{Helpers → helpers}/Champions/getChampionIdByName.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/getChampionIdByName.js +8 -8
- package/core/{Helpers → helpers}/Champions/getChampionKeyById.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/getChampionKeyById.js +8 -8
- package/core/{Helpers → helpers}/Champions/getChampionKeyByName.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/getChampionKeyByName.js +9 -9
- package/core/{Helpers → helpers}/Champions/getChampionNameById.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/getChampionNameById.js +9 -9
- package/core/{Helpers → helpers}/Champions/getChampionNameByKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/getChampionNameByKey.js +8 -8
- package/core/{Helpers → helpers}/Champions/isChampionId.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/isChampionId.js +8 -8
- package/core/{Helpers → helpers}/Champions/isChampionKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/isChampionKey.js +8 -8
- package/core/{Helpers → helpers}/Champions/isChampionName.d.ts +2 -2
- package/core/{Helpers → helpers}/Champions/isChampionName.js +8 -8
- package/core/{Helpers → helpers}/Items/getItemKeyByName.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/getItemKeyByName.js +8 -8
- package/core/{Helpers → helpers}/Items/getItemNameByKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/getItemNameByKey.js +8 -8
- package/core/{Helpers → helpers}/Items/isBootsItemKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/isBootsItemKey.js +8 -8
- package/core/{Helpers → helpers}/Items/isBootsItemName.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/isBootsItemName.js +8 -8
- package/core/{Helpers → helpers}/Items/isItemKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/isItemKey.js +8 -8
- package/core/{Helpers → helpers}/Items/isItemName.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/isItemName.js +8 -8
- package/core/{Helpers → helpers}/Items/isLegendaryItemKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/isLegendaryItemKey.js +8 -8
- package/core/{Helpers → helpers}/Items/isLegendaryItemName.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/isLegendaryItemName.js +8 -8
- package/core/{Helpers → helpers}/Items/isMythicItemKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/isMythicItemKey.js +8 -8
- package/core/{Helpers → helpers}/Items/isMythicItemName.d.ts +2 -2
- package/core/{Helpers → helpers}/Items/isMythicItemName.js +8 -8
- package/core/helpers/Runes/getRuneCategoryName.d.ts +3 -0
- package/core/helpers/Runes/getRuneCategoryName.js +20 -0
- package/core/helpers/Runes/getRuneCdnUrl.d.ts +3 -0
- package/core/{Helpers/Runes/getRuneCDNURL.js → helpers/Runes/getRuneCdnUrl.js} +49 -53
- package/core/{Helpers → helpers}/Runes/getRuneIdByName.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/getRuneIdByName.js +8 -8
- package/core/{Helpers → helpers}/Runes/getRuneNameById.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/getRuneNameById.js +8 -8
- package/core/{Helpers → helpers}/Runes/getStatRuneIdByName.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/getStatRuneIdByName.js +8 -8
- package/core/{Helpers → helpers}/Runes/getStatRuneNameById.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/getStatRuneNameById.js +8 -8
- package/core/{Helpers → helpers}/Runes/getTreeRuneIdByName.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/getTreeRuneIdByName.js +8 -8
- package/core/{Helpers → helpers}/Runes/getTreeRuneNameById.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/getTreeRuneNameById.js +8 -8
- package/core/{Helpers → helpers}/Runes/isDominationTreeRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isDominationTreeRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isInspirationTreeRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isInspirationTreeRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isKeystoneRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isKeystoneRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isPrecisionTreeRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isPrecisionTreeRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isResolveTreeRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isResolveTreeRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isRuneName.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isRuneName.js +8 -8
- package/core/{Helpers → helpers}/Runes/isSorceryTreeRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isSorceryTreeRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isStatRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isStatRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isStatRuneName.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isStatRuneName.js +8 -8
- package/core/{Helpers → helpers}/Runes/isTreeRuneId.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isTreeRuneId.js +8 -8
- package/core/{Helpers → helpers}/Runes/isTreeRuneName.d.ts +2 -2
- package/core/{Helpers → helpers}/Runes/isTreeRuneName.js +8 -8
- package/core/{Helpers → helpers}/Spells/getSpellIdByKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/getSpellIdByKey.js +8 -8
- package/core/{Helpers → helpers}/Spells/getSpellIdByName.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/getSpellIdByName.js +8 -8
- package/core/{Helpers → helpers}/Spells/getSpellKeyById.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/getSpellKeyById.js +8 -8
- package/core/{Helpers → helpers}/Spells/getSpellKeyByName.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/getSpellKeyByName.js +9 -9
- package/core/{Helpers → helpers}/Spells/getSpellNameById.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/getSpellNameById.js +9 -9
- package/core/{Helpers → helpers}/Spells/getSpellNameByKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/getSpellNameByKey.js +8 -8
- package/core/{Helpers → helpers}/Spells/isSpellId.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/isSpellId.js +8 -8
- package/core/{Helpers → helpers}/Spells/isSpellKey.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/isSpellKey.js +8 -8
- package/core/{Helpers → helpers}/Spells/isSpellName.d.ts +2 -2
- package/core/{Helpers → helpers}/Spells/isSpellName.js +8 -8
- package/core/helpers/getPositionImageUrl.d.ts +2 -0
- package/core/helpers/getPositionImageUrl.js +15 -0
- package/core/index.d.ts +90 -92
- package/core/index.js +129 -229
- package/core/types/types.d.ts +210 -0
- package/core/types/{Meta.js → types.js} +2 -2
- package/package.json +4 -4
- package/assets/Constants/Champion.js +0 -4
- package/assets/Constants/Item.js +0 -4
- package/core/Constants/Champions/ChampionIdsByName.js +0 -4
- package/core/Constants/Champions/ChampionKeys.js +0 -4
- package/core/Constants/Meta/ChampionRelationTypes.d.ts +0 -4
- package/core/Constants/Meta/ChampionRelationTypes.js +0 -7
- package/core/Constants/Runes/RuneSetsByRuneNames.js +0 -14
- package/core/Constants/Runes/RuneTreeIds.d.ts +0 -7
- package/core/Constants/Runes/RuneTreeIds.js +0 -10
- package/core/Constants/Runes/RuneTreeNames.d.ts +0 -7
- package/core/Constants/Runes/RuneTreeNames.js +0 -10
- package/core/Constants/Runes/RuneTreeTypes.d.ts +0 -4
- package/core/Constants/Runes/RuneTreeTypes.js +0 -7
- package/core/Constants/Skills.js +0 -9
- package/core/Helpers/Icons/getPositionImageURL.d.ts +0 -5
- package/core/Helpers/Icons/getPositionImageURL.js +0 -15
- package/core/Helpers/Items/isItemType.d.ts +0 -2
- package/core/Helpers/Items/isItemType.js +0 -8
- package/core/Helpers/Meta/isChampionRelationType.d.ts +0 -2
- package/core/Helpers/Meta/isChampionRelationType.js +0 -8
- package/core/Helpers/Runes/getRuneCDNURL.d.ts +0 -6
- package/core/Helpers/Runes/getRuneCategoryByRuneName.d.ts +0 -5
- package/core/Helpers/Runes/getRuneCategoryByRuneName.js +0 -28
- package/core/Helpers/Runes/getRuneTreeIdByName.d.ts +0 -2
- package/core/Helpers/Runes/getRuneTreeIdByName.js +0 -8
- package/core/Helpers/Runes/getRuneTreeNameById.d.ts +0 -2
- package/core/Helpers/Runes/getRuneTreeNameById.js +0 -8
- package/core/Helpers/Runes/isRuneTreeId.d.ts +0 -2
- package/core/Helpers/Runes/isRuneTreeId.js +0 -8
- package/core/Helpers/Runes/isRuneTreeName.d.ts +0 -2
- package/core/Helpers/Runes/isRuneTreeName.js +0 -8
- package/core/Helpers/Runes/isRuneTreeType.d.ts +0 -2
- package/core/Helpers/Runes/isRuneTreeType.js +0 -8
- package/core/Helpers/isLane.d.ts +0 -2
- package/core/Helpers/isLane.js +0 -8
- package/core/Helpers/isLevel.d.ts +0 -2
- package/core/Helpers/isLevel.js +0 -8
- package/core/Helpers/isPosition.d.ts +0 -2
- package/core/Helpers/isPosition.js +0 -8
- package/core/Helpers/isSkill.d.ts +0 -2
- package/core/Helpers/isSkill.js +0 -8
- package/core/types/Meta.d.ts +0 -40
- package/core/types/index.d.ts +0 -197
- package/core/types/index.js +0 -2
@@ -1,17 +1,17 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const fs_1 = require("fs");
|
4
|
-
const Champion_1 = require("../
|
5
|
-
const getExportStatement_1 = require("./
|
6
|
-
(async () => {
|
7
|
-
const championKeys = {};
|
8
|
-
// Add all champions' data to each corresponding key value
|
9
|
-
let championId;
|
10
|
-
for (championId in Champion_1.Champion.data) {
|
11
|
-
const championData = Champion_1.Champion.data[championId];
|
12
|
-
championKeys[championId] = championData.key;
|
13
|
-
}
|
14
|
-
// Write to file
|
15
|
-
const constName = 'ChampionKeys';
|
16
|
-
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, championKeys));
|
17
|
-
})();
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const fs_1 = require("fs");
|
4
|
+
const Champion_1 = require("../constants/Champion");
|
5
|
+
const getExportStatement_1 = require("./helpers/getExportStatement");
|
6
|
+
(async () => {
|
7
|
+
const championKeys = {};
|
8
|
+
// Add all champions' data to each corresponding key value
|
9
|
+
let championId;
|
10
|
+
for (championId in Champion_1.Champion.data) {
|
11
|
+
const championData = Champion_1.Champion.data[championId];
|
12
|
+
championKeys[championId] = championData.key;
|
13
|
+
}
|
14
|
+
// Write to file
|
15
|
+
const constName = 'ChampionKeys';
|
16
|
+
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, championKeys));
|
17
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,17 +1,17 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const fs_1 = require("fs");
|
4
|
-
const Champion_1 = require("../
|
5
|
-
const getExportStatement_1 = require("./
|
6
|
-
(async () => {
|
7
|
-
const championNames = {};
|
8
|
-
// Extract all champion names from `champion.json`
|
9
|
-
let championId;
|
10
|
-
for (championId in Champion_1.Champion.data) {
|
11
|
-
const championData = Champion_1.Champion.data[championId];
|
12
|
-
championNames[championData.key] = championData.name;
|
13
|
-
}
|
14
|
-
// Write to file
|
15
|
-
const constName = 'ChampionNames';
|
16
|
-
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, championNames));
|
17
|
-
})();
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const fs_1 = require("fs");
|
4
|
+
const Champion_1 = require("../constants/Champion");
|
5
|
+
const getExportStatement_1 = require("./helpers/getExportStatement");
|
6
|
+
(async () => {
|
7
|
+
const championNames = {};
|
8
|
+
// Extract all champion names from `champion.json`
|
9
|
+
let championId;
|
10
|
+
for (championId in Champion_1.Champion.data) {
|
11
|
+
const championData = Champion_1.Champion.data[championId];
|
12
|
+
championNames[championData.key] = championData.name;
|
13
|
+
}
|
14
|
+
// Write to file
|
15
|
+
const constName = 'ChampionNames';
|
16
|
+
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, championNames));
|
17
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,18 +1,18 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const fs_1 = require("fs");
|
4
|
-
const Item_1 = require("../
|
5
|
-
const getExportStatement_1 = require("./
|
6
|
-
(async () => {
|
7
|
-
const itemKeys = {};
|
8
|
-
// Add all items' data to each corresponding name value
|
9
|
-
let itemKey;
|
10
|
-
for (itemKey in Item_1.Item.data) {
|
11
|
-
const itemData = Item_1.Item.data[itemKey];
|
12
|
-
let htmlEscapedName = itemData.name.replace(/<[^>]*>?/gm, '');
|
13
|
-
itemKeys[htmlEscapedName] = itemKey;
|
14
|
-
}
|
15
|
-
// Write to file
|
16
|
-
const constName = 'ItemKeys';
|
17
|
-
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, itemKeys));
|
18
|
-
})();
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const fs_1 = require("fs");
|
4
|
+
const Item_1 = require("../constants/Item");
|
5
|
+
const getExportStatement_1 = require("./helpers/getExportStatement");
|
6
|
+
(async () => {
|
7
|
+
const itemKeys = {};
|
8
|
+
// Add all items' data to each corresponding name value
|
9
|
+
let itemKey;
|
10
|
+
for (itemKey in Item_1.Item.data) {
|
11
|
+
const itemData = Item_1.Item.data[itemKey];
|
12
|
+
let htmlEscapedName = itemData.name.replace(/<[^>]*>?/gm, '');
|
13
|
+
itemKeys[htmlEscapedName] = itemKey;
|
14
|
+
}
|
15
|
+
// Write to file
|
16
|
+
const constName = 'ItemKeys';
|
17
|
+
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, itemKeys));
|
18
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,18 +1,18 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const fs_1 = require("fs");
|
4
|
-
const Item_1 = require("../
|
5
|
-
const getExportStatement_1 = require("./
|
6
|
-
(async () => {
|
7
|
-
const itemNames = {};
|
8
|
-
// Add all items' data to each corresponding name value
|
9
|
-
let itemKey;
|
10
|
-
for (itemKey in Item_1.Item.data) {
|
11
|
-
const itemData = Item_1.Item.data[itemKey];
|
12
|
-
let htmlEscapedName = itemData.name.replace(/<[^>]*>?/gm, '');
|
13
|
-
itemNames[itemKey] = htmlEscapedName;
|
14
|
-
}
|
15
|
-
// Write to file
|
16
|
-
const constName = 'ItemNames';
|
17
|
-
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, itemNames));
|
18
|
-
})();
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const fs_1 = require("fs");
|
4
|
+
const Item_1 = require("../constants/Item");
|
5
|
+
const getExportStatement_1 = require("./helpers/getExportStatement");
|
6
|
+
(async () => {
|
7
|
+
const itemNames = {};
|
8
|
+
// Add all items' data to each corresponding name value
|
9
|
+
let itemKey;
|
10
|
+
for (itemKey in Item_1.Item.data) {
|
11
|
+
const itemData = Item_1.Item.data[itemKey];
|
12
|
+
let htmlEscapedName = itemData.name.replace(/<[^>]*>?/gm, '');
|
13
|
+
itemNames[itemKey] = htmlEscapedName;
|
14
|
+
}
|
15
|
+
// Write to file
|
16
|
+
const constName = 'ItemNames';
|
17
|
+
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, itemNames));
|
18
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,26 +1,26 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const fs_1 = require("fs");
|
4
|
-
const RunesReforged_1 = require("../
|
5
|
-
const StatRunes_1 = require("../
|
6
|
-
const getExportStatement_1 = require("./
|
7
|
-
(async () => {
|
8
|
-
const runeIds = {};
|
9
|
-
// Construct the new data and assign it to product object
|
10
|
-
for (const runeTree of RunesReforged_1.RunesReforged) {
|
11
|
-
for (const { runes } of runeTree.slots) {
|
12
|
-
for (const rune of runes) {
|
13
|
-
runeIds[rune.name] = String(rune.id);
|
14
|
-
}
|
15
|
-
}
|
16
|
-
}
|
17
|
-
// Add Stat Runes
|
18
|
-
let statRuneId;
|
19
|
-
for (statRuneId in StatRunes_1.StatRunes) {
|
20
|
-
const statRuneName = StatRunes_1.StatRunes[statRuneId];
|
21
|
-
runeIds[statRuneName] = statRuneId;
|
22
|
-
}
|
23
|
-
// Write to file
|
24
|
-
const constName = 'RuneIds';
|
25
|
-
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeIds));
|
26
|
-
})();
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const fs_1 = require("fs");
|
4
|
+
const RunesReforged_1 = require("../constants/RunesReforged");
|
5
|
+
const StatRunes_1 = require("../constants/StatRunes");
|
6
|
+
const getExportStatement_1 = require("./helpers/getExportStatement");
|
7
|
+
(async () => {
|
8
|
+
const runeIds = {};
|
9
|
+
// Construct the new data and assign it to product object
|
10
|
+
for (const runeTree of RunesReforged_1.RunesReforged) {
|
11
|
+
for (const { runes } of runeTree.slots) {
|
12
|
+
for (const rune of runes) {
|
13
|
+
runeIds[rune.name] = String(rune.id);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
// Add Stat Runes
|
18
|
+
let statRuneId;
|
19
|
+
for (statRuneId in StatRunes_1.StatRunes) {
|
20
|
+
const statRuneName = StatRunes_1.StatRunes[statRuneId];
|
21
|
+
runeIds[statRuneName] = statRuneId;
|
22
|
+
}
|
23
|
+
// Write to file
|
24
|
+
const constName = 'RuneIds';
|
25
|
+
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeIds));
|
26
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,26 +1,26 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const fs_1 = require("fs");
|
4
|
-
const RunesReforged_1 = require("../
|
5
|
-
const StatRunes_1 = require("../
|
6
|
-
const getExportStatement_1 = require("./
|
7
|
-
(async () => {
|
8
|
-
const runeNames = {};
|
9
|
-
// Construct the new data and assign it to product object
|
10
|
-
for (const runeTree of RunesReforged_1.RunesReforged) {
|
11
|
-
for (const { runes } of runeTree.slots) {
|
12
|
-
for (const rune of runes) {
|
13
|
-
runeNames[rune.id] = rune.name;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
}
|
17
|
-
// Add Stat Runes
|
18
|
-
let statRuneId;
|
19
|
-
for (statRuneId in StatRunes_1.StatRunes) {
|
20
|
-
const statRuneName = StatRunes_1.StatRunes[statRuneId];
|
21
|
-
runeNames[statRuneId] = statRuneName;
|
22
|
-
}
|
23
|
-
// Write to file
|
24
|
-
const constName = 'RuneNames';
|
25
|
-
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeNames));
|
26
|
-
})();
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const fs_1 = require("fs");
|
4
|
+
const RunesReforged_1 = require("../constants/RunesReforged");
|
5
|
+
const StatRunes_1 = require("../constants/StatRunes");
|
6
|
+
const getExportStatement_1 = require("./helpers/getExportStatement");
|
7
|
+
(async () => {
|
8
|
+
const runeNames = {};
|
9
|
+
// Construct the new data and assign it to product object
|
10
|
+
for (const runeTree of RunesReforged_1.RunesReforged) {
|
11
|
+
for (const { runes } of runeTree.slots) {
|
12
|
+
for (const rune of runes) {
|
13
|
+
runeNames[rune.id] = rune.name;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
// Add Stat Runes
|
18
|
+
let statRuneId;
|
19
|
+
for (statRuneId in StatRunes_1.StatRunes) {
|
20
|
+
const statRuneName = StatRunes_1.StatRunes[statRuneId];
|
21
|
+
runeNames[statRuneId] = statRuneName;
|
22
|
+
}
|
23
|
+
// Write to file
|
24
|
+
const constName = 'RuneNames';
|
25
|
+
(0, fs_1.writeFileSync)(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeNames));
|
26
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,54 +1,54 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const RunesReforged_1 = require("../
|
4
|
-
const writeToTmpFile_1 = require("./
|
5
|
-
(async () => {
|
6
|
-
const constant = 'RunePickingRelationships';
|
7
|
-
const relationships = {};
|
8
|
-
// Determine all of the runes (2-3) that each rune in the game
|
9
|
-
// has a horizontal-set "relationship" with.
|
10
|
-
// It means that they are dependent on that rune
|
11
|
-
// for picking purposes.
|
12
|
-
// Only one rune can be picked per h-set.
|
13
|
-
for (const category of RunesReforged_1.RunesReforged) {
|
14
|
-
for (const { runes, } of category.slots) {
|
15
|
-
for (const { id: baseRuneId, } of runes) {
|
16
|
-
// Assign each of the neighboring runes to this rune's r-ship array.
|
17
|
-
for (const { id, } of runes) {
|
18
|
-
// Let us simply assume that there is no such thing as a relationship
|
19
|
-
// with oneself, therefore skip.
|
20
|
-
if (baseRuneId == id)
|
21
|
-
continue;
|
22
|
-
if (!relationships[baseRuneId])
|
23
|
-
relationships[baseRuneId] = [];
|
24
|
-
relationships[baseRuneId].push(String(id));
|
25
|
-
}
|
26
|
-
}
|
27
|
-
}
|
28
|
-
}
|
29
|
-
// Create workshop arrays for each horizontal-set of stat runes.
|
30
|
-
const offense = ['5005', '5007', '5008'];
|
31
|
-
const flex = ['5002f', '5003f', '5008f'];
|
32
|
-
const defense = ['5001', '5002', '5003'];
|
33
|
-
for (let hSet of [
|
34
|
-
offense,
|
35
|
-
flex,
|
36
|
-
defense,
|
37
|
-
]) {
|
38
|
-
for (let baseStatRuneId of hSet) {
|
39
|
-
for (let statRuneId of hSet) {
|
40
|
-
// Skip self
|
41
|
-
if (baseStatRuneId == statRuneId)
|
42
|
-
continue;
|
43
|
-
if (!relationships[baseStatRuneId])
|
44
|
-
relationships[baseStatRuneId] = [];
|
45
|
-
relationships[baseStatRuneId].push(statRuneId);
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
await (0, writeToTmpFile_1.writeToTmpFile)(constant, {
|
50
|
-
constName: constant,
|
51
|
-
comment: `All of the runes and their relationships to other runes in terms of picking. Only one rune can be picked in a rune horizontal-set, each main rune that has a relationship to another rune unselects the other rune if the main rune is picked.`,
|
52
|
-
json: relationships,
|
53
|
-
});
|
54
|
-
})();
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
|
+
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
5
|
+
(async () => {
|
6
|
+
const constant = 'RunePickingRelationships';
|
7
|
+
const relationships = {};
|
8
|
+
// Determine all of the runes (2-3) that each rune in the game
|
9
|
+
// has a horizontal-set "relationship" with.
|
10
|
+
// It means that they are dependent on that rune
|
11
|
+
// for picking purposes.
|
12
|
+
// Only one rune can be picked per h-set.
|
13
|
+
for (const category of RunesReforged_1.RunesReforged) {
|
14
|
+
for (const { runes, } of category.slots) {
|
15
|
+
for (const { id: baseRuneId, } of runes) {
|
16
|
+
// Assign each of the neighboring runes to this rune's r-ship array.
|
17
|
+
for (const { id, } of runes) {
|
18
|
+
// Let us simply assume that there is no such thing as a relationship
|
19
|
+
// with oneself, therefore skip.
|
20
|
+
if (baseRuneId == id)
|
21
|
+
continue;
|
22
|
+
if (!relationships[baseRuneId])
|
23
|
+
relationships[baseRuneId] = [];
|
24
|
+
relationships[baseRuneId].push(String(id));
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
// Create workshop arrays for each horizontal-set of stat runes.
|
30
|
+
const offense = ['5005', '5007', '5008'];
|
31
|
+
const flex = ['5002f', '5003f', '5008f'];
|
32
|
+
const defense = ['5001', '5002', '5003'];
|
33
|
+
for (let hSet of [
|
34
|
+
offense,
|
35
|
+
flex,
|
36
|
+
defense,
|
37
|
+
]) {
|
38
|
+
for (let baseStatRuneId of hSet) {
|
39
|
+
for (let statRuneId of hSet) {
|
40
|
+
// Skip self
|
41
|
+
if (baseStatRuneId == statRuneId)
|
42
|
+
continue;
|
43
|
+
if (!relationships[baseStatRuneId])
|
44
|
+
relationships[baseStatRuneId] = [];
|
45
|
+
relationships[baseStatRuneId].push(statRuneId);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
await (0, writeToTmpFile_1.writeToTmpFile)(constant, {
|
50
|
+
constName: constant,
|
51
|
+
comment: `All of the runes and their relationships to other runes in terms of picking. Only one rune can be picked in a rune horizontal-set, each main rune that has a relationship to another rune unselects the other rune if the main rune is picked.`,
|
52
|
+
json: relationships,
|
53
|
+
});
|
54
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,116 +1,116 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const RunesReforged_1 = require("../
|
4
|
-
const StatRunesByRow_1 = require("../
|
5
|
-
const writeToTmpFile_1 = require("./
|
6
|
-
(async () => {
|
7
|
-
const constant = 'RuneSetsByRuneNames';
|
8
|
-
const runeSets = {
|
9
|
-
PrimaryRuneTrees: {},
|
10
|
-
SecondaryRuneTrees: {},
|
11
|
-
KeystoneIds: {},
|
12
|
-
StatRuneIds: {},
|
13
|
-
RuneTreeHSets: {},
|
14
|
-
StatRuneHSets: {},
|
15
|
-
};
|
16
|
-
const keystoneHSetIdx = 0;
|
17
|
-
let totalRuneAmt = 0;
|
18
|
-
for (const runeTree of RunesReforged_1.RunesReforged) {
|
19
|
-
const runeTreeName = runeTree.name;
|
20
|
-
const horizontalSets = runeTree.slots;
|
21
|
-
let currentHSetIdx = 0;
|
22
|
-
for (const { runes, } of horizontalSets) {
|
23
|
-
for (let { id, name: runeName, } of runes) {
|
24
|
-
totalRuneAmt += 1;
|
25
|
-
// Add to PrimaryRuneTrees
|
26
|
-
if (!(runeTreeName in runeSets.PrimaryRuneTrees))
|
27
|
-
runeSets.PrimaryRuneTrees[runeTreeName] = {};
|
28
|
-
runeSets.PrimaryRuneTrees[runeTreeName][runeName] = String(id);
|
29
|
-
// Add to SecondaryRuneTrees
|
30
|
-
if (!(runeTreeName in runeSets.SecondaryRuneTrees))
|
31
|
-
runeSets.SecondaryRuneTrees[runeTreeName] = {};
|
32
|
-
// But only if it isn't a keystone rune
|
33
|
-
if (currentHSetIdx != keystoneHSetIdx) {
|
34
|
-
runeSets.SecondaryRuneTrees[runeTreeName][runeName] = String(id);
|
35
|
-
}
|
36
|
-
// Add to KeystoneIds
|
37
|
-
// But only if it is a keystone rune
|
38
|
-
if (currentHSetIdx == keystoneHSetIdx) {
|
39
|
-
runeSets.KeystoneIds[runeName] = String(id);
|
40
|
-
}
|
41
|
-
// Add to RuneTreeHSets
|
42
|
-
if (!(runeTreeName in runeSets.RuneTreeHSets))
|
43
|
-
runeSets.RuneTreeHSets[runeTreeName] = {};
|
44
|
-
if (!runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx])
|
45
|
-
runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx] = {};
|
46
|
-
runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx][runeName] = String(id);
|
47
|
-
}
|
48
|
-
++currentHSetIdx;
|
49
|
-
}
|
50
|
-
}
|
51
|
-
for (let hSetIdx in StatRunesByRow_1.StatRunesByRow) {
|
52
|
-
const hSetRunes = StatRunesByRow_1.StatRunesByRow[hSetIdx];
|
53
|
-
for (let [statRuneId, statRuneName] of Object.entries(hSetRunes)) {
|
54
|
-
// Keep track
|
55
|
-
totalRuneAmt += 1;
|
56
|
-
// Add to StatRuneIds
|
57
|
-
runeSets.StatRuneIds[statRuneName] = statRuneId;
|
58
|
-
// Add to StatRuneHSets
|
59
|
-
if (!(hSetIdx in runeSets.StatRuneHSets))
|
60
|
-
runeSets.StatRuneHSets[hSetIdx] = {};
|
61
|
-
runeSets.StatRuneHSets[hSetIdx][statRuneName] = statRuneId;
|
62
|
-
}
|
63
|
-
}
|
64
|
-
// Write to file
|
65
|
-
await (0, writeToTmpFile_1.writeToTmpFile)(constant, {
|
66
|
-
constName: '
|
67
|
-
json: runeSets.PrimaryRuneTrees,
|
68
|
-
}, {
|
69
|
-
constName: '
|
70
|
-
json: runeSets.SecondaryRuneTrees,
|
71
|
-
}, {
|
72
|
-
constName: 'KeystoneIds',
|
73
|
-
json: runeSets.KeystoneIds,
|
74
|
-
}, {
|
75
|
-
constName: 'StatRuneIds',
|
76
|
-
json: runeSets.StatRuneIds,
|
77
|
-
}, {
|
78
|
-
constName: 'RuneIds',
|
79
|
-
json: {
|
80
|
-
1: '...
|
81
|
-
2: '...
|
82
|
-
3: '...
|
83
|
-
4: '...
|
84
|
-
5: '...
|
85
|
-
6: '...StatRuneIds',
|
86
|
-
},
|
87
|
-
keysToEscape: [1, 2, 3, 4, 5, 6],
|
88
|
-
}, {
|
89
|
-
constName: '
|
90
|
-
json: runeSets.RuneTreeHSets,
|
91
|
-
}, {
|
92
|
-
constName: '
|
93
|
-
json: runeSets.StatRuneHSets,
|
94
|
-
}, {
|
95
|
-
constName: constant,
|
96
|
-
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.`,
|
97
|
-
json: {
|
98
|
-
'
|
99
|
-
'
|
100
|
-
'KeystoneIds': 'KeystoneIds',
|
101
|
-
'StatRuneIds': 'StatRuneIds',
|
102
|
-
'RuneIds': 'RuneIds',
|
103
|
-
'
|
104
|
-
'
|
105
|
-
},
|
106
|
-
keysToEscape: [
|
107
|
-
'
|
108
|
-
'
|
109
|
-
'KeystoneIds',
|
110
|
-
'StatRuneIds',
|
111
|
-
'RuneIds',
|
112
|
-
'
|
113
|
-
'
|
114
|
-
],
|
115
|
-
});
|
116
|
-
})();
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
|
+
const StatRunesByRow_1 = require("../constants/StatRunesByRow");
|
5
|
+
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
6
|
+
(async () => {
|
7
|
+
const constant = 'RuneSetsByRuneNames';
|
8
|
+
const runeSets = {
|
9
|
+
PrimaryRuneTrees: {},
|
10
|
+
SecondaryRuneTrees: {},
|
11
|
+
KeystoneIds: {},
|
12
|
+
StatRuneIds: {},
|
13
|
+
RuneTreeHSets: {},
|
14
|
+
StatRuneHSets: {},
|
15
|
+
};
|
16
|
+
const keystoneHSetIdx = 0;
|
17
|
+
let totalRuneAmt = 0;
|
18
|
+
for (const runeTree of RunesReforged_1.RunesReforged) {
|
19
|
+
const runeTreeName = runeTree.name;
|
20
|
+
const horizontalSets = runeTree.slots;
|
21
|
+
let currentHSetIdx = 0;
|
22
|
+
for (const { runes, } of horizontalSets) {
|
23
|
+
for (let { id, name: runeName, } of runes) {
|
24
|
+
totalRuneAmt += 1;
|
25
|
+
// Add to PrimaryRuneTrees
|
26
|
+
if (!(runeTreeName in runeSets.PrimaryRuneTrees))
|
27
|
+
runeSets.PrimaryRuneTrees[runeTreeName] = {};
|
28
|
+
runeSets.PrimaryRuneTrees[runeTreeName][runeName] = String(id);
|
29
|
+
// Add to SecondaryRuneTrees
|
30
|
+
if (!(runeTreeName in runeSets.SecondaryRuneTrees))
|
31
|
+
runeSets.SecondaryRuneTrees[runeTreeName] = {};
|
32
|
+
// But only if it isn't a keystone rune
|
33
|
+
if (currentHSetIdx != keystoneHSetIdx) {
|
34
|
+
runeSets.SecondaryRuneTrees[runeTreeName][runeName] = String(id);
|
35
|
+
}
|
36
|
+
// Add to KeystoneIds
|
37
|
+
// But only if it is a keystone rune
|
38
|
+
if (currentHSetIdx == keystoneHSetIdx) {
|
39
|
+
runeSets.KeystoneIds[runeName] = String(id);
|
40
|
+
}
|
41
|
+
// Add to RuneTreeHSets
|
42
|
+
if (!(runeTreeName in runeSets.RuneTreeHSets))
|
43
|
+
runeSets.RuneTreeHSets[runeTreeName] = {};
|
44
|
+
if (!runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx])
|
45
|
+
runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx] = {};
|
46
|
+
runeSets.RuneTreeHSets[runeTreeName][currentHSetIdx][runeName] = String(id);
|
47
|
+
}
|
48
|
+
++currentHSetIdx;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
for (let hSetIdx in StatRunesByRow_1.StatRunesByRow) {
|
52
|
+
const hSetRunes = StatRunesByRow_1.StatRunesByRow[hSetIdx];
|
53
|
+
for (let [statRuneId, statRuneName] of Object.entries(hSetRunes)) {
|
54
|
+
// Keep track
|
55
|
+
totalRuneAmt += 1;
|
56
|
+
// Add to StatRuneIds
|
57
|
+
runeSets.StatRuneIds[statRuneName] = statRuneId;
|
58
|
+
// Add to StatRuneHSets
|
59
|
+
if (!(hSetIdx in runeSets.StatRuneHSets))
|
60
|
+
runeSets.StatRuneHSets[hSetIdx] = {};
|
61
|
+
runeSets.StatRuneHSets[hSetIdx][statRuneName] = statRuneId;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
// Write to file
|
65
|
+
await (0, writeToTmpFile_1.writeToTmpFile)(constant, {
|
66
|
+
constName: 'PrimaryRuneTreesByRuneNames',
|
67
|
+
json: runeSets.PrimaryRuneTrees,
|
68
|
+
}, {
|
69
|
+
constName: 'SecondaryRuneTreesByRuneNames',
|
70
|
+
json: runeSets.SecondaryRuneTrees,
|
71
|
+
}, {
|
72
|
+
constName: 'KeystoneIds',
|
73
|
+
json: runeSets.KeystoneIds,
|
74
|
+
}, {
|
75
|
+
constName: 'StatRuneIds',
|
76
|
+
json: runeSets.StatRuneIds,
|
77
|
+
}, {
|
78
|
+
constName: 'RuneIds',
|
79
|
+
json: {
|
80
|
+
1: '...PrimaryRuneTreesByRuneNames.Precision',
|
81
|
+
2: '...PrimaryRuneTreesByRuneNames.Domination',
|
82
|
+
3: '...PrimaryRuneTreesByRuneNames.Sorcery',
|
83
|
+
4: '...PrimaryRuneTreesByRuneNames.Resolve',
|
84
|
+
5: '...PrimaryRuneTreesByRuneNames.Inspiration',
|
85
|
+
6: '...StatRuneIds',
|
86
|
+
},
|
87
|
+
keysToEscape: [1, 2, 3, 4, 5, 6],
|
88
|
+
}, {
|
89
|
+
constName: 'RuneTreeHSetsByRuneNames',
|
90
|
+
json: runeSets.RuneTreeHSets,
|
91
|
+
}, {
|
92
|
+
constName: 'StatRuneHSetsByRuneNames',
|
93
|
+
json: runeSets.StatRuneHSets,
|
94
|
+
}, {
|
95
|
+
constName: constant,
|
96
|
+
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.`,
|
97
|
+
json: {
|
98
|
+
'PrimaryRuneTreesByRuneNames': 'PrimaryRuneTreesByRuneNames',
|
99
|
+
'SecondaryRuneTreesByRuneNames': 'SecondaryRuneTreesByRuneNames',
|
100
|
+
'KeystoneIds': 'KeystoneIds',
|
101
|
+
'StatRuneIds': 'StatRuneIds',
|
102
|
+
'RuneIds': 'RuneIds',
|
103
|
+
'RuneTreeHSetsByRuneNames': 'RuneTreeHSetsByRuneNames',
|
104
|
+
'StatRuneHSetsByRuneNames': 'StatRuneHSetsByRuneNames',
|
105
|
+
},
|
106
|
+
keysToEscape: [
|
107
|
+
'PrimaryRuneTreesByRuneNames',
|
108
|
+
'SecondaryRuneTreesByRuneNames',
|
109
|
+
'KeystoneIds',
|
110
|
+
'StatRuneIds',
|
111
|
+
'RuneIds',
|
112
|
+
'RuneTreeHSetsByRuneNames',
|
113
|
+
'StatRuneHSetsByRuneNames',
|
114
|
+
],
|
115
|
+
});
|
116
|
+
})();
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|