fmsl = require("__fmsl__.fmsl") local next = next active_tick = 1 passive_tick = 31 require("teardown.mining_drill") require("teardown.on_resource_depleted") require("teardown.on_tick") script.on_init(function() global.active = {} global.active.mining_drills = {} -- [Tick:Entity] global.passive = {} global.passive.mining_drills = {} -- [Entity:true] recompute_max_mining_drill_radius() end) script.on_load(function() if next(global.active.mining_drills) ~= nil then script.on_nth_tick(active_tick, on_active_tick) end if next(global.passive.mining_drills) ~= nil then script.on_nth_tick(passive_tick, on_passive_tick) end end) script.on_event(defines.events.on_resource_depleted, on_resource_depleted)