Skip to content

Commit 176fd6a

Browse files
committed
Fix action goto bug
1 parent caf3d48 commit 176fd6a

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

app/src/Outlander.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@
14311431
CODE_SIGN_IDENTITY = "Apple Development";
14321432
CODE_SIGN_STYLE = Automatic;
14331433
COMBINE_HIDPI_IMAGES = YES;
1434-
CURRENT_PROJECT_VERSION = 47;
1434+
CURRENT_PROJECT_VERSION = 48;
14351435
DEAD_CODE_STRIPPING = YES;
14361436
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
14371437
DEVELOPMENT_TEAM = 9TZ225FMST;
@@ -1467,7 +1467,7 @@
14671467
CODE_SIGN_IDENTITY = "Apple Development";
14681468
CODE_SIGN_STYLE = Automatic;
14691469
COMBINE_HIDPI_IMAGES = YES;
1470-
CURRENT_PROJECT_VERSION = 47;
1470+
CURRENT_PROJECT_VERSION = 48;
14711471
DEAD_CODE_STRIPPING = YES;
14721472
DEVELOPMENT_TEAM = 9TZ225FMST;
14731473
ENABLE_HARDENED_RUNTIME = YES;

app/src/Outlander/Scripting/Script.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ protocol IWantStreamInfo {
8989
func execute(_ script: Script, _ context: ScriptContext)
9090
}
9191

92-
protocol IAction: IWantStreamInfo {
92+
protocol IAction {
93+
var id: String { get }
94+
func stream(_ text: String, _ tokens: [StreamCommand], _ context: ScriptContext) -> CheckStreamResult
95+
func execute(_ script: Script, _ context: ScriptContext)
96+
9397
var className: String { get set }
9498
var enabled: Bool { get set }
9599
var line: ScriptLine { get set }
@@ -306,6 +310,11 @@ class Script {
306310
gosubStack.clear()
307311
}
308312

313+
func matchesClear() {
314+
matchStack.removeAll()
315+
reactToStream.removeAll()
316+
}
317+
309318
func queueNext() {
310319
log.info("script queue next")
311320
scriptQueue.queue(.next)

app/src/Outlander/Scripting/ScriptOperations.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class ActionOp: IAction {
7878
continue
7979
}
8080
script.gosubClear()
81+
script.matchesClear()
8182
script.queueNext()
8283
case .exit: script.cancel()
8384
default: continue
@@ -139,6 +140,7 @@ class ActionEvalOp: IAction {
139140
continue
140141
}
141142
script.gosubClear()
143+
script.matchesClear()
142144
script.queueNext()
143145
case .exit: script.cancel()
144146
default: continue

0 commit comments

Comments
 (0)