1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

More documentation in doc/lua_api.txt

This commit is contained in:
Perttu Ahola 2012-03-31 13:08:17 +03:00
parent 280e1a2512
commit e297c73913
2 changed files with 50 additions and 8 deletions

View file

@ -100,7 +100,11 @@ function string:trim()
return (self:gsub("^%s*(.-)%s*$", "%1"))
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
@ -115,10 +119,6 @@ function minetest.inventorycube(img1, img2, img3)
.. "{" .. img3:gsub("%^", "&")
end
function minetest.pos_to_string(pos)
return "(" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ")"
end
function minetest.get_pointed_thing_position(pointed_thing, above)
if pointed_thing.type == "node" then
if above then