diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua
index e27ea4db..71cf63bf 100644
--- a/src/core/Global.ttslua
+++ b/src/core/Global.ttslua
@@ -843,6 +843,10 @@ function applyOptionPanelChange(id, state)
elseif id == "showTitleSplash" then
optionPanel[id] = state
+ -- option: Disable sound effects
+ elseif id == "disableSoundEffects" then
+ optionPanel[id] = state
+
-- option: Show token arranger
elseif id == "showTokenArranger" then
optionPanel[id] = spawnOrRemoveHelper(state, "Token Arranger", {-42.3, 1.6, -46.5})
@@ -981,6 +985,7 @@ function onClick_defaultSettings()
-- clean reset of variable
optionPanel = {
+ disableSoundEffects = false,
playAreaSnapTags = true,
showAttachmentHelper = false,
showCleanUpHelper = false,
diff --git a/src/core/SoundCubeApi.ttslua b/src/core/SoundCubeApi.ttslua
index 06273524..4133b190 100644
--- a/src/core/SoundCubeApi.ttslua
+++ b/src/core/SoundCubeApi.ttslua
@@ -7,10 +7,16 @@ do
["Deep Bell"] = 1
}
+ function playTriggerEffect(index)
+ if Global.getTable("optionPanel").disableSoundEffects ~= true then
+ getObjectsWithTag("SoundCube")[1].AssetBundle.playTriggerEffect(index)
+ end
+ end
+
-- plays the by name requested sound
---@param soundName String Name of the sound to play
SoundCubeApi.playSoundByName = function(soundName)
- getObjectsWithTag("SoundCube")[1].AssetBundle.playTriggerEffect(soundIndices[soundName])
+ playTriggerEffect(soundIndices[soundName])
end
return SoundCubeApi
diff --git a/xml/OptionPanel.xml b/xml/OptionPanel.xml
index 267fb8b4..2ce05cc1 100644
--- a/xml/OptionPanel.xml
+++ b/xml/OptionPanel.xml
@@ -129,6 +129,20 @@
+
+
+
+
+
+ This disables additional soundeffects, e.g. on scenario placement.
+
+ |
+
+
+ |
+
+