mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-06-28 05:50:17 +02:00
Make modpack mostly independent from MTG (#607)
This commit is contained in:
committed by
GitHub
parent
f4070d3e64
commit
dfa43d6c0c
@ -12,7 +12,7 @@ minetest.register_node("mesecons_noteblock:noteblock", {
|
||||
mesecon.noteblock_play(pos, node.param2)
|
||||
minetest.set_node(pos, node)
|
||||
end,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = mesecon.node_sound.wood,
|
||||
mesecons = {effector = { -- play sound when activated
|
||||
action_on = function(pos, node)
|
||||
mesecon.noteblock_play(pos, node.param2)
|
||||
@ -25,7 +25,7 @@ minetest.register_craft({
|
||||
output = "mesecons_noteblock:noteblock 1",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:mesecon_conductor_craftable", "default:steel_ingot", "group:mesecon_conductor_craftable"},
|
||||
{"group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
}
|
||||
})
|
||||
@ -46,14 +46,20 @@ local soundnames = {
|
||||
"mesecons_noteblock_c"
|
||||
}
|
||||
|
||||
local node_sounds = {
|
||||
["default:lava_source"] = "fire_fire",
|
||||
["default:chest"] = "mesecons_noteblock_snare",
|
||||
["default:chest_locked"] = "mesecons_noteblock_snare",
|
||||
["default:coalblock"] = "tnt_explode",
|
||||
["default:glass"] = "mesecons_noteblock_hihat",
|
||||
["default:obsidian_glass"] = "mesecons_noteblock_hihat",
|
||||
}
|
||||
local node_sounds = {}
|
||||
for alias, sound in pairs({
|
||||
["mesecons_gamecompat:lava_source"] = mesecon.sound_name.fire,
|
||||
["mesecons_gamecompat:chest"] = "mesecons_noteblock_snare",
|
||||
["mesecons_gamecompat:chest_locked"] = "mesecons_noteblock_snare",
|
||||
["mesecons_gamecompat:coalblock"] = mesecon.sound_name.explode,
|
||||
["mesecons_gamecompat:glass"] = "mesecons_noteblock_hihat",
|
||||
["mesecons_gamecompat:obsidian_glass"] = "mesecons_noteblock_hihat",
|
||||
}) do
|
||||
local nodename = minetest.registered_aliases[alias]
|
||||
if nodename then
|
||||
node_sounds[nodename] = sound
|
||||
end
|
||||
end
|
||||
|
||||
local node_sounds_group = {
|
||||
["stone"] = "mesecons_noteblock_kick",
|
||||
@ -61,6 +67,7 @@ local node_sounds_group = {
|
||||
["wood"] = "mesecons_noteblock_litecrash",
|
||||
}
|
||||
|
||||
local steelblock_nodename = minetest.registered_aliases["mesecons_gamecompat:steelblock"]
|
||||
mesecon.noteblock_play = function(pos, param2)
|
||||
pos.y = pos.y-1
|
||||
local nodeunder = minetest.get_node(pos).name
|
||||
@ -80,7 +87,7 @@ mesecon.noteblock_play = function(pos, param2)
|
||||
minetest.log("error", "[mesecons_noteblock] No soundname found, test param2")
|
||||
return
|
||||
end
|
||||
if nodeunder == "default:steelblock" then
|
||||
if nodeunder == steelblock_nodename then
|
||||
soundname = soundname.. 2
|
||||
end
|
||||
end
|
||||
|
@ -1,2 +1,2 @@
|
||||
name = mesecons_noteblock
|
||||
depends = default, mesecons
|
||||
depends = mesecons, mesecons_gamecompat
|
||||
|
Reference in New Issue
Block a user