Merge pull request 'Added raw ores to iron and gold ore drops' (#2490) from raw_ore_drops into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2490
Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
cora 2022-07-25 22:24:59 +00:00
commit 3a09405a1c
2 changed files with 48 additions and 39 deletions

View File

@ -63,11 +63,12 @@ minetest.register_node("mcl_core:stone_with_iron", {
is_ground_content = true, is_ground_content = true,
stack_max = 64, stack_max = 64,
groups = {pickaxey=3, building_block=1, material_stone=1, blast_furnace_smeltable=1}, groups = {pickaxey=3, building_block=1, material_stone=1, blast_furnace_smeltable=1},
drop = "mcl_core:stone_with_iron", drop = "mcl_raw_ores:raw_iron",
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 3, _mcl_blast_resistance = 3,
_mcl_hardness = 3, _mcl_hardness = 3,
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
}) })
@ -78,11 +79,12 @@ minetest.register_node("mcl_core:stone_with_gold", {
is_ground_content = true, is_ground_content = true,
stack_max = 64, stack_max = 64,
groups = {pickaxey=4, building_block=1, material_stone=1, blast_furnace_smeltable=1}, groups = {pickaxey=4, building_block=1, material_stone=1, blast_furnace_smeltable=1},
drop = "mcl_core:stone_with_gold", drop = "mcl_raw_ores:raw_gold",
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 3, _mcl_blast_resistance = 3,
_mcl_hardness = 3, _mcl_hardness = 3,
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
}) })
local redstone_timer = 68.28 local redstone_timer = 68.28

View File

@ -1,49 +1,56 @@
local function register_raw_ore(description, n) local function register_raw_ore(description, n)
local ore = description:lower() local ore = description:lower()
local n = n or "" local n = n or ""
local raw_ingot = "mcl_raw_ores:raw_"..ore local raw_ingot = "mcl_raw_ores:raw_"..ore
local texture = "mcl_raw_ores_raw_"..ore local texture = "mcl_raw_ores_raw_"..ore
minetest.register_craftitem(raw_ingot, { minetest.register_craftitem(raw_ingot, {
description = ("Raw "..description), description = ("Raw "..description),
_doc_items_longdesc = ("Raw "..ore..". Mine a"..n.." "..ore.." ore to get it."), _doc_items_longdesc = ("Raw "..ore..". Mine a"..n.." "..ore.." ore to get it."),
inventory_image = texture..".png", inventory_image = texture..".png",
groups = { craftitem = 1 }, groups = { craftitem = 1, blast_furnace_smeltable = 1 },
}) })
minetest.register_node(raw_ingot.."_block", { minetest.register_node(raw_ingot.."_block", {
description = ("Block of Raw "..description), description = ("Block of Raw "..description),
_doc_items_longdesc = ("A block of raw "..ore.." is mostly a decorative block but also useful as a compact storage of raw "..ore.."."), _doc_items_longdesc = ("A block of raw "..ore.." is mostly a decorative block but also useful as a compact storage of raw "..ore.."."),
tiles = { texture.."_block.png" }, tiles = { texture.."_block.png" },
is_ground_content = false, is_ground_content = false,
groups = { pickaxey = 2, building_block = 1 }, groups = { pickaxey = 2, building_block = 1, blast_furnace_smeltable = 1 },
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
_mcl_hardness = 5, _mcl_hardness = 5,
}) })
minetest.register_craft({ minetest.register_craft({
output = raw_ingot.."_block", output = raw_ingot.."_block",
recipe = { recipe = {
{ raw_ingot, raw_ingot, raw_ingot }, { raw_ingot, raw_ingot, raw_ingot },
{ raw_ingot, raw_ingot, raw_ingot }, { raw_ingot, raw_ingot, raw_ingot },
{ raw_ingot, raw_ingot, raw_ingot }, { raw_ingot, raw_ingot, raw_ingot },
}, },
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "mcl_core:"..ore.."_ingot", output = "mcl_core:"..ore.."_ingot",
recipe = raw_ingot, recipe = raw_ingot,
cooktime = 10, cooktime = 10,
}) })
minetest.register_craft({ minetest.register_craft({
output = raw_ingot.." 9", type = "cooking",
recipe = { output = "mcl_core:"..ore.."block",
{ raw_ingot.."_block" }, recipe = raw_ingot.."_block",
}, cooktime = 90,
}) })
minetest.register_craft({
output = raw_ingot.." 9",
recipe = {
{ raw_ingot.."_block" },
},
})
end end
register_raw_ore("Iron", "n") register_raw_ore("Iron", "n")