Fixed icons after wiki links changed

This commit is contained in:
Danielv123 committed 2017-07-09 17:02:07 +02:00
1 parent 5de0b6319c
commit 14bec5d225
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -65,6 +65,7 @@ var date = new Date();
// image data
// key is the name of the item in the database, value is the name of the image on wiki.factorio.com/images/*
// this list has to include all entities that doesn't just follow the simple capitalize first letter convention
/* Notice: All icon images hosted on this Wiki have been renamed to use their in-game names, with underscores. If your external tool references these icons, please correct your links.
var imagedata = {
["empty-barrel"]: "Barrel-empty",
["transport-belt"]: "Basic-transport-belt",
@@ -106,7 +107,7 @@ var imagedata = {
["water-barrel"]: "Barrel-empty",
["smart-train-stop"]: "Train-stop",
["put-combinator"]: "Decider-combinator",
}
}*/
// value:link pairs where you can add modded item icons that are missing
var imagelinks = {
+1 -1
View File
@@ -9,7 +9,7 @@ function drawcontents(data) {
} else if(imagelinks[data[i].name]) {
img = imagelinks[data[i].name];
} else {
img = "https://wiki.factorio.com/images/" + capitalizeFirstLetter(data[i].name) + ".png";
img = "https://wiki.factorio.com/images/" + data[i].name.replace('-','_') + ".png";
}
var searchField = document.querySelector("#search");
if(!searchField.value || data[i].name.includes(searchField.value)) {