Implement export of item icons and locale

Add mod and command for exporting the Factorio locale including mods,
and item icons assemled into a sprite sheet including mods.
This commit is contained in:
Hornwitser committed 2020-05-26 01:11:49 +02:00
1 parent d1b851d890
commit 260f976fa3
28 files changed
+642 -247

No files matched your search

+5 -5
View File
@@ -26,14 +26,14 @@ function drawcontents(data) {
let row = rows[i];
if(!row) {
row = document.createElement('tr');
row.innerHTML = "<td><img width=32 height=32></td><td class=name></td><td class=count></td>";
row.innerHTML = "<td><div></div></td><td class=name></td><td class=count></td>";
table.appendChild(row);
}
const img = row.querySelector('img');
const imgName = getImageFromName(item.name);
if(img.getAttribute('src') !== imgName) {
img.setAttribute('src',imgName);
const itemIcon = row.querySelector("div");
const iconClass = getItemIconClass(item.name);
if (itemIcon.getAttribute("class") !== iconClass) {
itemIcon.setAttribute("class", iconClass);
}
const name = row.querySelector('.name');
+1 -1
View File
@@ -23,7 +23,7 @@
<thead class="thead-dark">
<tr>
<th scope="col">Icon</th>
<th scope="col">Item ID</th>
<th scope="col">Resource</th>
<th scope="col">Quantity</th>
</tr>
</thead>