Code: Select all
if global.labAnimations == nil then
global.labAnimations = {}
end
local labAnimations = global.labAnimations
-- table is filled out like this when iterating through all labs:
if labAnimations[lab.unit_number] == nil then
labAnimations[lab.unit_number] = rendering.draw_animation({
...