1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2024-11-16 07:10:38 +01:00

forgot to include benchmark for external function call

also default debug to false again
This commit is contained in:
Vanessa Ezekowitz 2013-03-31 01:07:45 -04:00
parent 3b3425c1e6
commit 13114913f5

View File

@ -11,7 +11,7 @@
plantslib = {} plantslib = {}
local DEBUG = true --... except if you want to spam the console with debugging info :-) local DEBUG = false --... except if you want to spam the console with debugging info :-)
plantslib.plantlife_seed_diff = 329 -- needs to be global so other mods can see it plantslib.plantlife_seed_diff = 329 -- needs to be global so other mods can see it
@ -170,7 +170,9 @@ function plantslib:search_for_surfaces(minp, maxp, biomedef, node_or_function_or
elseif type(node_or_function_or_model) == "string" then elseif type(node_or_function_or_model) == "string" then
if not minetest.registered_nodes[node_or_function_or_model] then if not minetest.registered_nodes[node_or_function_or_model] then
plantslib:dbg("Call function: "..node_or_function_or_model.."("..dump(pos)..")") plantslib:dbg("Call function: "..node_or_function_or_model.."("..dump(pos)..")")
local t2=os.clock()
assert(loadstring(node_or_function_or_model.."("..dump(pos)..")"))() assert(loadstring(node_or_function_or_model.."("..dump(pos)..")"))()
plantslib:dbg("Executed that function in ".. (os.clock()-t2)*1000 .."ms")
else else
plantslib:dbg("Add node: "..node_or_function_or_model.." at ("..dump(p_top)..")") plantslib:dbg("Add node: "..node_or_function_or_model.." at ("..dump(p_top)..")")
minetest.env:add_node(p_top, { name = node_or_function_or_model }) minetest.env:add_node(p_top, { name = node_or_function_or_model })