1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-02 14:50:20 +02:00

avoid duplicating get_nodedef_field() function

(both doors/gates and desk need it)

moved to init.lua and into homedecor.* namespace.
This commit is contained in:
Vanessa Ezekowitz
2014-06-29 10:47:25 -04:00
parent f8efeee4d7
commit ba3abaa6a6
3 changed files with 12 additions and 18 deletions

View File

@ -54,6 +54,14 @@ function homedecor.table_copy(t)
return nt
end
--
function homedecor.get_nodedef_field(nodename, fieldname)
if not minetest.registered_nodes[nodename] then
return nil
end
return minetest.registered_nodes[nodename][fieldname]
end
-- load various other components