the variable 'subsurface_level' cannot actualy be used, unless i set it myself. i also have no idea what to do with function(surface, depth, position). also the example value of 2k is likely way to high as it puts out 55K resources with mining prod of 40%, copying the defult output of stone from the default recipy on the surface, which normaly would give 1.3k. the matching value is ~50
i also cannot get my walls to spawn.
The mod Subsurface - build beneath your base! (1.1.5) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event Subsurface::on_init()
Error when running interface function Midori_Stoneblock.subsurface_register_walls: Midori_Stoneblock/control.lua:21: attempt to perform arithmetic on global 'subsurface_level' (a nil value)
stack traceback:
Midori_Stoneblock/control.lua:21: in function <Midori_Stoneblock/control.lua:19>
stack traceback:
[C]: in function 'call'
Subsurface/control.lua:47: in function 'register_subsurface_walls'
Subsurface/control.lua:60: in function <Subsurface/control.lua:56>
my last code:
-- Remote interface. replace "mymod" with your mod name
remote.add_interface("Midori_Stoneblock", {
-- This function defines which resource should be used when drilling to subsurfaces. It can be used for different mining results.
-- The resource must be of category "subsurface-hole".
-- Since multiple mods can have this function, the resource with the highest priority will be used. Default priority is 0.
-- surface and depth parameters refer to the surface where the drill is placed.
subsurface_hole_resource = function(surface, depth, position)
local priority = 1
local resource = "deep-drill"
local amount = 100
return priority, resource, amount
end,
-- This function defines custom subsurface walls with custom mining results.
-- The walls must be of type "cliff" - best practice is to copy from Subsurface and change what needed (pictures, drops)
-- The noise expression returns a priority value (default is 0), the wall with the highest priority will be used.
-- The expression can make use of the variable "subsurface_level".
subsurface_register_walls = function()
return {
["deep-wall"] = 100
}
end
})