Hello!
ImageLibrary does not load confirmed skins for lr300 at all due to the fact that in "schema.json" it is listed as "lr300.item" although in the game it has a shortname "rifle.lr300".
Accordingly, a check in line 104-106 does not skip it.
ImageLibrary does not load confirmed skins for lr300 at all due to the fact that in "schema.json" it is listed as "lr300.item" although in the game it has a shortname "rifle.lr300".
Accordingly, a check in line 104-106 does not skip it.
ItemDefinition def = ItemManager.FindItemDefinition(item.itemshortname);
if (def == null)
continue;
As an option, you can apply such a fix ;)
Yes, it is not perfect, but it fix the problem.
string identifier;
string shortname;
switch (item.itemshortname)
{
case "lr300.item":
shortname = "rifle.lr300";
break;
default:
shortname = item.itemshortname;
break;
}
ItemDefinition def = ItemManager.FindItemDefinition(shortname);
if (def == null)
continue;
int skinCount = def.skins.Count(k => k.id == item.itemdefid);
if (skinCount == 0)
identifier = $"{shortname}_{item.workshopid}";
else identifier = $"{shortname}_{item.itemdefid}";
if (!imageUrls.URLs.ContainsKey(identifier))
imageUrls.URLs.Add(identifier, item.icon_url);