mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 23:30:41 +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
@@ -438,6 +438,20 @@ class Instance extends link.Link{
|
||||
console.log("Clusterio | Successfully created save");
|
||||
}
|
||||
|
||||
async exportDataRequestHandler() {
|
||||
try {
|
||||
console.log("Clusterio | Writing server-settings.json");
|
||||
await this.writeServerSettings();
|
||||
|
||||
console.log("Exporting data .....");
|
||||
await symlinkMods(this, "sharedMods", console);
|
||||
await factorio.exportData(this.server);
|
||||
|
||||
} finally {
|
||||
this.notifyExit();
|
||||
}
|
||||
}
|
||||
|
||||
async stopInstanceRequestHandler() {
|
||||
await this.stop();
|
||||
}
|
||||
@@ -834,6 +848,12 @@ class Slave extends link.Link {
|
||||
await request.send(instanceConnection, message.data);
|
||||
}
|
||||
|
||||
async exportDataRequestHandler(message, request) {
|
||||
let instanceId = message.data.instance_id;
|
||||
let instanceConnection = await this._connectInstance(instanceId);
|
||||
await request.send(instanceConnection, message.data);
|
||||
}
|
||||
|
||||
async stopInstance(instanceId) {
|
||||
let instanceConnection = this.instanceConnections.get(instanceId);
|
||||
await link.messages.stopInstance.send(instanceConnection, { instance_id: instanceId });
|
||||
|
||||
Reference in new issue
Block a user