forked from nalc/areas
Also limit chatcommand area_pos[12] positions.
This commit is contained in:
parent
f70600db30
commit
024424ee8b
4
pos.lua
4
pos.lua
@ -50,7 +50,7 @@ minetest.register_chatcommand("area_pos1", {
|
|||||||
else
|
else
|
||||||
return false, "Invalid usage, see /help area_pos1."
|
return false, "Invalid usage, see /help area_pos1."
|
||||||
end
|
end
|
||||||
pos = vector.round(pos)
|
pos = posLimit(vector.round(pos))
|
||||||
areas:setPos1(name, pos)
|
areas:setPos1(name, pos)
|
||||||
return true, "Area position 1 set to "
|
return true, "Area position 1 set to "
|
||||||
..minetest.pos_to_string(pos)
|
..minetest.pos_to_string(pos)
|
||||||
@ -77,7 +77,7 @@ minetest.register_chatcommand("area_pos2", {
|
|||||||
else
|
else
|
||||||
return false, "Invalid usage, see /help area_pos2."
|
return false, "Invalid usage, see /help area_pos2."
|
||||||
end
|
end
|
||||||
pos = vector.round(pos)
|
pos = posLimit(vector.round(pos))
|
||||||
areas:setPos2(name, pos)
|
areas:setPos2(name, pos)
|
||||||
return true, "Area position 2 set to "
|
return true, "Area position 2 set to "
|
||||||
..minetest.pos_to_string(pos)
|
..minetest.pos_to_string(pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user