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

@ -4,6 +4,21 @@
local technic = rawget(_G, "technic") or {}
technic.concrete_posts = {}
-- Mineclone2 Support
local stone_ingrediant = nil
if minetest.get_modpath("mcl_core") then
stone_ingrediant = "mcl_core:stone"
else
stone_ingrediant = "default:stone"
end
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
-- Boilerplate to support localized strings if intllib mod is installed.
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
@ -26,9 +41,9 @@ minetest.register_craft({
minetest.register_craft({
output = 'technic:concrete_post 12',
recipe = {
{'default:stone','basic_materials:steel_bar','default:stone'},
{'default:stone','basic_materials:steel_bar','default:stone'},
{'default:stone','basic_materials:steel_bar','default:stone'},
{stone_ingrediant,'basic_materials:steel_bar',stone_ingrediant},
{stone_ingrediant,'basic_materials:steel_bar',stone_ingrediant},
{stone_ingrediant,'basic_materials:steel_bar',stone_ingrediant},
}
})
@ -45,7 +60,7 @@ minetest.register_node(":technic:blast_resistant_concrete", {
description = S("Blast-resistant Concrete Block"),
tiles = {"technic_blast_resistant_concrete_block.png",},
groups = {cracky=1, level=3, concrete=1},
sounds = default.node_sound_stone_defaults(),
sounds = stone_sounds,
on_blast = function(pos, intensity)
if intensity > 9 then
minetest.remove_node(pos)
@ -80,7 +95,7 @@ minetest.register_node(":technic:concrete_post_platform", {
description = S("Concrete Post Platform"),
tiles = {"basic_materials_concrete_block.png",},
groups={cracky=1, level=2},
sounds = default.node_sound_stone_defaults(),
sounds = stone_sounds,
paramtype = "light",
drawtype = "nodebox",
node_box = {
@ -112,7 +127,7 @@ for platform = 0, 1 do
description = S("Concrete Post"),
tiles = {"basic_materials_concrete_block.png"},
groups = {cracky=1, level=2, concrete_post=1, not_in_creative_inventory=platform},
sounds = default.node_sound_stone_defaults(),
sounds = stone_sounds,
drop = (platform == 1 and "technic:concrete_post_platform" or
"technic:concrete_post"),
paramtype = "light",

View File

@ -1,3 +1,3 @@
name = concrete
depends = default
optional_depends = basic_materials, intllib, moreblocks
optional_depends = basic_materials, intllib, moreblocks, default
supported_games = minetest_game,mineclone2