diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-31 13:08:17 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-31 13:08:17 +0300 |
commit | e297c739139ad0116ebdcda7a8dc5884d89f5a96 (patch) | |
tree | 86f7dd63a53a790063facab23174958c7cd7b993 /builtin/builtin.lua | |
parent | 280e1a2512c71ef0d38643d8b245c40b285879ae (diff) | |
download | minetest-e297c739139ad0116ebdcda7a8dc5884d89f5a96.tar.gz minetest-e297c739139ad0116ebdcda7a8dc5884d89f5a96.tar.bz2 minetest-e297c739139ad0116ebdcda7a8dc5884d89f5a96.zip |
More documentation in doc/lua_api.txt
Diffstat (limited to 'builtin/builtin.lua')
-rw-r--r-- | builtin/builtin.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/builtin.lua b/builtin/builtin.lua index e529b7261..d6782a49a 100644 --- a/builtin/builtin.lua +++ b/builtin/builtin.lua @@ -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 |