Skip to content

Commit df3fe8e

Browse files
committed
Have second wave export ban list if it's changed
1 parent f74be89 commit df3fe8e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

objects/SetupChecker/script.lua

+8
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,14 @@ function loadConfig(config)
14061406
end
14071407
Global.setTable("events", events)
14081408
end
1409+
if config.banList then
1410+
for _,tab in pairs(Notes.getNotebookTabs()) do
1411+
if tab.title == "Card Ban List" then
1412+
Notes.editNotebookTab({index = tab.index, body = config.banList})
1413+
break
1414+
end
1415+
end
1416+
end
14091417
if config.broadcast then
14101418
printToAll(config.broadcast, Color.SoftYellow)
14111419
end

objects/e924fe/script.lua

+9
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,15 @@ function ExportConfig()
513513
piecesDataFiltered[boardName] = boardTable
514514
end
515515
data.secondWave.pieces = piecesDataFiltered
516+
for _,tab in pairs(Notes.getNotebookTabs()) do
517+
if tab.title == "Card Ban List" then
518+
local defaultBanList = "[Major Powers]\n\n[Minor Powers]\n\n[Event Cards]\n\n[Blight Cards]\n\n[Fear Cards]"
519+
if tab.body ~= "" and tab.body ~= defaultBanList then
520+
data.banList = tab.body
521+
end
522+
break
523+
end
524+
end
516525
updateNotebook(JSON.encode_pretty(data))
517526
end
518527
function updateNotebook(json)

0 commit comments

Comments
 (0)