From 712424eb8d2497460e9051949dfe63d7cc6f8eae Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 26 Jul 2017 16:13:19 +0200 Subject: [PATCH] Update help aliases for signs --- mods/ITEMS/mcl_signs/depends.txt | 4 ++-- mods/ITEMS/mcl_signs/init.lua | 30 +++++++++++++++++++----------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_signs/depends.txt b/mods/ITEMS/mcl_signs/depends.txt index 812afabce0..f123382f89 100644 --- a/mods/ITEMS/mcl_signs/depends.txt +++ b/mods/ITEMS/mcl_signs/depends.txt @@ -1,3 +1,3 @@ -mcl_sounds -mcl_core +mcl_sounds? +mcl_core? doc? diff --git a/mods/ITEMS/mcl_signs/init.lua b/mods/ITEMS/mcl_signs/init.lua index b8838f2873..2fd1299790 100644 --- a/mods/ITEMS/mcl_signs/init.lua +++ b/mods/ITEMS/mcl_signs/init.lua @@ -232,7 +232,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end) - +local node_sounds +if minetest.get_modpath("mcl_sounds") then + node_sounds = mcl_sounds.node_sound_wood_defaults() +end minetest.register_node("mcl_signs:wall_sign", { description = "Sign", @@ -252,7 +255,7 @@ minetest.register_node("mcl_signs:wall_sign", { tiles = {"mcl_signs_sign.png"}, groups = sign_groups, stack_max = 16, - sounds = mcl_sounds.node_sound_wood_defaults(), + sounds = node_sounds, on_place = function(itemstack, placer, pointed_thing) local above = pointed_thing.above @@ -384,7 +387,7 @@ local ssign = { groups = sign_groups, drop = "mcl_signs:wall_sign", stack_max = 16, - sounds = mcl_sounds.node_sound_wood_defaults(), + sounds = node_sounds, on_destruct = destruct_sign, on_receive_fields = function(pos, formname, fields, sender) @@ -449,17 +452,22 @@ minetest.register_craft({ burntime = 10, }) -minetest.register_craft({ - output = 'mcl_signs:wall_sign 3', - recipe = { - {'group:wood', 'group:wood', 'group:wood'}, - {'group:wood', 'group:wood', 'group:wood'}, - {'', 'mcl_core:stick', ''}, - } -}) +if minetest.get_modpath("mcl_core") then + minetest.register_craft({ + output = 'mcl_signs:wall_sign 3', + recipe = { + {'group:wood', 'group:wood', 'group:wood'}, + {'group:wood', 'group:wood', 'group:wood'}, + {'', 'mcl_core:stick', ''}, + } + }) +end if minetest.get_modpath("doc") then doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign") + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5") + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45") + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5") end minetest.register_alias("signs:sign_wall", "mcl_signs:wall_sign")