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)]
|
local pair = fun_caves.db.translocators[tonumber(data.id)]
|
||||||
if #pair > 1 then
|
if #pair > 1 then
|
||||||
print('* Fun Caves: high error in translocator storage')
|
print('* Fun Caves: high error in translocator storage')
|
||||||
|
return
|
||||||
end
|
end
|
||||||
pair[#pair+1] = pos
|
pair[#pair+1] = pos
|
||||||
local ret = minetest.item_place_node(itemstack, placer, pointed_thing)
|
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)]
|
local pair = fun_caves.db.translocators[tonumber(data.id)]
|
||||||
if #pair < 1 then
|
if #pair < 1 then
|
||||||
print('* Fun Caves: low error in translocator storage')
|
print('* Fun Caves: low error in translocator storage')
|
||||||
|
return
|
||||||
end
|
end
|
||||||
local inv = digger:get_inventory()
|
local inv = digger:get_inventory()
|
||||||
local item = ItemStack(node.name)
|
local item = ItemStack(node.name)
|
||||||
|
@ -406,7 +408,7 @@ local function trans_dig(pos, node, digger)
|
||||||
end
|
end
|
||||||
|
|
||||||
newnode = fun_caves.clone_node("default:steelblock")
|
newnode = fun_caves.clone_node("default:steelblock")
|
||||||
newnode.description = "Translocator Pair"
|
newnode.description = "Translocator"
|
||||||
newnode.on_rightclick = translocate
|
newnode.on_rightclick = translocate
|
||||||
newnode.on_use = trans_use
|
newnode.on_use = trans_use
|
||||||
newnode.on_place = trans_place
|
newnode.on_place = trans_place
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue