diff --git a/objects/LuaScriptState.luascriptstate b/objects/LuaScriptState.luascriptstate
index ad0f2467..38e5e7f2 100644
--- a/objects/LuaScriptState.luascriptstate
+++ b/objects/LuaScriptState.luascriptstate
@@ -1,5 +1,6 @@
{
"acknowledgedUpgradeVersions": [],
+ "blurseVisibility": [],
"chaosTokensGUID": [],
"handVisibility": [],
"optionPanel": {
diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua
index 10979138..c0e778b9 100644
--- a/src/core/Global.ttslua
+++ b/src/core/Global.ttslua
@@ -71,8 +71,9 @@ local RESOURCE_OPTIONS = {
"disabled"
}
--- tracks the visibility of each hand
+-- track player-specific visibilities
local handVisibility = {}
+local blurseVisibility = {}
---------------------------------------------------------
-- data for tokens
@@ -137,6 +138,7 @@ function onSave()
acknowledgedUpgradeVersions = acknowledgedUpgradeVersions,
chaosTokensLastMatGUID = chaosTokensLastMatGUID,
chaosTokensGUID = chaosTokensGUID,
+ blurseVisibility = blurseVisibility,
handVisibility = handVisibility,
optionPanel = optionPanel
})
@@ -147,6 +149,7 @@ function onLoad(savedData)
local loadedData = JSON.decode(savedData)
acknowledgedUpgradeVersions = loadedData.acknowledgedUpgradeVersions
chaosTokensLastMatGUID = loadedData.chaosTokensLastMatGUID
+ blurseVisibility = loadedData.blurseVisibility
handVisibility = loadedData.handVisibility
optionPanel = loadedData.optionPanel
@@ -165,6 +168,7 @@ function onLoad(savedData)
getModVersion()
updateHandVisibility()
+ updateBlurseVisibility()
math.randomseed(os.time())
TokenManager.initialiize()
@@ -1172,11 +1176,11 @@ function onClick_spawnPlaceholder(player)
changeWindowVisibilityForColor(player.color, "downloadWindow", false)
end
--- toggles the visbility of the bless / curse manager UI
+-- toggles the visibility of the bless / curse manager UI
function showHideBlurse(player)
local visibility = changeWindowVisibilityForColor(player.color, "blessCurseManager")
changeWindowVisibilityForColor(player.color, "hideBlurse", visibility)
- changeWindowVisibilityForColor(player.color, "showBlurse", not visibility)
+ blurseVisibility[player.color] = visibility
end
-- toggles the visibility of the respective UI
@@ -1896,6 +1900,18 @@ function applyHidingToCard(card, handColor)
end
end
+function updateBlurseVisibility()
+ function coroBlurse()
+ for playerColor, state in pairs(blurseVisibility) do
+ changeWindowVisibilityForColor(playerColor, "blessCurseManager", state)
+ changeWindowVisibilityForColor(playerColor, "hideBlurse", state)
+ coroutine.yield()
+ end
+ return 1
+ end
+ startLuaCoroutine(Global, "coroBlurse")
+end
+
---------------------------------------------------------
-- Update notification related functionality
---------------------------------------------------------
diff --git a/xml/Global/BlessCurseManager.xml b/xml/Global/BlessCurseManager.xml
index da22646b..947e8f02 100644
--- a/xml/Global/BlessCurseManager.xml
+++ b/xml/Global/BlessCurseManager.xml
@@ -7,42 +7,46 @@
height="30"
width="30"
rectAlignment="MiddleRight"
- offsetXY="0 67"
+ offsetXY="0 69"
outlineSize="2 2"
outline="#303030"/>
+
+
+
+
+
+
-
-
-
-
-
-
-
+
|