Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mineclone2, mineclonia and mineclone5 support #55

Merged
merged 19 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions _config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,23 @@ moreores.mithril_max_depth = -2048 -- For v6 mapgen, -256 fits better
moreores.mithril_min_depth = -4095 -- For v6 mapgen, -511 fits better
moreores.mithril_max_depth_deep = -4096 -- For v6 mapgen, -512 fits better
moreores.mithril_min_depth_deep = -31000

if minetest.get_modpath("mcl_core") then
-- Example adjustments for MineClone2
moreores.tin_max_depth_high = 0
moreores.tin_min_depth_high = -10
moreores.tin_max_depth = -11
moreores.tin_min_depth = -57

-- Similar adjustments for silver and mithril
moreores.silver_max_depth_high = 0
moreores.silver_min_depth_high = -10
moreores.silver_max_depth = -11
moreores.silver_min_depth = -57

moreores.mithril_max_depth_high = 0
moreores.mithril_min_depth_high = -20
moreores.mithril_max_depth = -21
moreores.mithril_min_depth = -57

end
JamesClarke7283 marked this conversation as resolved.
Show resolved Hide resolved
26 changes: 24 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,28 @@ end
-- `frame` support
local use_frame = minetest.get_modpath("frame")

local default_stone_sounds = default.node_sound_stone_defaults()
local default_metal_sounds = default.node_sound_metal_defaults()
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

local default_stone_sounds = nil
local default_metal_sounds = nil

if is_mcl_sounds_present then
default_stone_sounds = mcl_sounds.node_sound_stone_defaults()
default_metal_sounds = mcl_sounds.node_sound_metal_defaults()
else
default_stone_sounds = default.node_sound_stone_defaults()
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
Calinou marked this conversation as resolved.
Show resolved Hide resolved

if item == "sword" then
return {
{material},
Expand Down Expand Up @@ -75,6 +92,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
Calinou marked this conversation as resolved.
Show resolved Hide resolved

local img_base = modname .. "_" .. mineral_name
local toolimg_base = modname .. "_tool_"..mineral_name
local tool_base = modname .. ":"
Expand Down
4 changes: 2 additions & 2 deletions mod.conf
Original file line number Diff line number Diff line change
@@ -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
Calinou marked this conversation as resolved.
Show resolved Hide resolved
Loading