less spammy feedback message
This commit is contained in:
parent
c9dfdc9171
commit
488d465679
@ -172,7 +172,7 @@ function resetDoomCounter()
|
||||
-- reset subtractDoom setting
|
||||
local doomInPlayCounter = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DoomInPlayCounter")
|
||||
if doomInPlayCounter ~= nil then
|
||||
toggleSubtractDoom(false)
|
||||
doomInPlayCounter.call("toggleSubtractDoom", true)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -89,7 +89,7 @@ function broadcastDoom(val)
|
||||
|
||||
local doomInPlayCounter = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DoomInPlayCounter")
|
||||
if doomInPlayCounter and md.subtractDoomInPlay then
|
||||
toggleSubtractDoom(true)
|
||||
doomInPlayCounter.call("toggleSubtractDoom", true)
|
||||
end
|
||||
local doomInPlay = doomInPlayCounter and doomInPlayCounter.call("getDoomCount") or 0
|
||||
local totalDoom = val + doomInPlay
|
||||
|
@ -46,17 +46,22 @@ function onLoad(savedData)
|
||||
end
|
||||
|
||||
function toggleSubtractDoom(override)
|
||||
local previousState = subtractDoom
|
||||
if override then
|
||||
subtractDoom = override
|
||||
else
|
||||
subtractDoom = not subtractDoom
|
||||
end
|
||||
|
||||
-- early exit if nothing was changed
|
||||
if previousState == subtractDoom then return end
|
||||
|
||||
updateSave()
|
||||
|
||||
if subtractDoom then
|
||||
broadcastToAll("Doom in play: Subtract from the total doom count.")
|
||||
printToAll("Doom in play: Subtract from the total doom count.", "Orange")
|
||||
else
|
||||
broadcastToAll("Doom in play: Add to the total doom count.")
|
||||
printToAll("Doom in play: Add to the total doom count.", "Orange")
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user