omit the threshold if doom is reset
This commit is contained in:
parent
06e81835e9
commit
8115f0cb3c
@ -58,7 +58,11 @@ end
|
|||||||
function updateVal(number)
|
function updateVal(number)
|
||||||
val = number or 0
|
val = number or 0
|
||||||
self.editButton({ index = 0, label = tostring(val) })
|
self.editButton({ index = 0, label = tostring(val) })
|
||||||
broadcastDoom(val)
|
if number then
|
||||||
|
broadcastDoom(val)
|
||||||
|
else
|
||||||
|
broadcastToAll("0 doom on the agenda", "White")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- called by updateVal and addVal to broadcast total doom in play, including doom threshold
|
-- called by updateVal and addVal to broadcast total doom in play, including doom threshold
|
||||||
@ -77,7 +81,8 @@ end
|
|||||||
-- called by "Reset" button to remove doom
|
-- called by "Reset" button to remove doom
|
||||||
function startReset()
|
function startReset()
|
||||||
if options.Agenda then
|
if options.Agenda then
|
||||||
updateVal(0)
|
-- omitting the number will broadcast a special message just for this case
|
||||||
|
updateVal()
|
||||||
end
|
end
|
||||||
local doomInPlayCounter = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DoomInPlayCounter")
|
local doomInPlayCounter = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DoomInPlayCounter")
|
||||||
if doomInPlayCounter then
|
if doomInPlayCounter then
|
||||||
|
Loading…
Reference in New Issue
Block a user