This commit is contained in:
Brevven 2025-01-16 14:50:14 -08:00
parent 26e29a6c21
commit 9be9a1e545
2 changed files with 63 additions and 10 deletions

View file

@ -147,8 +147,10 @@ function regenerate_ore(event)
for w in event.parameters:gmatch("%S+") do table.insert(params, w) end
if #params == 1 and params[1] == "all" then
for _, resource in pairs(me.resources) do
game.print("Regenerating "..resource)
game.regenerate_entity(resource)
if prototypes.entity[resource] then
game.print("Regenerating "..resource)
game.regenerate_entity(resource)
end
end
return
end