forked from mtcontrib/scifi_nodes
add ambience sounds and helper function (#87)
* add ambience sounds and helper function * minor tweaks * fix deps --------- Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
This commit is contained in:
@ -537,7 +537,8 @@ for name, def in pairs(nodes) do
|
||||
end
|
||||
|
||||
-- register node
|
||||
minetest.register_node("scifi_nodes:"..name, node_def)
|
||||
local nodename = "scifi_nodes:" .. name
|
||||
minetest.register_node(nodename , node_def)
|
||||
|
||||
-- unified dyes registration
|
||||
if def.colorable and has_unifieddyes_mod then
|
||||
@ -574,6 +575,12 @@ for name, def in pairs(nodes) do
|
||||
})
|
||||
end
|
||||
|
||||
if def.ambience then
|
||||
for soundname, opts in pairs(def.ambience) do
|
||||
scifi_nodes.register_ambience(nodename, soundname, opts)
|
||||
end
|
||||
end
|
||||
|
||||
-- advtrains platform registration
|
||||
if has_advtrains_mod and def.advtrains_platform then
|
||||
advtrains.register_platform("scifi_nodes", "scifi_nodes:" .. name)
|
||||
|
Reference in New Issue
Block a user