1
0
mirror of https://github.com/mt-mods/biome_lib.git synced 2024-09-27 23:30:17 +02:00

biome_lib.register_on_generate now passes node position and face direction to node placement function

This commit is contained in:
Jordan Leppert 2021-12-04 13:24:47 +00:00
parent 0178532583
commit 24b56c8763

View File

@ -378,7 +378,7 @@ function biome_lib.populate_surfaces(b, nodes_or_function_or_model, snodes, chec
biome_lib.dbg("Node \""..nodes_or_function_or_model.."\" was placed at "..minetest.pos_to_string(p_top), 4) biome_lib.dbg("Node \""..nodes_or_function_or_model.."\" was placed at "..minetest.pos_to_string(p_top), 4)
spawned = true spawned = true
elseif objtype == "function" then elseif objtype == "function" then
nodes_or_function_or_model(pos) nodes_or_function_or_model(p_top, fdir)
biome_lib.dbg("A function was run on surface node at "..minetest.pos_to_string(pos), 4) biome_lib.dbg("A function was run on surface node at "..minetest.pos_to_string(pos), 4)
spawned = true spawned = true
elseif objtype == "string" and pcall(loadstring(("return %s(...)"): elseif objtype == "string" and pcall(loadstring(("return %s(...)"):