Skip to content

Commit 36b8ca9

Browse files
committed
feat: add image_inventory to original.
1 parent 6d77f62 commit 36b8ca9

File tree

12 files changed

+17
-0
lines changed

12 files changed

+17
-0
lines changed

services/agents.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const parseItem = item => {
3939
// Return original attributes from item_game.json
4040
original: {
4141
name: item.name,
42+
image_inventory: `econ/characters/${item.name.toLocaleLowerCase()}`,
4243
},
4344
};
4445
};

services/collectibles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ const parseItem = item => {
133133
// Return original attributes from item_game.json
134134
original: {
135135
item_name: item.item_name,
136+
image_inventory: item.image_inventory,
136137
},
137138
};
138139
};

services/crates.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ const parseItem = (item, prefabs) => {
168168
// Return original attributes from item_game.json
169169
original: {
170170
item_name: item.item_name,
171+
image_inventory: item.image_inventory.toLowerCase(),
171172
},
172173
};
173174
};

services/graffiti.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const parseItemSealedGraffiti = item => {
7777
// Return original attributes from item_game.json
7878
original: {
7979
item_name: item.item_name,
80+
image_inventory: `econ/stickers/${item.sticker_material}_${index}`,
8081
},
8182
};
8283
});
@@ -104,6 +105,7 @@ const parseItemSealedGraffiti = item => {
104105
// Return original attributes from item_game.json
105106
original: {
106107
name: item.name,
108+
image_inventory: `econ/stickers/${item.sticker_material}`,
107109
},
108110
};
109111
};

services/highlights.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ const parseItem = item => {
3030
video: folder === "zh-CN" ? item.video.replace("_ww_", "_cn_") : item.video,
3131
// TODO: would be great to have chinese thumbnail as well
3232
thumbnail: folder === "zh-CN" ? item.thumbnail.replace("_ww.jpg", "_cn.jpg") : item.thumbnail,
33+
original: {
34+
image_inventory: item.image_inventory,
35+
},
3336
};
3437
};
3538

services/keychains.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const parseItem = item => {
4545
// Return original attributes from item_game.json
4646
original: {
4747
loc_name: item.loc_name,
48+
image_inventory: item.image_inventory.toLowerCase(),
4849
},
4950
};
5051
};

services/keys.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ const parseItem = item => {
102102
// Return original attributes from item_game.json
103103
original: {
104104
item_name: item.item_name,
105+
image_inventory: item.image_inventory.toLowerCase(),
105106
},
106107
};
107108
};

services/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ export const loadHighlights = () => {
595595
tournament_event_map: item.map,
596596
tournament_player: getPlayerNameOfHighlight(item.id, state.players),
597597
image: getImageUrl(`econ/keychains/${item.id.split("_")[0]}/kc_${item.id.split("_")[0]}`),
598+
image_inventory: `econ/keychains/${item.id.split("_")[0]}/kc_${item.id.split("_")[0]}`,
598599
video: video,
599600
thumbnail: `https://raw.githubusercontent.com/ByMykel/counter-strike-image-tracker/refs/heads/main/static/highlightreels/${item.id.split("_")[0]}/${item.id}_ww.jpg`,
600601
};

services/musicKits.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const parseItem = item => {
4747
// Return original attributes from item_game.json
4848
original: {
4949
name: item.name,
50+
image_inventory: item.image_inventory.toLowerCase(),
5051
},
5152
};
5253

@@ -73,6 +74,7 @@ const parseItem = item => {
7374
// Return original attributes from item_game.json
7475
original: {
7576
name: item.name,
77+
image_inventory: item.image_inventory.toLowerCase(),
7678
},
7779
};
7880

services/patches.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const parseItem = item => {
4040
// Return original attributes from item_game.json
4141
original: {
4242
name: item.name,
43+
image_inventory: `econ/patches/${item.patch_material}`,
4344
},
4445
};
4546
};

0 commit comments

Comments
 (0)