Merge pull request #308 from argonui/token-sealing

keep context menu open for specific cards with "sealing"
This commit is contained in:
Chr1Z 2023-06-15 22:36:22 +02:00 committed by GitHub
commit 63b66aee6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 1 deletions

View File

@ -7,6 +7,11 @@ UPDATE_ON_HOVER --@type: boolean
- the "Read Bag" function reads the content of the chaos bag to update the context menu - the "Read Bag" function reads the content of the chaos bag to update the context menu
- example usage: "Unrelenting" (to only display valid tokens) - example usage: "Unrelenting" (to only display valid tokens)
KEEP_OPEN --@type: boolean
- meant for cards that seal single tokens multiple times (one by one)
- makes the context menu stay open after selecting an option
- example usage: "Unrelenting"
SHOW_SINGLE_RELEASE --@type: boolean SHOW_SINGLE_RELEASE --@type: boolean
- enables an entry in the context menu - enables an entry in the context menu
- this entry allows releasing a single token - this entry allows releasing a single token
@ -94,7 +99,7 @@ function generateContextMenu()
if not SHOW_MULTI_SEAL then if not SHOW_MULTI_SEAL then
self.addContextMenuItem("Seal " .. map.name, function(playerColor) self.addContextMenuItem("Seal " .. map.name, function(playerColor)
sealToken(map.name, playerColor) sealToken(map.name, playerColor)
end) end, KEEP_OPEN)
else else
self.addContextMenuItem("Seal " .. SHOW_MULTI_SEAL .. " " .. map.name, function(playerColor) self.addContextMenuItem("Seal " .. SHOW_MULTI_SEAL .. " " .. map.name, function(playerColor)
readBag() readBag()

View File

@ -2,4 +2,6 @@ VALID_TOKENS = {
["Curse"] = true ["Curse"] = true
} }
KEEP_OPEN = true
require("playercards/CardsThatSealTokens") require("playercards/CardsThatSealTokens")

View File

@ -3,5 +3,6 @@ VALID_TOKENS = {
} }
SHOW_SINGLE_RELEASE = true SHOW_SINGLE_RELEASE = true
KEEP_OPEN = true
require("playercards/CardsThatSealTokens") require("playercards/CardsThatSealTokens")

View File

@ -3,5 +3,6 @@ VALID_TOKENS = {
} }
SHOW_SINGLE_RELEASE = true SHOW_SINGLE_RELEASE = true
KEEP_OPEN = true
require("playercards/CardsThatSealTokens") require("playercards/CardsThatSealTokens")

View File

@ -3,5 +3,6 @@ VALID_TOKENS = {
} }
SHOW_SINGLE_RELEASE = true SHOW_SINGLE_RELEASE = true
KEEP_OPEN = true
require("playercards/CardsThatSealTokens") require("playercards/CardsThatSealTokens")

View File

@ -2,4 +2,6 @@ VALID_TOKENS = {
["Bless"] = true ["Bless"] = true
} }
KEEP_OPEN = true
require("playercards/CardsThatSealTokens") require("playercards/CardsThatSealTokens")

View File

@ -3,5 +3,6 @@ VALID_TOKENS = {
} }
SHOW_SINGLE_RELEASE = true SHOW_SINGLE_RELEASE = true
KEEP_OPEN = true
require("playercards/CardsThatSealTokens") require("playercards/CardsThatSealTokens")

View File

@ -4,5 +4,6 @@ INVALID_TOKENS = {
} }
UPDATE_ON_HOVER = true UPDATE_ON_HOVER = true
KEEP_OPEN = true
require("playercards/CardsThatSealTokens") require("playercards/CardsThatSealTokens")