I moved it to a separate topic, because I'm afraid that in a large number of comments it will disappear.
I tried to return to the reanimation of this mod but reached the point where the brain is completely dislocated:
Here is the first error:
Code: Select all
The mod The Ruins Mod (1.1.6) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event AbandonedRuins::on_tick (ID 0)
Unknown collision-layer name: item-layer
stack traceback:
[C]: in function 'count_tiles_filtered'
__AbandonedRuins__/spawning.lua:152: in function 'clear_area'
__AbandonedRuins__/spawning.lua:175: in function 'spawn_ruin'
__AbandonedRuins__/spawning.lua:189: in function 'spawn_random_ruin'
__AbandonedRuins__/control.lua:58: in function <__AbandonedRuins__/control.lua:53>
Code: Select all
local function clear_area(half_size, center, surface)
local area = util.area_from_center_and_half_size(half_size, center)
-- exclude tiles that we shouldn't spawn on
if surface.count_tiles_filtered{ area = area, limit = 1, collision_mask = {"item-layer", "object-layer"} } == 1 then
return false
end
for _, entity in pairs(surface.find_entities_filtered({area = area, type = {"resource"}, invert = true})) do
if (entity.valid and entity.type ~= "tree") or math.random() < (half_size / 14) then
entity.destroy({do_cliff_correction = true, raise_destroy = true})
end
end
return true
end
Code: Select all
local function clear_area(half_size, center, surface)
local area = util.area_from_center_and_half_size(half_size, center)
-- exclude tiles that we shouldn't spawn on
if surface.count_tiles_filtered{ area = area, limit = 1, collision_mask = {layers = {item = true, object = true}} } == 1 then
return false
end
for _, entity in pairs(surface.find_entities_filtered({area = area, type = {"resource"}, invert = true})) do
if (entity.valid and entity.type ~= "tree") or math.random() < (half_size / 14) then
entity.destroy({do_cliff_correction = true, raise_destroy = true})
end
end
return true
end
Code: Select all
The mod The Ruins Mod (1.1.6) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event AbandonedRuins::on_tick (ID 0)
Invalid CollisionLayerIdentification: expected LuaCollisionLayerPrototype or string.
stack traceback:
[C]: in function 'count_tiles_filtered'
__AbandonedRuins__/spawning.lua:152: in function 'clear_area'
__AbandonedRuins__/spawning.lua:170: in function 'spawn_ruin'
__AbandonedRuins__/spawning.lua:184: in function 'spawn_random_ruin'
__AbandonedRuins__/control.lua:58: in function <__AbandonedRuins__/control.lua:53>