mirror of
https://github.com/PHIDIAS0303/ClusterChatSync.git
synced 2026-11-24 16:13:12 +09:00
1.0.5 RC9
This commit is contained in:
1 parent
b5090e1acf
commit
628b1aafe2
1 file changed
+2
-3
+2
-3
@@ -18,12 +18,11 @@ const SAVE_LINE_RE = /Saving to (.+?) \((?:non-)?blocking\)\./;
|
|||||||
// Factorio's autosaves are literally named '_autosave1'..'_autosaveN'.
|
// Factorio's autosaves are literally named '_autosave1'..'_autosaveN'.
|
||||||
const AUTOSAVE_NAME_RE = /^_autosave(\d+)$/;
|
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);
|
const m = SAVE_LINE_RE.exec(line);
|
||||||
if (!m) return null;
|
if (!m) return null;
|
||||||
|
|
||||||
const slot = AUTOSAVE_NAME_RE.exec(m[1]);
|
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) {
|
export default async function(context: InstancePluginContext) {
|
||||||
|
|||||||
Reference in new issue
Block a user