Fixed an error in landclaim_0gb_us that preventeded /import from importing legitamate cretions as well as a known oversight in build_0gb_us that allowed the importing of floating objects that should never float, such as torches.
This commit is contained in:
parent
a4a1225d32
commit
45aa9c8232
@ -148,14 +148,19 @@ build_0gb_us = {
|
||||
if file then
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
local min, max = build_0gb_us.normalize(pos0, pos1)
|
||||
local update = {}
|
||||
for line in file:lines() do
|
||||
local data = line:split(" ")
|
||||
if #data == 6 then
|
||||
build_0gb_us.place(player, {x=min.x+data[1],y=min.y+data[2],z=min.z+data[3]}, data[4], data[6], true)
|
||||
-- Ignore data[5], which represents param1
|
||||
table.insert(update, {x=min.x+data[1],y=min.y+data[2],z=min.z+data[3]})
|
||||
end
|
||||
end
|
||||
file:close()
|
||||
for key, value in pairs(update) do
|
||||
nodeupdate(value)
|
||||
end
|
||||
minetest.chat_send_player(name, "Imported.")
|
||||
else
|
||||
minetest.chat_send_player(name, "The file failed to load. It may be missing.")
|
||||
|
@ -1,9 +1,9 @@
|
||||
if minetest.get_modpath("build_0gb_us") then
|
||||
local place = build_0gb_us.place
|
||||
function build_0gb_us.place(player, pos, node, dir)
|
||||
function build_0gb_us.place(player, pos, node, dir, updateoverride)
|
||||
local name = player:get_player_name()
|
||||
if landclaim_0gb_us.can_interact(name, pos) then
|
||||
place(player, pos, node, dir)
|
||||
place(player, pos, node, dir, updateoverride)
|
||||
else
|
||||
local owner = landclaim_0gb_us.get_owner(pos)
|
||||
minetest.chat_send_player(name, "This area is owned by "..owner)
|
||||
|
Loading…
x
Reference in New Issue
Block a user