Fix codestyle issues with `mcl_deepslate`, `mcl_copper`, `mcl_raw_ores`

This commit is contained in:
AFCMS 2022-05-04 11:07:04 +02:00 committed by Gitea
parent b0b8ef3921
commit f8f6ea22c8
8 changed files with 104 additions and 87 deletions

View File

@ -1,10 +1,7 @@
# MineClone2 Copper # MineClone2 Copper
### by NO11 ### by NO11
[![ContentDB](https://content.minetest.net/packages/NO11/mcl_copper/shields/title/)](https://content.minetest.net/packages/NO11/mcl_copper/)
[![ContentDB](https://content.minetest.net/packages/NO11/mcl_copper/shields/downloads/)](https://content.minetest.net/packages/NO11/mcl_copper/)
Adds copper ore, blocks and items. Adds copper ore, blocks and items.
You need the Minetest subgame "Mineclone 2" to use the mod.
![screenshot](https://content.minetest.net/uploads/338864e2d3.png) ![screenshot](./screenshot.png)

View File

@ -4,61 +4,70 @@ minetest.register_craft({
{ "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" }, { "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" },
{ "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" }, { "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" },
{ "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" }, { "mcl_copper:raw_copper", "mcl_copper:raw_copper", "mcl_copper:raw_copper" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_copper:block", output = "mcl_copper:block",
recipe = { recipe = {
{ "mcl_copper:copper_ingot", "mcl_copper:copper_ingot" }, { "mcl_copper:copper_ingot", "mcl_copper:copper_ingot" },
{ "mcl_copper:copper_ingot", "mcl_copper:copper_ingot" }, { "mcl_copper:copper_ingot", "mcl_copper:copper_ingot" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_copper:block_cut 4", output = "mcl_copper:block_cut 4",
recipe = { recipe = {
{ "mcl_copper:block", "mcl_copper:block" }, { "mcl_copper:block", "mcl_copper:block" },
{ "mcl_copper:block", "mcl_copper:block" }, { "mcl_copper:block", "mcl_copper:block" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_copper:block_exposed_cut 4", output = "mcl_copper:block_exposed_cut 4",
recipe = { recipe = {
{ "mcl_copper:block_exposed", "mcl_copper:block_exposed" }, { "mcl_copper:block_exposed", "mcl_copper:block_exposed" },
{ "mcl_copper:block_exposed", "mcl_copper:block_exposed" }, { "mcl_copper:block_exposed", "mcl_copper:block_exposed" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_copper:block_oxidized_cut 4", output = "mcl_copper:block_oxidized_cut 4",
recipe = { recipe = {
{ "mcl_copper:block_oxidized", "mcl_copper:block_oxidized" }, { "mcl_copper:block_oxidized", "mcl_copper:block_oxidized" },
{ "mcl_copper:block_oxidized", "mcl_copper:block_oxidized" }, { "mcl_copper:block_oxidized", "mcl_copper:block_oxidized" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_copper:mcl_copper:block_weathered_cut 4", output = "mcl_copper:mcl_copper:block_weathered_cut 4",
recipe = { recipe = {
{ "mcl_copper:block_weathered", "mcl_copper:block_weathered" }, { "mcl_copper:block_weathered", "mcl_copper:block_weathered" },
{ "mcl_copper:block_weathered", "mcl_copper:block_weathered" }, { "mcl_copper:block_weathered", "mcl_copper:block_weathered" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_copper:copper_ingot 4", output = "mcl_copper:copper_ingot 4",
recipe = { recipe = {
{ "mcl_copper:block" }, { "mcl_copper:block" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_copper:raw_copper 9", output = "mcl_copper:raw_copper 9",
recipe = { recipe = {
{ "mcl_copper:block_raw" }, { "mcl_copper:block_raw" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "mcl_copper:copper_ingot", output = "mcl_copper:copper_ingot",
recipe = "mcl_copper:raw_copper", recipe = "mcl_copper:raw_copper",
cooktime = 10, cooktime = 10,
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "mcl_copper:copper_ingot", output = "mcl_copper:copper_ingot",

View File

@ -1,4 +1,5 @@
local deepslate_mod = minetest.get_modpath("mcl_deepslate") --local deepslate_mod = minetest.get_modpath("mcl_deepslate")
local function register_oxidation_abm(abm_name, node_name, oxidized_variant) local function register_oxidation_abm(abm_name, node_name, oxidized_variant)
minetest.register_abm({ minetest.register_abm({
label = abm_name, label = abm_name,
@ -7,10 +8,11 @@ local function register_oxidation_abm(abm_name, node_name, oxidized_variant)
chance = 3, chance = 3,
action = function(pos, node) action = function(pos, node)
minetest.swap_node(pos, {name = oxidized_variant, param2 = node.param2}) minetest.swap_node(pos, {name = oxidized_variant, param2 = node.param2})
end end,
}) })
end end
--[[
local stairs = { local stairs = {
{"stair", "exposed", "_inner", "cut_inner"}, {"stair", "exposed", "_inner", "cut_inner"},
{"stair", "weathered", "_inner", "exposed_cut_inner"}, {"stair", "weathered", "_inner", "exposed_cut_inner"},
@ -29,9 +31,10 @@ local stairs = {
{"slab", "weathered", "_double","exposed_cut_double"}, {"slab", "weathered", "_double","exposed_cut_double"},
{"stair", "exposed", "","cut"}, {"stair", "exposed", "","cut"},
{"stair", "oxidized", "", "weathered_cut"}, {"stair", "oxidized", "", "weathered_cut"},
{"stair", "weathered", "", "exposed_cut"} {"stair", "weathered", "", "exposed_cut"},
} }]]
--[[
local function anti_oxidation_particles(pointed_thing) local function anti_oxidation_particles(pointed_thing)
local pos = pointed_thing.under local pos = pointed_thing.under
minetest.add_particlespawner({ minetest.add_particlespawner({
@ -103,7 +106,8 @@ local function register_axe_override(axe_name)
minetest.override_item("mcl_tools:axe_"..axe_name, { minetest.override_item("mcl_tools:axe_"..axe_name, {
on_place = anti_oxidation, on_place = anti_oxidation,
}) })
end end]]
--[[ Commented out for now because there the discussion how to handle this is ongoing --[[ Commented out for now because there the discussion how to handle this is ongoing
local stonelike = {"mcl_core:stone", "mcl_core:diorite", "mcl_core:andesite", "mcl_core:granite"} local stonelike = {"mcl_core:stone", "mcl_core:diorite", "mcl_core:andesite", "mcl_core:granite"}
if not deepslate_mod then if not deepslate_mod then
@ -168,7 +172,8 @@ end
for _, s in pairs(stair_oxidation) do for _, s in pairs(stair_oxidation) do
register_oxidation_abm("Copper oxidation", "mcl_stairs:"..s[1].."_copper_"..s[2], "mcl_stairs:"..s[1].."_copper_"..s[3]) register_oxidation_abm("Copper oxidation", "mcl_stairs:"..s[1].."_copper_"..s[2], "mcl_stairs:"..s[1].."_copper_"..s[3])
end end
local axes = {"wood", "stone", "iron", "gold", "diamond"}
--local axes = {"wood", "stone", "iron", "gold", "diamond"}
--[[ --[[
for _, axe in pairs(axes) do for _, axe in pairs(axes) do
register_axe_override(axe) register_axe_override(axe)

View File

@ -4,13 +4,12 @@ minetest.register_craftitem("mcl_copper:copper_ingot", {
description = S("Copper Ingot"), description = S("Copper Ingot"),
_doc_items_longdesc = S("Molten Raw Copper. It is used to craft blocks."), _doc_items_longdesc = S("Molten Raw Copper. It is used to craft blocks."),
inventory_image = "mcl_copper_ingot.png", inventory_image = "mcl_copper_ingot.png",
stack_max = 64,
groups = { craftitem = 1 }, groups = { craftitem = 1 },
}) })
minetest.register_craftitem("mcl_copper:raw_copper", { minetest.register_craftitem("mcl_copper:raw_copper", {
description = S("Raw Copper"), description = S("Raw Copper"),
_doc_items_longdesc = S("Raw Copper. Mine a Copper Ore to get it."), _doc_items_longdesc = S("Raw Copper. Mine a Copper Ore to get it."),
inventory_image = "mcl_copper_raw.png", inventory_image = "mcl_copper_raw.png",
stack_max = 64,
groups = { craftitem = 1 }, groups = { craftitem = 1 },
}) })

View File

@ -5,7 +5,6 @@ minetest.register_node("mcl_copper:stone_with_copper", {
_doc_items_longdesc = S("Some copper contained in stone, it is pretty common and can be found below sea level."), _doc_items_longdesc = S("Some copper contained in stone, it is pretty common and can be found below sea level."),
tiles = {"default_stone.png^mcl_copper_ore.png"}, tiles = {"default_stone.png^mcl_copper_ore.png"},
is_ground_content = true, is_ground_content = true,
stack_max = 64,
groups = {pickaxey = 3, building_block = 1, material_stone = 1}, groups = {pickaxey = 3, building_block = 1, material_stone = 1},
drop = "mcl_copper:raw_copper", drop = "mcl_copper:raw_copper",
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
@ -21,7 +20,6 @@ minetest.register_node("mcl_copper:block_raw", {
_doc_items_longdesc = S("A block used for compact raw copper storage."), _doc_items_longdesc = S("A block used for compact raw copper storage."),
tiles = {"mcl_copper_block_raw.png"}, tiles = {"mcl_copper_block_raw.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -33,7 +31,6 @@ minetest.register_node("mcl_copper:block", {
_doc_items_longdesc = S("A block of copper is mostly a decorative block."), _doc_items_longdesc = S("A block of copper is mostly a decorative block."),
tiles = {"mcl_copper_block.png"}, tiles = {"mcl_copper_block.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -45,7 +42,6 @@ minetest.register_node("mcl_copper:block_exposed", {
_doc_items_longdesc = S("Exposed copper is a decorative block."), _doc_items_longdesc = S("Exposed copper is a decorative block."),
tiles = {"mcl_copper_exposed.png"}, tiles = {"mcl_copper_exposed.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -58,7 +54,6 @@ minetest.register_node("mcl_copper:block_oxidized", {
_doc_items_longdesc = S("Oxidized copper is a decorative block."), _doc_items_longdesc = S("Oxidized copper is a decorative block."),
tiles = {"mcl_copper_oxidized.png"}, tiles = {"mcl_copper_oxidized.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -71,7 +66,6 @@ minetest.register_node("mcl_copper:block_weathered", {
_doc_items_longdesc = S("Weathered copper is a decorative block."), _doc_items_longdesc = S("Weathered copper is a decorative block."),
tiles = {"mcl_copper_weathered.png"}, tiles = {"mcl_copper_weathered.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -84,7 +78,6 @@ minetest.register_node("mcl_copper:block_cut", {
_doc_items_longdesc = S("Cut copper is a decorative block."), _doc_items_longdesc = S("Cut copper is a decorative block."),
tiles = {"mcl_copper_block_cut.png"}, tiles = {"mcl_copper_block_cut.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -96,7 +89,6 @@ minetest.register_node("mcl_copper:block_exposed_cut", {
_doc_items_longdesc = S("Exposed cut copper is a decorative block."), _doc_items_longdesc = S("Exposed cut copper is a decorative block."),
tiles = {"mcl_copper_exposed_cut.png"}, tiles = {"mcl_copper_exposed_cut.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -109,7 +101,6 @@ minetest.register_node("mcl_copper:block_oxidized_cut", {
_doc_items_longdesc = S("Oxidized cut copper is a decorative block."), _doc_items_longdesc = S("Oxidized cut copper is a decorative block."),
tiles = {"mcl_copper_oxidized_cut.png"}, tiles = {"mcl_copper_oxidized_cut.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -122,7 +113,6 @@ minetest.register_node("mcl_copper:block_weathered_cut", {
_doc_items_longdesc = S("Weathered cut copper is a decorative block."), _doc_items_longdesc = S("Weathered cut copper is a decorative block."),
tiles = {"mcl_copper_weathered_cut.png"}, tiles = {"mcl_copper_weathered_cut.png"},
is_ground_content = false, is_ground_content = false,
stack_max = 64,
groups = {pickaxey = 2, building_block = 1}, groups = {pickaxey = 2, building_block = 1},
sounds = mcl_sounds.node_sound_metal_defaults(), sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

View File

@ -1,20 +1,21 @@
local modname = minetest.get_current_modname() local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname) local S = minetest.get_translator(modname)
local layer_max = mcl_worlds.layer_to_y(16) --local layer_max = mcl_worlds.layer_to_y(16)
local layer_min = mcl_vars.mg_overworld_min --local layer_min = mcl_vars.mg_overworld_min
local copper_mod = minetest.get_modpath("mcl_copper") local copper_mod = minetest.get_modpath("mcl_copper")
local cobble = "mcl_deepslate:deepslate_cobbled" local cobble = "mcl_deepslate:deepslate_cobbled"
local stick = "mcl_core:stick" local stick = "mcl_core:stick"
--[[
local mountains = { local mountains = {
"ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground", "ExtremeHills", "ExtremeHills_beach", "ExtremeHills_ocean", "ExtremeHills_deep_ocean", "ExtremeHills_underground",
"ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground", "ExtremeHills+", "ExtremeHills+_ocean", "ExtremeHills+_deep_ocean", "ExtremeHills+_underground",
"ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground", "ExtremeHillsM", "ExtremeHillsM_ocean", "ExtremeHillsM_deep_ocean", "ExtremeHillsM_underground",
} }
]]
if minetest.get_modpath("mcl_item_id") then
mcl_item_id.set_mod_namespace(modname)
end
minetest.register_node("mcl_deepslate:deepslate", { minetest.register_node("mcl_deepslate:deepslate", {
description = S("Deepslate"), description = S("Deepslate"),
@ -23,7 +24,6 @@ minetest.register_node("mcl_deepslate:deepslate", {
tiles = { "mcl_deepslate_top.png", "mcl_deepslate_top.png", "mcl_deepslate.png" }, tiles = { "mcl_deepslate_top.png", "mcl_deepslate_top.png", "mcl_deepslate.png" },
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = true, is_ground_content = true,
stack_max = 64,
on_place = mcl_util.rotate_axis, on_place = mcl_util.rotate_axis,
groups = { pickaxey = 1, stone = 1, building_block = 1, material_stone = 1 }, groups = { pickaxey = 1, stone = 1, building_block = 1, material_stone = 1 },
drop = cobble, drop = cobble,
@ -59,7 +59,6 @@ minetest.register_node("mcl_deepslate:tuff", {
_doc_items_longdesc = S("Tuff is an ornamental rock formed from volcanic ash, occurring in underground blobs below Y=16."), _doc_items_longdesc = S("Tuff is an ornamental rock formed from volcanic ash, occurring in underground blobs below Y=16."),
_doc_items_hidden = false, _doc_items_hidden = false,
tiles = { "mcl_deepslate_tuff.png" }, tiles = { "mcl_deepslate_tuff.png" },
stack_max = 64,
groups = { pickaxey = 1, deco_block = 1 }, groups = { pickaxey = 1, deco_block = 1 },
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -111,16 +110,19 @@ local deepslate_ores = {
for _, p in pairs(deepslate_ores) do for _, p in pairs(deepslate_ores) do
register_deepslate_ore(p[1], p[2], p[3], p[4]) register_deepslate_ore(p[1], p[2], p[3], p[4])
end end
if copper_mod then if copper_mod then
register_deepslate_ore("Copper", "mcl_copper:raw_copper", 4, 4) register_deepslate_ore("Copper", "mcl_copper:raw_copper", 4, 4)
end end
local redstone_timer = 68.28 local redstone_timer = 68.28
local function redstone_ore_activate(pos) local function redstone_ore_activate(pos)
minetest.swap_node(pos, { name = "mcl_deepslate:deepslate_with_redstone_lit" }) minetest.swap_node(pos, { name = "mcl_deepslate:deepslate_with_redstone_lit" })
local t = minetest.get_node_timer(pos) local t = minetest.get_node_timer(pos)
t:start(redstone_timer) t:start(redstone_timer)
end end
local function redstone_ore_reactivate(pos) local function redstone_ore_reactivate(pos)
local t = minetest.get_node_timer(pos) local t = minetest.get_node_timer(pos)
t:start(redstone_timer) t:start(redstone_timer)
@ -131,7 +133,6 @@ minetest.register_node("mcl_deepslate:deepslate_with_redstone", {
_doc_items_longdesc = S("Deepslate redstone ore is a variant of redstone ore that can generate in deepslate and tuff blobs."), _doc_items_longdesc = S("Deepslate redstone ore is a variant of redstone ore that can generate in deepslate and tuff blobs."),
tiles = { "mcl_deepslate_redstone_ore.png" }, tiles = { "mcl_deepslate_redstone_ore.png" },
is_ground_content = true, is_ground_content = true,
stack_max = 64,
groups = { pickaxey = 4, building_block = 1, material_stone = 1, xp = 7 }, groups = { pickaxey = 4, building_block = 1, material_stone = 1, xp = 7 },
drop = { drop = {
items = { items = {
@ -161,7 +162,6 @@ minetest.register_node("mcl_deepslate:deepslate_with_redstone_lit", {
paramtype = "light", paramtype = "light",
light_source = 9, light_source = 9,
is_ground_content = true, is_ground_content = true,
stack_max = 64,
groups = { pickaxey = 4, not_in_creative_inventory = 1, material_stone = 1, xp = 7 }, groups = { pickaxey = 4, not_in_creative_inventory = 1, material_stone = 1, xp = 7 },
drop = { drop = {
items = { items = {
@ -173,7 +173,7 @@ minetest.register_node("mcl_deepslate:deepslate_with_redstone_lit", {
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
on_punch = redstone_ore_reactivate, on_punch = redstone_ore_reactivate,
on_walk_over = redstone_ore_reactivate, -- Uses walkover mod on_walk_over = redstone_ore_reactivate, -- Uses walkover mod
on_timer = function(pos, elapsed) on_timer = function(pos, _)
minetest.swap_node(pos, { name = "mcl_deepslate:deepslate_with_redstone" }) minetest.swap_node(pos, { name = "mcl_deepslate:deepslate_with_redstone" })
end, end,
_mcl_blast_resistance = 3, _mcl_blast_resistance = 3,
@ -186,6 +186,7 @@ minetest.register_node("mcl_deepslate:deepslate_with_redstone_lit", {
max_count = 5, max_count = 5,
} }
}) })
--[[ Commented out for now because there the discussion how to handle this is ongoing --[[ Commented out for now because there the discussion how to handle this is ongoing
minetest.register_ore({ minetest.register_ore({
ore_type = "blob", ore_type = "blob",
@ -353,7 +354,6 @@ local function register_deepslate_variant(item, desc, longdesc)
_doc_items_longdesc = S(longdesc), _doc_items_longdesc = S(longdesc),
_doc_items_hidden = false, _doc_items_hidden = false,
tiles = { "mcl_"..texture..".png" }, tiles = { "mcl_"..texture..".png" },
stack_max = 64,
groups = { pickaxey = 1, building_block = 1, material_stone = 1 }, groups = { pickaxey = 1, building_block = 1, material_stone = 1 },
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -366,7 +366,6 @@ local function register_deepslate_variant(item, desc, longdesc)
_doc_items_longdesc = S("Cracked "..desc:lower().." are a cracked variant."), _doc_items_longdesc = S("Cracked "..desc:lower().." are a cracked variant."),
_doc_items_hidden = false, _doc_items_hidden = false,
tiles = { "mcl_cracked_"..texture..".png" }, tiles = { "mcl_cracked_"..texture..".png" },
stack_max = 64,
groups = { pickaxey = 1, building_block = 1, material_stone = 1 }, groups = { pickaxey = 1, building_block = 1, material_stone = 1 },
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 6, _mcl_blast_resistance = 6,
@ -387,9 +386,11 @@ local deepslate_variants = {
{ "tiles", "Deepslate Tiles", "Deepslate tiles are a decorative variant of deepslate." }, { "tiles", "Deepslate Tiles", "Deepslate tiles are a decorative variant of deepslate." },
{ "chiseled", "Chiseled Deepslate", "Chiseled deepslate is the chiseled version of deepslate." }, { "chiseled", "Chiseled Deepslate", "Chiseled deepslate is the chiseled version of deepslate." },
} }
for _, dv in pairs(deepslate_variants) do for _, dv in pairs(deepslate_variants) do
register_deepslate_variant(dv[1], dv[2], dv[3]) register_deepslate_variant(dv[1], dv[2], dv[3])
end end
for i = 1, 3 do for i = 1, 3 do
local s = "mcl_deepslate:deepslate_"..deepslate_variants[i][1] local s = "mcl_deepslate:deepslate_"..deepslate_variants[i][1]
minetest.register_craft({ minetest.register_craft({
@ -397,6 +398,7 @@ for i = 1, 3 do
recipe = { { s, s }, { s, s } } recipe = { { s, s }, { s, s } }
}) })
end end
for _, p in pairs({ "bricks", "tiles" }) do for _, p in pairs({ "bricks", "tiles" }) do
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
@ -405,87 +407,98 @@ for _, p in pairs({ "bricks", "tiles" }) do
cooktime = 10, cooktime = 10,
}) })
end end
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "mcl_deepslate:deepslate", output = "mcl_deepslate:deepslate",
recipe = cobble, recipe = cobble,
cooktime = 10, cooktime = 10,
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_deepslate:deepslate_chiseled", output = "mcl_deepslate:deepslate_chiseled",
recipe = { recipe = {
{ "mcl_stairs:slab_deepslate_cobbled" }, { "mcl_stairs:slab_deepslate_cobbled" },
{ "mcl_stairs:slab_deepslate_cobbled" }, { "mcl_stairs:slab_deepslate_cobbled" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_brewing:stand_000", output = "mcl_brewing:stand_000",
recipe = { recipe = {
{ "", "mcl_mobitems:blaze_rod", "" }, { "", "mcl_mobitems:blaze_rod", "" },
{ cobble, cobble, cobble }, { cobble, cobble, cobble },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_furnaces:furnace", output = "mcl_furnaces:furnace",
recipe = { recipe = {
{ cobble, cobble, cobble }, { cobble, cobble, cobble },
{ cobble, "", cobble }, { cobble, "", cobble },
{ cobble, cobble, cobble }, { cobble, cobble, cobble },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_tools:pick_stone", output = "mcl_tools:pick_stone",
recipe = { recipe = {
{ cobble, cobble, cobble }, { cobble, cobble, cobble },
{ "", stick, "" }, { "", stick, "" },
{ "", stick, "" }, { "", stick, "" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_tools:shovel_stone", output = "mcl_tools:shovel_stone",
recipe = { recipe = {
{ cobble }, { cobble },
{ stick }, { stick },
{ stick }, { stick },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_tools:axe_stone", output = "mcl_tools:axe_stone",
recipe = { recipe = {
{ cobble, cobble }, { cobble, cobble },
{ cobble, stick }, { cobble, stick },
{ "", stick }, { "", stick },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_tools:axe_stone", output = "mcl_tools:axe_stone",
recipe = { recipe = {
{ cobble, cobble }, { cobble, cobble },
{ stick, cobble }, { stick, cobble },
{ stick, "" }, { stick, "" },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_tools:sword_stone", output = "mcl_tools:sword_stone",
recipe = { recipe = {
{ cobble }, { cobble },
{ cobble }, { cobble },
{ stick }, { stick },
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_farming:hoe_stone", output = "mcl_farming:hoe_stone",
recipe = { recipe = {
{ cobble, cobble }, { cobble, cobble },
{ "", stick }, { "", stick },
{ "", stick } { "", stick }
} },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_farming:hoe_stone", output = "mcl_farming:hoe_stone",
recipe = { recipe = {
{ cobble, cobble }, { cobble, cobble },
{ stick, "" }, { stick, "" },
{ stick, "" } { stick, "" }
} },
}) })

View File

@ -3,44 +3,48 @@ local function register_raw_ore(description, n)
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",
stack_max = 64,
groups = { craftitem = 1 }, groups = { craftitem = 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,
stack_max = 64,
groups = { pickaxey = 2, building_block = 1 }, groups = { pickaxey = 2, building_block = 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", output = raw_ingot.." 9",
recipe = { recipe = {
{ raw_ingot.."_block" }, { raw_ingot.."_block" },
} },
}) })
end end
register_raw_ore("Iron", "n") register_raw_ore("Iron", "n")
register_raw_ore("Gold") register_raw_ore("Gold")