Added mineclone2 support apart from with mg
This commit is contained in:
parent
b20cc8d102
commit
2811f666b4
19
init.lua
19
init.lua
|
@ -25,11 +25,25 @@ end
|
||||||
-- `frame` support
|
-- `frame` support
|
||||||
local use_frame = minetest.get_modpath("frame")
|
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_stone_sounds = default.node_sound_stone_defaults()
|
||||||
local default_metal_sounds = default.node_sound_metal_defaults()
|
local default_metal_sounds = default.node_sound_metal_defaults()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Returns the crafting recipe table for a given material and item.
|
-- Returns the crafting recipe table for a given material and item.
|
||||||
local function get_recipe(material, item)
|
local function get_recipe(material, item)
|
||||||
|
if is_mcl_core_present then
|
||||||
|
material = material:gsub("default:", "mcl_core:")
|
||||||
|
end
|
||||||
|
|
||||||
if item == "sword" then
|
if item == "sword" then
|
||||||
return {
|
return {
|
||||||
{material},
|
{material},
|
||||||
|
@ -75,6 +89,11 @@ local function get_recipe(material, item)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function add_ore(modname, description, mineral_name, oredef)
|
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 img_base = modname .. "_" .. mineral_name
|
||||||
local toolimg_base = modname .. "_tool_"..mineral_name
|
local toolimg_base = modname .. "_tool_"..mineral_name
|
||||||
local tool_base = modname .. ":"
|
local tool_base = modname .. ":"
|
||||||
|
|
4
mod.conf
4
mod.conf
|
@ -1,5 +1,5 @@
|
||||||
name = moreores
|
name = moreores
|
||||||
description = Adds new ore types.
|
description = Adds new ore types.
|
||||||
depends = default
|
optional_depends = carts,farming,frame,mg,toolranks,mcl_core,mcl_sounds
|
||||||
optional_depends = carts,farming,frame,mg,toolranks
|
|
||||||
min_minetest_version = 5.0.0
|
min_minetest_version = 5.0.0
|
||||||
|
supported_games mineclone2,mineclonia,minetest_game
|
||||||
|
|
Loading…
Reference in New Issue