15 lines
484 B
Lua
15 lines
484 B
Lua
-- @return [Category:double]
|
|
function compute_max_mining_drill_radius()
|
|
local max_radius = {}
|
|
|
|
local prototypes = game.get_filtered_entity_prototypes({{filter = "type", type = "mining-drill"}})
|
|
for _, prototype in pairs(prototypes) do
|
|
local categories = prototype.resource_categories or {}
|
|
for category, _ in pairs(categories) do
|
|
max_radius[category] = math.max(max_radius[category] or 0, prototype.mining_drill_radius or 0)
|
|
end
|
|
end
|
|
|
|
return max_radius
|
|
end
|