diff --git a/instance.ts b/instance.ts index 0645ab1..6d5a1e1 100644 --- a/instance.ts +++ b/instance.ts @@ -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) {