1
0
Fork 0

Fix crashes

This commit is contained in:
teknomunk 2024-04-28 15:36:53 +00:00
parent e645dfd0cc
commit 31f3a5558c
1 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ local function get_node_multipower_data(pos, no_create)
if not node_multipower then if not node_multipower then
local meta = minetest_get_meta(pos) local meta = minetest_get_meta(pos)
node_multipower = minetest_deserialize(meta:get_string("vl_redstone.multipower")) node_multipower = minetest_deserialize(meta:get_string("vl_redstone.multipower"))
if not no_create and not node_multipower or node_multipower.version ~= 1 then if not no_create and ( not node_multipower or node_multipower.version ~= 1 ) then
node_multipower = { node_multipower = {
version = 1, version = 1,
sources={} sources={}
@ -369,7 +369,7 @@ function vl_redstone.set_power(pos, strength, delay, node)
if strength == 0 then no_create = true end if strength == 0 then no_create = true end
local node_multipower = get_node_multipower_data(pos, no_create) local node_multipower = get_node_multipower_data(pos, no_create)
if not node_multipower then if not node_multipower then
print("No node multipower, no_create="..no_create) print("No node multipower, no_create="..tostring(no_create))
return return
end end