Added Mineclone2 support apart from special machines own recipes within the machines

This commit is contained in:
James David Clarke
2023-12-20 08:20:56 +00:00
parent b221d69717
commit cfe2ee2133
68 changed files with 902 additions and 495 deletions

View File

@ -1,8 +1,25 @@
-- Minetest 0.4.6 mod: extranodes
-- namespace: technic
-- Boilerplate to support localized strings if intllib mod is installed.
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
-- MineClone2 support
local stone_sounds = nil
if minetest.get_modpath("mcl_sounds") then
stone_sounds = mcl_sounds.node_sound_stone_defaults()
else
stone_sounds = default.node_sound_stone_defaults()
end
wood_fence_ingrediant = nil
if minetest.get_modpath("mcl_core") then
wood_fence_ingrediant = "group:fence_wood"
else
wood_fence_ingrediant = "default:fence_wood"
end
if minetest.get_modpath("moreblocks") then
-- register stairsplus/circular_saw nodes
@ -20,7 +37,7 @@ if minetest.get_modpath("moreblocks") then
groups={cracky=3, not_in_creative_inventory=1},
tiles={"technic_marble_bricks.png"},
})
if not minetest.get_modpath("mcl_core") then
stairsplus:register_all("technic", "granite", "technic:granite", {
description=S("Granite"),
groups={cracky=1, not_in_creative_inventory=1},
@ -32,7 +49,7 @@ if minetest.get_modpath("moreblocks") then
groups={cracky=1, not_in_creative_inventory=1},
tiles={"technic_granite_bricks.png"},
})
end
stairsplus:register_all("technic", "concrete", "technic:concrete", {
description=S("Concrete"),
groups={cracky=3, not_in_creative_inventory=1},
@ -108,7 +125,9 @@ if minetest.get_modpath("moreblocks") then
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete")
register_technic_stairs_alias("stairsplus", "marble", "technic", "marble")
if not minetest.get_modpath("mcl_core") then
register_technic_stairs_alias("stairsplus", "granite", "technic", "granite")
end
register_technic_stairs_alias("stairsplus", "marble_bricks", "technic", "marble_bricks")
end
@ -120,7 +139,7 @@ local iclip_def = {
tiles = {"technic_insulator_clip.png"},
is_ground_content = false,
groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1 },
sounds = default.node_sound_stone_defaults(),
sounds = stone_sounds,
}
local iclipfence_def = {
@ -154,7 +173,7 @@ local iclipfence_def = {
},
connects_to = {"group:fence", "group:wood", "group:tree"},
groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1 },
sounds = default.node_sound_stone_defaults(),
sounds = stone_sounds,
}
local sclip_tex = {
@ -182,7 +201,7 @@ local sclip_def = {
paramtype = "light",
paramtype2 = "wallmounted",
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),
sounds = stone_sounds,
groups = { choppy=1, cracky=1 },
backface_culling = false
}
@ -214,21 +233,36 @@ end
minetest.register_node(":technic:insulator_clip", iclip_def)
minetest.register_node(":technic:insulator_clip_fencepost", iclipfence_def)
-- MineClone2 support
local stone_ingrediant = nil
local white_dye_ingrediant = nil
local fence_ingrediant = nil
if minetest.get_modpath("mcl_core") then
stone_ingrediant = "mcl_core:stone"
white_dye_ingrediant = "mcl_dye:white"
fence_ingrediant = "group:fence"
else
stone_ingrediant = "default:stone"
white_dye_ingrediant = "dye:white"
fence_ingrediant = "default:fence_wood"
end
minetest.register_craft({
output = "technic:insulator_clip",
recipe = {
{ "", "dye:white", ""},
{ "", white_dye_ingrediant, ""},
{ "", "technic:raw_latex", ""},
{ "technic:raw_latex", "default:stone", "technic:raw_latex"},
{ "technic:raw_latex", stone_ingrediant, "technic:raw_latex"},
}
})
minetest.register_craft({
output = "technic:insulator_clip_fencepost 2",
recipe = {
{ "", "dye:white", ""},
{ "", white_dye_ingrediant, ""},
{ "", "technic:raw_latex", ""},
{ "technic:raw_latex", "default:fence_wood", "technic:raw_latex"},
{ "technic:raw_latex", wood_fence_ingrediant, "technic:raw_latex"},
}
})

View File

@ -1,3 +1,4 @@
name = extranodes
depends = default, technic_worldgen, basic_materials, concrete
optional_depends = unifieddyes, intllib, moreblocks, steel, streetsmod
depends = technic_worldgen, basic_materials, concrete
optional_depends = unifieddyes, intllib, moreblocks, steel, streetsmod, default, mcl_core, mcl_sounds
supported_games = minetest_game,mineclone2