Hi! I've received a bug report that occurs when my mod is trying to create a surface. My function basically does the following:
minime_surfaces.create_surface = function(surface_name, flags)
local surface = game.get_surface(surface_name)
if not (surface and surface.valid) then
local params = {
width = 1,
height = 1,
peaceful_mode = true
}
surface = game.create_surface(surface_name, params) -- Crashing line
…
end
…
end
Apparently, if your mod is active, my mod will crash with this message:
Error while running event minime::on_init()
Unknown variable: control:fulgora_islands:frequency
stack traceback:
[C]: in function 'create_surface'
__minime__/scripts/surfaces.lua:112: in function 'create_surface'
__minime__/control.lua:274: in function 'init'
__minime__/control.lua:382: in function <__minime__/control.lua:378>
Grepping through your mod for fulgora_islands
, I've found the following in line 100 of prototypes/remove-planets.lua:
data.raw["autoplace-control"]["fulgora_islands"] = nil
As I'm not really familiar with autoplace-control stuff and do not have SA, I can't debug this myself. But it seems quite likely that removing data.raw["autoplace-control"]["fulgora_islands"]
would be the core reason for the reported crash. Could you look into the issue, please?