mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-12-22 20:32:22 +01:00
Merge pull request #21 from shivajiva101/shivajiva101-patch-1
fix crash vector
This commit is contained in:
commit
6ef9f95a60
@ -18,7 +18,10 @@ local get_node_image = function(pos, node)
|
|||||||
|
|
||||||
-- Record what kind of thing we've got in a builder node so its facing can be rotated properly
|
-- Record what kind of thing we've got in a builder node so its facing can be rotated properly
|
||||||
if minetest.get_item_group(node.name, "digtron") == 4 then
|
if minetest.get_item_group(node.name, "digtron") == 4 then
|
||||||
local build_item = node_image.meta.inventory.main[1]
|
local build_item = ""
|
||||||
|
if node_image.meta.inventory.main then
|
||||||
|
build_item = node_image.meta.inventory.main[1]
|
||||||
|
end
|
||||||
if build_item ~= "" then
|
if build_item ~= "" then
|
||||||
local build_item_def = minetest.registered_nodes[ItemStack(build_item):get_name()]
|
local build_item_def = minetest.registered_nodes[ItemStack(build_item):get_name()]
|
||||||
if build_item_def ~= nil then
|
if build_item_def ~= nil then
|
||||||
@ -462,4 +465,4 @@ function DigtronLayout.deserialize(layout_string)
|
|||||||
self.old_pos_pointset = Pointset.create() -- needed by the write_layout method, leave empty
|
self.old_pos_pointset = Pointset.create() -- needed by the write_layout method, leave empty
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user