Skip to content

Commit

Permalink
Rename reset events to leave events
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodewarrior committed Jun 13, 2021
1 parent 5241b06 commit 1557bfb
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 25 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,24 @@ SwiftSplit has an "Event Stream" panel that displays events as they are triggere
route files. (You can copy the text out of the panel to paste directly into the route file too).

### Chapter start/end events
- `reset chapter` - Triggered when any chapter is reset (either by restarting the chapter or exiting to the map)
- `leave chapter` - Triggered when leaving any chapter (either by restarting the chapter, returning to the map, or
using "Save and Quit")
- `leave chapter <n>` - Triggered when leaving chapter `<n>`
- `start chapter` - Triggered when any chapter is started
- `start chapter <n>` - Triggered when chapter `<n>` is started
- `reset chapter <n>` - Triggered when chapter `<n>` is reset
- `complete chapter` - Triggered when any chapter is completed
- `complete chapter <n>` - Triggered when chapter `<n>` is completed
- **A-side specific:**
- `start a-side <n>` - Triggered when chapter `<n>`'s A-side is started
- `reset a-side <n>` - Triggered when chapter `<n>`'s A-side is reset
- `leave a-side <n>` - Triggered when leaving chapter `<n>`'s A-side
- `complete a-side <n>` - Triggered when chapter `<n>`'s A-side is completed
- **B-side specific:**
- `start b-side <n>` - Triggered when chapter `<n>`'s B-side is started
- `reset b-side <n>` - Triggered when chapter `<n>`'s B-side is reset
- `leave b-side <n>` - Triggered when leaving chapter `<n>`'s B-side
- `complete b-side <n>` - Triggered when chapter `<n>`'s B-side is completed
- **C-side specific:**
- `start c-side <n>` - Triggered when chapter `<n>`'s C-side is started
- `reset c-side <n>` - Triggered when chapter `<n>`'s C-side is reset
- `leave c-side <n>` - Triggered when leaving chapter `<n>`'s C-side
- `complete c-side <n>` - Triggered when chapter `<n>`'s C-side is completed

### Screen transition event
Expand Down
8 changes: 4 additions & 4 deletions SwiftSplit/CelesteSplitter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ class CelesteSplitter {
events.append(event)
}
if !new.chapterStarted && old.chapterStarted && !old.chapterComplete {
var event: Event = ["return to map", "reset chapter", "reset chapter \(old.chapter)"]
var event: Event = ["leave chapter", "leave 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)")
case .Normal: event.add(variant: "leave a-side \(old.chapter)")
case .BSide: event.add(variant: "leave b-side \(old.chapter)")
case .CSide: event.add(variant: "leave c-side \(old.chapter)")
default: break
}
events.append(event)
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - Any%.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": true,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 0 ## Start Prologue",
"complete chapter 0",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - Celestial Resort Any%.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 3 ## Start",
"08-a > 09-b ## Huge Mess",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - Forsaken City Any%.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 1 ## Start",
"5 > 6 ## Crossing",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - Golden Ridge Any%.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 4 ## Start",
"a-09 > b-00 ## Shrine",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - Mirror Temple Any%.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 5 ## Start",
"a-13 > b-00 ## Depths",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - Old Site Any%.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 2 ## Start",
"d8 > d3 ## - Mirror",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - Prologue.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 0",
"complete chapter 0"
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - Reflection Any%.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 6 ## Start",
"start > 00 ## Lake",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/Any%/Celeste - The Summit Any%.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start chapter 7 ## Start",
"a-06 > b-00 ## 500 M",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start b-side 3 ## Start",
"05 > 06 ## Staff Quarters",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start b-side 1 ## Start",
"03 > 04 ## Contraption",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/B-Sides/Celeste - Golden Ridge B-Side.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start b-side 4 ## Start",
"a-04 > b-00 ## Stepping Stones",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start b-side 5 ## Start",
"a-02 > b-00 ## Central Chamber",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/B-Sides/Celeste - Old Site B-Side.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start b-side 2 ## Start",
"02 > 03 ## Combination Lock",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/B-Sides/Celeste - Reflection B-Side.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start b-side 6 ## Start",
"a-06 > b-00 ## Reflection",
Expand Down
2 changes: 1 addition & 1 deletion example/Celeste/B-Sides/Celeste - The Summit B-Side.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useFileTime": false,
"reset": "reset chapter",
"reset": "leave chapter",
"route": [
"start b-side 7 ## Start",
"a-03 > b-00 ## 500 M",
Expand Down

0 comments on commit 1557bfb

Please sign in to comment.