Declare optional dependencies

This commit is contained in:
Wuzzy 2017-02-15 03:48:03 +01:00
parent 7047055fb6
commit b2c129984c
2 changed files with 30 additions and 26 deletions

@ -1,2 +1,3 @@
mesecons mesecons
doc doc?
default?

@ -170,7 +170,7 @@ minetest.register_node("mesecons_window:filter2_open", {
end end
}) })
if minetest.get_modpath("default") then
minetest.register_craft({ minetest.register_craft({
output = 'mesecons_window:window_closed', output = 'mesecons_window:window_closed',
recipe = { recipe = {
@ -194,7 +194,10 @@ minetest.register_craft({
{"default:pine_needles", "group:mesecon_conductor_craftable", "default:pine_needles"}, {"default:pine_needles", "group:mesecon_conductor_craftable", "default:pine_needles"},
} }
}) })
end
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mesecons_window:window_closed", "nodes", "mesecons_window:window_open") doc.add_entry_alias("nodes", "mesecons_window:window_closed", "nodes", "mesecons_window:window_open")
doc.add_entry_alias("nodes", "mesecons_window:filter_closed", "nodes", "mesecons_window:filter_open") doc.add_entry_alias("nodes", "mesecons_window:filter_closed", "nodes", "mesecons_window:filter_open")
doc.add_entry_alias("nodes", "mesecons_window:filter2_closed", "nodes", "mesecons_window:filter2_open") doc.add_entry_alias("nodes", "mesecons_window:filter2_closed", "nodes", "mesecons_window:filter2_open")
end