aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/item.lua
Commit message (Expand)AuthorAge
* Fix two nul deref if digging unknown nodes. (#5398)Auke Kok2017-03-15
* Optimize item.luatenplus12017-03-10
* Fixes for colorwallmounted and colorfacedir nodesDániel Juhász2017-02-18
* Make facedir_to_dir and wallmounted_to_dir work with coloured nodes as well. ...Nathanaël Courant2017-01-31
* core: Add dir_to_yaw and yaw_to_dir helpersAuke Kok2017-01-23
* Tool break: Reduce gain of break soundsparamat2016-11-20
* Builtin/../item: Enable tool breaking soundsAuke Kok2016-11-18
* Introduce builtin_shared and use it to fix #4778est312016-11-16
* Builtin/game/item: Add `place_param2` nodedef fieldAuke Kok2016-06-17
* Introduce "protection_bypass" privilege.Auke Kok2016-03-11
* Initialize facedir and wallmounted tables only once.Diego Martinez2016-02-11
* Liquids: Flow into and destroy 'floodable' nodesparamat2016-01-07
* Fix missing localization for objHybridDog2015-12-20
* Add on_secondary_use when right clicking an item in the airAlex Ford2015-12-02
* Add the player name to dropped itemsRobert Zenz2015-11-12
* Added minetest.wallmounted_to_dirFernando Carmona Varo2015-10-04
* Some map border related fixesest312015-09-29
* SAPI: Track last executed mod and include in error messageskwolekr2015-08-12
* Fix minetest.item_eat's replace_with_item, fixes #2292rubenwardy2015-02-16
* New feature: drop a item instead a stack while...Lord89James2014-06-10
* Add item eat callbackrubenwardy2014-05-26
* Use "core" namespace internallyShadowNinja2014-05-08
* Organize builtin into subdirectoriesShadowNinja2014-05-07
s="hl opt">(o) == "userdata" then io.write(basic_dump2(o), "\n") elseif type(o) == "table" then if dumped[o] then io.write(dumped[o], "\n") else dumped[o] = name io.write("{}\n") -- new table for k,v in pairs(o) do local fieldname = string.format("%s[%s]", name, basic_dump2(k)) dump2(v, fieldname, dumped) end end else error("cannot dump a " .. type(o)) return nil end end function dump(o, dumped) dumped = dumped or {} if type(o) == "number" then return tostring(o) elseif type(o) == "string" then return string.format("%q", o) elseif type(o) == "table" then if dumped[o] then return "<circular reference>" end dumped[o] = true local t = {} for k,v in pairs(o) do t[#t+1] = "" .. k .. " = " .. dump(v, dumped) end return "{" .. table.concat(t, ", ") .. "}" elseif type(o) == "boolean" then return tostring(o) elseif type(o) == "function" then return "<function>" elseif type(o) == "userdata" then return "<userdata>" elseif type(o) == "nil" then return "nil" else error("cannot dump a " .. type(o)) return nil end end function string:split(sep) local sep, fields = sep or ",", {} local pattern = string.format("([^%s]+)", sep) self:gsub(pattern, function(c) fields[#fields+1] = c end) return fields end function string:trim() return (self:gsub("^%s*(.-)%s*$", "%1")) end assert(string.trim("\n \t\tfoo bar\t ") == "foo bar") function minetest.pos_to_string(pos) return "(" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ")" end