Return from translocator pair errors.
This commit is contained in:
parent
4704b4cf2b
commit
3938e81fe5
1 changed files with 3 additions and 1 deletions
|
@ -367,6 +367,7 @@ local function trans_place(itemstack, placer, pointed_thing)
|
|||
local pair = fun_caves.db.translocators[tonumber(data.id)]
|
||||
if #pair > 1 then
|
||||
print('* Fun Caves: high error in translocator storage')
|
||||
return
|
||||
end
|
||||
pair[#pair+1] = pos
|
||||
local ret = minetest.item_place_node(itemstack, placer, pointed_thing)
|
||||
|
@ -391,6 +392,7 @@ local function trans_dig(pos, node, digger)
|
|||
local pair = fun_caves.db.translocators[tonumber(data.id)]
|
||||
if #pair < 1 then
|
||||
print('* Fun Caves: low error in translocator storage')
|
||||
return
|
||||
end
|
||||
local inv = digger:get_inventory()
|
||||
local item = ItemStack(node.name)
|
||||
|
@ -406,7 +408,7 @@ local function trans_dig(pos, node, digger)
|
|||
end
|
||||
|
||||
newnode = fun_caves.clone_node("default:steelblock")
|
||||
newnode.description = "Translocator Pair"
|
||||
newnode.description = "Translocator"
|
||||
newnode.on_rightclick = translocate
|
||||
newnode.on_use = trans_use
|
||||
newnode.on_place = trans_place
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue