1.0.5 RC9

This commit is contained in:
phidias authored and GitHub committed 2026-10-12 23:19:41 +09:00
1 parent b5090e1acf
commit 628b1aafe2
1 file changed
+2 -3
+2 -3
View File
@@ -18,12 +18,11 @@ const SAVE_LINE_RE = /Saving to (.+?) \((?:non-)?blocking\)\./;
// Factorio's autosaves are literally named '_autosave1'..'_autosaveN'.
const AUTOSAVE_NAME_RE = /^_autosave(\d+)$/;
function parse_save(line: string): {name: string, slot?: number} | null {
function parse_save(line: string): slot?: number | null {
const m = SAVE_LINE_RE.exec(line);
if (!m) return null;
const slot = AUTOSAVE_NAME_RE.exec(m[1]);
return {name: m[1], slot: slot ? Number(slot[1]) : undefined};
return slot ? Number(slot[1]) : undefined;
}
export default async function(context: InstancePluginContext) {