MineClone/MineClonia compatibility (#80)

This commit is contained in:
Github is a non-free platform owned by Microsoft. Reasonable alternatives exist, such as Gitea, Sourcehut. We need a federated, mastodon-like forge based on ForgeFed. See: https://forgefed.org
2023-12-02 21:45:07 +01:00
committed by GitHub
parent 722ff851dd
commit f781039f43
7 changed files with 91 additions and 22 deletions

View File

@ -1,6 +1,13 @@
digilines = {}
digilines.S = minetest.get_translator("digilines")
digilines.mcl = minetest.get_modpath("mcl_core")
-- sounds check
if minetest.get_modpath("default") then digilines.sounds = default end
if digilines.mcl then digilines.sounds = mcl_sounds end
-- Backwards compatibility code.
-- We define a proxy table whose methods can be called with the
-- `foo:bar` notation, and it will redirect the call to the
@ -55,12 +62,24 @@ function digilines.receptor_send(pos, rules, channel, msg)
end
end
local fiber = "mesecons_materials:fiber"
local insulated = "mesecons_insulated:insulated_off"
local gold_ingot = "default:gold_ingot"
if digilines.mcl then
gold_ingot = "mcl_core:gold_ingot"
-- MCL dont support mesecons insulated
if not minetest.get_modpath("mesecons_insulated") then
insulated = "mesecons:redstone"
end
end
minetest.register_craft({
output = 'digilines:wire_std_00000000 2',
recipe = {
{'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'},
{'mesecons_insulated:insulated_off', 'mesecons_insulated:insulated_off', 'default:gold_ingot'},
{'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'},
{fiber, fiber, fiber},
{insulated, insulated, gold_ingot},
{fiber, fiber, fiber},
}
})