Added mineclone2 support apart from with mg

This commit is contained in:
James David Clarke 2023-12-19 18:12:42 +00:00
parent b20cc8d102
commit 2811f666b4
No known key found for this signature in database
GPG Key ID: 9F5ECFD0E20F1C4C
2 changed files with 21 additions and 2 deletions

View File

@ -25,11 +25,25 @@ end
-- `frame` support
local use_frame = minetest.get_modpath("frame")
local is_mcl_core_present = minetest.get_modpath("mcl_core") ~= nil
local is_mcl_sounds_present = minetest.get_modpath("mcl_sounds") ~= nil
local is_mcl_copper_present = minetest.registered_items["mcl_copper:copper_ingot"] ~= nil
if is_mcl_sounds_present then
local default_stone_sounds = mcl_sounds.node_sound_stone_defaults()
local default_metal_sounds = mcl_sounds.node_sound_metal_defaults()
else
local default_stone_sounds = default.node_sound_stone_defaults()
local default_metal_sounds = default.node_sound_metal_defaults()
end
-- Returns the crafting recipe table for a given material and item.
local function get_recipe(material, item)
if is_mcl_core_present then
material = material:gsub("default:", "mcl_core:")
end
if item == "sword" then
return {
{material},
@ -75,6 +89,11 @@ local function get_recipe(material, item)
end
local function add_ore(modname, description, mineral_name, oredef)
if mineral_name == "copper" and is_mcl_copper_present then
return
end
local img_base = modname .. "_" .. mineral_name
local toolimg_base = modname .. "_tool_"..mineral_name
local tool_base = modname .. ":"

View File

@ -1,5 +1,5 @@
name = moreores
description = Adds new ore types.
depends = default
optional_depends = carts,farming,frame,mg,toolranks
optional_depends = carts,farming,frame,mg,toolranks,mcl_core,mcl_sounds
min_minetest_version = 5.0.0
supported_games mineclone2,mineclonia,minetest_game