This commit is contained in:
parent
3a377af1fd
commit
ef8a756f8e
@ -11,6 +11,8 @@ rawset(_G, "nodecore", nodecore)
|
||||
|
||||
local path = minetest.get_modpath(modname)
|
||||
|
||||
dofile(path .. "/issue7020.lua")
|
||||
|
||||
dofile(path .. "/util_misc.lua")
|
||||
dofile(path .. "/util_scan_flood.lua")
|
||||
dofile(path .. "/util_logtrace.lua")
|
||||
|
22
mods/nc_api/issue7020.lua
Normal file
22
mods/nc_api/issue7020.lua
Normal file
@ -0,0 +1,22 @@
|
||||
-- LUALOCALS < ---------------------------------------------------------
|
||||
local minetest, pairs, setmetatable, type
|
||||
= minetest, pairs, setmetatable, type
|
||||
-- LUALOCALS > ---------------------------------------------------------
|
||||
|
||||
local bifn = minetest.registered_entities["__builtin:falling_node"]
|
||||
local falling = {
|
||||
set_node = function(self, node, meta, ...)
|
||||
meta = meta or {}
|
||||
if type(meta) ~= "table" then meta = meta:to_table() end
|
||||
for k1, v1 in pairs(meta.inventory or {}) do
|
||||
for k2, v2 in pairs(v1) do
|
||||
if type(v2) == "userdata" then
|
||||
v1[k2] = v2:to_string()
|
||||
end
|
||||
end
|
||||
end
|
||||
return bifn.set_node(self, node, meta, ...)
|
||||
end
|
||||
}
|
||||
setmetatable(falling, bifn)
|
||||
minetest.register_entity(":__builtin:falling_node", falling)
|
@ -9,4 +9,3 @@ local path = minetest.get_modpath(modname)
|
||||
dofile(path .. "/api.lua")
|
||||
dofile(path .. "/node.lua")
|
||||
dofile(path .. "/abm.lua")
|
||||
|
||||
|
@ -8,4 +8,3 @@ local path = minetest.get_modpath(modname)
|
||||
|
||||
dofile(path .. "/ore.lua")
|
||||
dofile(path .. "/metallurgy.lua")
|
||||
|
||||
|
@ -62,4 +62,3 @@ nodecore.register_leaf_drops(function(pos, node, list)
|
||||
end)
|
||||
|
||||
local function fixed(t) return {type = "fixed", fixed = t} end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user