mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 07:43:12 +09:00
Rework save logic with regard to start instance
Ensure that notifyExit is called if errors occur during startInstance and createSave request, and rework startInstance save logic to create a new savegame if no save is present and allow specifying the save to load.
This commit is contained in:
1 parent
62e38199bd
commit
56ee1fe955
4 files changed
+64
-22
No files matched your search
@@ -251,6 +251,7 @@ commands.push(new Command({
|
||||
definition: ['start-instance', "Start instance", (yargs) => {
|
||||
yargs.options({
|
||||
'instance': { describe: "Instance to start", nargs: 1, type: 'string', demandOption: true },
|
||||
'save': { describe: "Save load, defaults to latest", nargs: 1, type: 'string' },
|
||||
});
|
||||
}],
|
||||
handler: async function(args, control) {
|
||||
@@ -258,6 +259,7 @@ commands.push(new Command({
|
||||
await link.messages.setInstanceOutputSubscriptions.send(control, { instance_ids: [instanceId] });
|
||||
let response = await link.messages.startInstance.send(control, {
|
||||
instance_id: instanceId,
|
||||
save: args.save || null,
|
||||
});
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user