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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user