mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-15 23:10:41 +01:00
Bugfix
This commit is contained in:
parent
48d571bd90
commit
a73d568e58
|
@ -73,9 +73,9 @@ local function move_nodes_vect(poslist,vect,must_not_move,owner)
|
||||||
if (name~="air" and minetest.registered_nodes[name].liquidtype=="none") and not(pos_in_list(poslist,npos)) then
|
if (name~="air" and minetest.registered_nodes[name].liquidtype=="none") and not(pos_in_list(poslist,npos)) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if pos.x==must_not_move.x and pos.y==must_not_move.y and pos.z==must_not_move.z then
|
--[[if pos.x==must_not_move.x and pos.y==must_not_move.y and pos.z==must_not_move.z then
|
||||||
return
|
return
|
||||||
end
|
end]]
|
||||||
end
|
end
|
||||||
nodelist={}
|
nodelist={}
|
||||||
for _,pos in ipairs(poslist) do
|
for _,pos in ipairs(poslist) do
|
||||||
|
@ -285,11 +285,14 @@ local function template_connected(pos,c)
|
||||||
local pos1=vector.add(pos,vect)
|
local pos1=vector.add(pos,vect)
|
||||||
local nodename=minetest.get_node(pos1).name
|
local nodename=minetest.get_node(pos1).name
|
||||||
if not(pos_in_list(c,pos1)) and nodename=="technic:template" then
|
if not(pos_in_list(c,pos1)) and nodename=="technic:template" then
|
||||||
|
local meta = minetest.get_meta(pos1)
|
||||||
|
if meta:get_string("connected") == "" then
|
||||||
c[#(c)+1]=pos1
|
c[#(c)+1]=pos1
|
||||||
template_connected(pos1,c)
|
template_connected(pos1,c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function get_templates(pos)
|
local function get_templates(pos)
|
||||||
c={pos}
|
c={pos}
|
||||||
|
@ -426,7 +429,7 @@ minetest.register_tool("technic:template_tool",{
|
||||||
inventory_image = "technic_template_tool.png",
|
inventory_image = "technic_template_tool.png",
|
||||||
on_use = function(itemstack, puncher, pointed_thing)
|
on_use = function(itemstack, puncher, pointed_thing)
|
||||||
local pos = pointed_thing.under
|
local pos = pointed_thing.under
|
||||||
if minetest.is_protected and minetest.is_protected(pos, placer:get_player_name()) then
|
if pos == nil or (minetest.is_protected and minetest.is_protected(pos, placer:get_player_name())) then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user