redraw the slot XML when a player joins
This commit is contained in:
parent
831a4fd4c9
commit
326b021b4a
@ -222,6 +222,11 @@ function onObjectNumberTyped(hoveredObject, playerColor, number)
|
||||
end
|
||||
end
|
||||
|
||||
-- TTS event, used to redraw the playmat slot symbols after a small delay to account for the custom font loading
|
||||
function onPlayerConnect()
|
||||
Wait.time(function() playmatApi.redrawSlotSymbols("All") end, 0.2)
|
||||
end
|
||||
|
||||
---------------------------------------------------------
|
||||
-- chaos token drawing
|
||||
---------------------------------------------------------
|
||||
|
@ -258,6 +258,14 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
-- Redraws the XML for the slot symbols based on the slotData table
|
||||
---@param matColor string Color of the playmat - White, Orange, Green, Red or All
|
||||
PlaymatApi.redrawSlotSymbols = function(matColor)
|
||||
for _, mat in pairs(getMatForColor(matColor)) do
|
||||
mat.call("redrawSlotSymbols")
|
||||
end
|
||||
end
|
||||
|
||||
-- Finds all objects on the playmat and associated set aside zone and returns a table
|
||||
---@param matColor string Color of the playmat - White, Orange, Green, Red or All
|
||||
---@param filter string Name of the filte function (see util/SearchLib)
|
||||
|
Loading…
Reference in New Issue
Block a user