diff --git a/SwiftSplit/CelesteSplitter.swift b/SwiftSplit/CelesteSplitter.swift index 7174a80..0ec55b5 100644 --- a/SwiftSplit/CelesteSplitter.swift +++ b/SwiftSplit/CelesteSplitter.swift @@ -22,6 +22,11 @@ struct Event { mutating func add(variant: String) { self.variants.insert(variant) } + mutating func add(variants: String...) { + for variant in variants { + self.variants.insert(variant) + } + } } extension Event : ExpressibleByArrayLiteral { @@ -125,6 +130,13 @@ class CelesteSplitter { case .CSide: event.add(variant: "leave c-side \(old.chapter)") default: break } + event.add(variants: "reset chapter", "reset chapter \(old.chapter)") + switch new.mode { + case .Normal: event.add(variant: "reset a-side \(old.chapter)") + case .BSide: event.add(variant: "reset b-side \(old.chapter)") + case .CSide: event.add(variant: "reset c-side \(old.chapter)") + default: break + } events.append(event) } if new.chapterComplete && !old.chapterComplete {