Skip to content

Commit

Permalink
triggers build: raidboss: Add support for netregexes in timelines (#5939
Browse files Browse the repository at this point in the history
)

Closes #5145

Obviously needs plenty of testing etc.

Example added to `test.txt` timeline, can be triggered with `/e
testNetRegexTimeline`.

Took the opportunity to refactor the `TimelineParser.parse` function to
extract out some of the line matching, so there wasn't a need for a
30+-space-indented set of lines, and to allow reusing some of the logic
for the rest of the line matching after the regex. 7b2adb3
  • Loading branch information
github-actions committed Nov 29, 2023
1 parent e530fe8 commit 895761f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 00-misc/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ Options.Triggers.push({
timelineReplace: [
{
locale: 'de',
missingTranslations: true,
replaceSync: {
'You bid farewell to the striking dummy': 'Du winkst der Trainingspuppe zum Abschied zu',
'You bow courteously to the striking dummy':
Expand Down Expand Up @@ -496,6 +497,7 @@ Options.Triggers.push({
},
{
locale: 'cn',
missingTranslations: true,
replaceSync: {
'You bid farewell to the striking dummy': '.*向木人告别',
'You bow courteously to the striking dummy': '.*恭敬地对木人行礼',
Expand Down Expand Up @@ -534,6 +536,7 @@ Options.Triggers.push({
},
{
locale: 'ko',
missingTranslations: true,
replaceSync: {
'You bid farewell to the striking dummy': '.*나무인형에게 작별 인사를 합니다',
'You bow courteously to the striking dummy': '.*나무인형에게 공손하게 인사합니다',
Expand Down
1 change: 1 addition & 0 deletions 00-misc/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ hideall "--sync--"

0 "--Reset--" sync /You bid farewell to the striking dummy/ window 10000 jump 0

0 "--sync--" GameLog { "line": "testNetRegexTimeline" } window 100000,100000
0 "--sync--" sync /:Engage!/ window 100000,100000
0 "--sync--" sync /:You bow courteously to the striking dummy/ window 0,1
3 "Almagest"
Expand Down

0 comments on commit 895761f

Please sign in to comment.