mirror of
https://github.com/acmgit/mesecons_stealthnode.git
synced 2024-11-21 23:03:53 +01:00
Groups are now copied to the stealthnode.
This commit is contained in:
parent
703b2d1a02
commit
238c4362c9
16
register.lua
16
register.lua
@ -25,13 +25,15 @@ function stealthnode.register_stealthnode(modname, node)
|
||||
|
||||
end
|
||||
|
||||
local newgroup = {}
|
||||
newgroup = stealthnode.table_clone(minetest.registered_nodes[modname .. ":" .. node].groups)
|
||||
|
||||
minetest.register_node("mesecons_stealthnode:" .. modname .. "_" .. node, {
|
||||
description="Stealthnode " .. minetest.registered_nodes[modname .. ":" .. node].description,
|
||||
tiles = tile,
|
||||
is_ground_content = false,
|
||||
inventory_image = tile,
|
||||
groups = {cracky=3},
|
||||
groups = newgroup,
|
||||
sounds = minetest.registered_nodes[modname .. ":" .. node].sounds,
|
||||
mesecons = {conductor = {
|
||||
state = mesecon.state.off,
|
||||
@ -76,3 +78,15 @@ function stealthnode.register_stealthnode(modname, node)
|
||||
})
|
||||
|
||||
end -- function stealthnode.register_stealth_node(
|
||||
|
||||
|
||||
function stealthnode.table_clone(c_table)
|
||||
local t2 = {}
|
||||
for k,v in pairs(c_table) do
|
||||
t2[k] = v
|
||||
|
||||
end
|
||||
|
||||
return t2
|
||||
|
||||
end -- function cucina_vegana.table_clone
|
||||
|
Loading…
Reference in New Issue
Block a user