diff options
author | Joachim Stolberg <joe.stolberg@gmx.de> | 2018-07-21 19:30:43 +0200 |
---|---|---|
committer | Joachim Stolberg <joe.stolberg@gmx.de> | 2018-07-21 19:30:43 +0200 |
commit | 5f692ee6c48ca137d24f05fac655efb02244bbee (patch) | |
tree | 6b9be3cdfdad1e3745e29c2dbbd4339b26b96004 /init.lua | |
parent | 7da845d1d71e298141cedd252007a7d9577981b2 (diff) |
v0.4.17 meta:set_int() correctionsorigin/masterorigin/HEAD
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -290,8 +290,8 @@ local function construct_crane(pos, dir, height, width, owner) local meta = minetest.get_meta(pos) meta:set_string("dir", minetest.pos_to_string(dir)) meta:set_string("owner", owner) - meta:set_int("height", height) - meta:set_int("width", width) + meta:set_int("height", height or 0) + meta:set_int("width", width or 0) end ---------------------------------------------------------------------------------------------------- @@ -450,7 +450,7 @@ minetest.register_node("towercrane:base", { if dir ~= nil then if check_space(table.copy(pos), dir, height, width, owner) then -- add protection area - meta:set_int("id", protect_area(table.copy(pos), table.copy(dir), height, width, owner)) + meta:set_int("id", protect_area(table.copy(pos), table.copy(dir), height, width, owner) or 0) construct_crane(table.copy(pos), table.copy(dir), height, width, owner) else chat(owner, "area is protected or too less space to raise up the crane!") |