forked from mtcontrib/plantlife_modpack
route most of the various recent print statements through plantslib:dbg()
(still defaults to false)
This commit is contained in:
parent
f1356dfd65
commit
1e4ad757a5
@ -119,17 +119,17 @@ function plantslib:register_generate_plant(biomedef, node_or_function_or_model)
|
|||||||
if type(node_or_function_or_model) == "string"
|
if type(node_or_function_or_model) == "string"
|
||||||
and string.find(node_or_function_or_model, ":")
|
and string.find(node_or_function_or_model, ":")
|
||||||
and not minetest.registered_nodes[node_or_function_or_model] then
|
and not minetest.registered_nodes[node_or_function_or_model] then
|
||||||
print("[Plants Lib] Warning: Ignored registration for undefined spawn node: "..dump(node_or_function_or_model))
|
plantslib:dbg("Warning: Ignored registration for undefined spawn node: "..dump(node_or_function_or_model))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(node_or_function_or_model) == "string"
|
if type(node_or_function_or_model) == "string"
|
||||||
and not string.find(node_or_function_or_model, ":") then
|
and not string.find(node_or_function_or_model, ":") then
|
||||||
print("[Plants Lib] Warning: Registered function call using deprecated string method: "..dump(node_or_function_or_model))
|
plantslib:dbg("Warning: Registered function call using deprecated string method: "..dump(node_or_function_or_model))
|
||||||
end
|
end
|
||||||
|
|
||||||
if biomedef.check_air == false then
|
if biomedef.check_air == false then
|
||||||
print("[Plants Lib] Warning: Registered legacy mapgen hook: "..dump(node_or_function_or_model))
|
plantslib:dbg("Warning: Registered legacy mapgen hook: "..dump(node_or_function_or_model))
|
||||||
minetest.register_on_generated(plantslib:generate_block_legacy(minp, maxp, biomedef, node_or_function_or_model))
|
minetest.register_on_generated(plantslib:generate_block_legacy(minp, maxp, biomedef, node_or_function_or_model))
|
||||||
plantslib.total_legacy_calls = plantslib.total_legacy_calls + 1
|
plantslib.total_legacy_calls = plantslib.total_legacy_calls + 1
|
||||||
else
|
else
|
||||||
@ -141,7 +141,7 @@ function plantslib:register_generate_plant(biomedef, node_or_function_or_model)
|
|||||||
plantslib.surfaces_list[#plantslib.surfaces_list + 1] = s
|
plantslib.surfaces_list[#plantslib.surfaces_list + 1] = s
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
print("[Plants Lib] Warning: Ignored registration for undefined surface node: "..dump(s))
|
plantslib:dbg("Warning: Ignored registration for undefined surface node: "..dump(s))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
for i = 1, #biomedef.surface do
|
for i = 1, #biomedef.surface do
|
||||||
@ -151,7 +151,7 @@ function plantslib:register_generate_plant(biomedef, node_or_function_or_model)
|
|||||||
plantslib.surfaces_list[#plantslib.surfaces_list + 1] = s
|
plantslib.surfaces_list[#plantslib.surfaces_list + 1] = s
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
print("[Plants Lib] Warning: Ignored registration for undefined surface node: "..dump(s))
|
plantslib:dbg("Warning: Ignored registration for undefined surface node: "..dump(s))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -269,7 +269,7 @@ function plantslib:generate_block(minp, maxp, blockseed)
|
|||||||
format(node_or_function_or_model)),pos) then
|
format(node_or_function_or_model)),pos) then
|
||||||
spawned = true
|
spawned = true
|
||||||
else
|
else
|
||||||
print("Ignored invalid definition for object "..dump(node_or_function_or_model).." that was pointed at {"..dump(pos).."}")
|
plantslib:dbg("Warning: Ignored invalid definition for object "..dump(node_or_function_or_model).." that was pointed at {"..dump(pos).."}")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
tries = tries + 1
|
tries = tries + 1
|
||||||
@ -621,7 +621,7 @@ function plantslib:generate_block_legacy(minp, maxp, biomedef, node_or_function_
|
|||||||
format(node_or_function_or_model)),pos) then
|
format(node_or_function_or_model)),pos) then
|
||||||
spawned = true
|
spawned = true
|
||||||
else
|
else
|
||||||
print("Ignored invalid definition for object "..dump(node_or_function_or_model).." that was pointed at {"..dump(pos).."}")
|
plantslib:dbg("Warning: Ignored invalid definition for object "..dump(node_or_function_or_model).." that was pointed at {"..dump(pos).."}")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
tries = tries + 1
|
tries = tries + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user