mirror of
https://github.com/minetest-mods/areas.git
synced 2024-12-26 18:50:41 +01:00
Fix a bug of the move_area chatcommand
This commit is contained in:
parent
8b0b8c1ad2
commit
93942db2c1
@ -296,8 +296,7 @@ minetest.register_chatcommand("move_area", {
|
|||||||
return false, "Invalid usage, see /help move_area."
|
return false, "Invalid usage, see /help move_area."
|
||||||
end
|
end
|
||||||
|
|
||||||
local area = areas.areas[id]
|
if not areas.areas[id] then
|
||||||
if not area then
|
|
||||||
return false, "Area does not exist."
|
return false, "Area does not exist."
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -306,8 +305,8 @@ minetest.register_chatcommand("move_area", {
|
|||||||
return false, "You need to select an area first."
|
return false, "You need to select an area first."
|
||||||
end
|
end
|
||||||
|
|
||||||
area.pos1 = pos1
|
areas.areas[id].pos1 = pos1
|
||||||
area.pos2 = pos2
|
areas.areas[id].pos2 = pos2
|
||||||
areas:save()
|
areas:save()
|
||||||
return true, "Area successfully moved."
|
return true, "Area successfully moved."
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user