mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
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:
1 parent
d1b851d890
commit
260f976fa3
28 files changed
+642
-247
No files matched your search
@@ -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');
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user