More documentation in doc/lua_api.txt
This commit is contained in:
parent
bcbfcfeb13
commit
b09dbe99c7
|
@ -100,7 +100,11 @@ function string:trim()
|
||||||
return (self:gsub("^%s*(.-)%s*$", "%1"))
|
return (self:gsub("^%s*(.-)%s*$", "%1"))
|
||||||
end
|
end
|
||||||
|
|
||||||
assert(string.trim("\n \t\tfoo\t ") == "foo")
|
assert(string.trim("\n \t\tfoo bar\t ") == "foo bar")
|
||||||
|
|
||||||
|
function minetest.pos_to_string(pos)
|
||||||
|
return "(" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ")"
|
||||||
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Item definition helpers
|
-- Item definition helpers
|
||||||
|
@ -115,10 +119,6 @@ function minetest.inventorycube(img1, img2, img3)
|
||||||
.. "{" .. img3:gsub("%^", "&")
|
.. "{" .. img3:gsub("%^", "&")
|
||||||
end
|
end
|
||||||
|
|
||||||
function minetest.pos_to_string(pos)
|
|
||||||
return "(" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ")"
|
|
||||||
end
|
|
||||||
|
|
||||||
function minetest.get_pointed_thing_position(pointed_thing, above)
|
function minetest.get_pointed_thing_position(pointed_thing, above)
|
||||||
if pointed_thing.type == "node" then
|
if pointed_thing.type == "node" then
|
||||||
if above then
|
if above then
|
||||||
|
|
Loading…
Reference in New Issue