mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
Add mod icons by link
This commit is contained in:
1 parent
e156864ccd
commit
bd5956c9ed
3 files changed
+8
-1
No files matched your search
@@ -98,3 +98,8 @@ var imagedata = {
|
||||
["accumulator"]: "Basic-accumulator",
|
||||
["beacon"]: "Basic-beacon",
|
||||
}
|
||||
|
||||
// value:link pairs where you can add modded item icons that are missing
|
||||
var imagelinks = {
|
||||
"fictional-modded-item": "/pictures/fictional-modded-item.png"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
+3
-1
@@ -4,8 +4,10 @@ function drawcontents(data) {
|
||||
result = "<table>";
|
||||
for(i = 0;i < data.length; i++) {
|
||||
var img = "";
|
||||
if(imagedata[data[i].name]){
|
||||
if(imagedata[data[i].name]) {
|
||||
img = "https://wiki.factorio.com/images/" + imagedata[data[i].name] + ".png"
|
||||
} else if(imagelinks[data[i].name]) {
|
||||
img = imagelinks[data[i].name];
|
||||
} else {
|
||||
img = "https://wiki.factorio.com/images/" + capitalizeFirstLetter(data[i].name) + ".png";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user