mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +09:00
Fixed icons after wiki links changed
This commit is contained in:
1 parent
5de0b6319c
commit
492d678f94
2 files changed
+4
-2
No files matched your search
+3
-1
@@ -65,6 +65,8 @@ var date = new Date();
|
|||||||
// image data
|
// image data
|
||||||
// key is the name of the item in the database, value is the name of the image on wiki.factorio.com/images/*
|
// 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
|
// this list has to include all entities that doesn't just follow the simple capitalize first letter convention
|
||||||
|
var imagedata = {};
|
||||||
|
/* 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 = {
|
var imagedata = {
|
||||||
["empty-barrel"]: "Barrel-empty",
|
["empty-barrel"]: "Barrel-empty",
|
||||||
["transport-belt"]: "Basic-transport-belt",
|
["transport-belt"]: "Basic-transport-belt",
|
||||||
@@ -106,7 +108,7 @@ var imagedata = {
|
|||||||
["water-barrel"]: "Barrel-empty",
|
["water-barrel"]: "Barrel-empty",
|
||||||
["smart-train-stop"]: "Train-stop",
|
["smart-train-stop"]: "Train-stop",
|
||||||
["put-combinator"]: "Decider-combinator",
|
["put-combinator"]: "Decider-combinator",
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// value:link pairs where you can add modded item icons that are missing
|
// value:link pairs where you can add modded item icons that are missing
|
||||||
var imagelinks = {
|
var imagelinks = {
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ function drawcontents(data) {
|
|||||||
} else if(imagelinks[data[i].name]) {
|
} else if(imagelinks[data[i].name]) {
|
||||||
img = imagelinks[data[i].name];
|
img = imagelinks[data[i].name];
|
||||||
} else {
|
} 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");
|
var searchField = document.querySelector("#search");
|
||||||
if(!searchField.value || data[i].name.includes(searchField.value)) {
|
if(!searchField.value || data[i].name.includes(searchField.value)) {
|
||||||
|
|||||||
Reference in new issue
Block a user