mirror da
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-09-16 12:45:40 +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
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user