From 14bec5d2252b74eece879b490b81073ae389c626 Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Sun, 9 Jul 2017 17:02:07 +0200 Subject: [PATCH] Fixed icons after wiki links changed --- static/main.js | 3 ++- static/storage.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/static/main.js b/static/main.js index 70bd783f..c0cd5a63 100644 --- a/static/main.js +++ b/static/main.js @@ -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 = { diff --git a/static/storage.js b/static/storage.js index 97d184b7..0ea9c3a8 100644 --- a/static/storage.js +++ b/static/storage.js @@ -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)) {