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

@ -19,7 +19,7 @@ if technic_cnc.use_technic then
minetest.register_craft({
output = 'technic:cnc',
recipe = {
{'default:glass', 'technic:diamond_drill_head', 'default:glass'},
{glass_ingrediant, 'technic:diamond_drill_head', glass_ingrediant},
{'technic:control_logic_unit', 'technic:machine_casing', 'basic_materials:motor'},
{'technic:carbon_steel_ingot', 'technic:lv_cable', 'technic:carbon_steel_ingot'},
},
@ -34,9 +34,9 @@ else
minetest.register_craft({
output = 'technic:cnc',
recipe = {
{'default:glass', 'default:diamond', 'default:glass'},
{glass_ingrediant, diamond_ingrediant, glass_ingrediant},
{'basic_materials:ic', 'default:steelblock', 'basic_materials:motor'},
{'default:steel_ingot', 'default:mese', 'default:steel_ingot'},
{'default:steel_ingot', mese_block_ingrediant, 'default:steel_ingot'},
},
})

View File

@ -1,131 +1,130 @@
-- REGISTER MATERIALS AND PROPERTIES FOR NONCUBIC ELEMENTS:
-----------------------------------------------------------
local S = technic_cnc.getter
-- Conditional variables for MineClone2 compatibility
local is_mcl = minetest.get_modpath("mcl_core")
-- Textures and names for MineClone2
local dirt_texture = is_mcl and "default_dirt.png" or "default_dirt.png"
local grass_texture = is_mcl and "default_grass.png" or "default_grass.png"
local wood_texture = is_mcl and "default_wood.png" or "default_wood.png"
local stone_texture = is_mcl and "default_stone.png" or "default_stone.png"
local cobble_texture = is_mcl and "default_cobble.png" or "default_cobble.png"
local brick_texture = is_mcl and "default_brick.png" or "default_brick.png"
local sandstone_texture = is_mcl and "default_sandstone.png" or "default_sandstone.png"
local leaves_texture = is_mcl and "default_leaves.png" or "default_leaves.png"
local tree_texture = is_mcl and "default_tree.png" or "default_tree.png"
local bronzeblock_texture = is_mcl and "mcl_core_bronze_block.png" or "default_bronze_block.png"
-- DIRT
-------
technic_cnc.register_all("default:dirt",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
{"default_dirt.png"},
S("Dirt"))
technic_cnc.register_all(is_mcl and "mcl_core:dirt" or "default:dirt",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
{dirt_texture},
S("Dirt"))
-- (DIRT WITH) GRASS
--------------------
technic_cnc.register_all("default:dirt_with_grass",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
{"default_grass.png"},
S("Grassy dirt"))
technic_cnc.register_all(is_mcl and "mcl_core:dirt_with_grass" or "default:dirt_with_grass",
{snappy=2,choppy=2,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
{grass_texture},
S("Grassy dirt"))
-- WOOD
-------
technic_cnc.register_all("default:wood",
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
{"default_wood.png"},
S("Wooden"))
technic_cnc.register_all(is_mcl and "mcl_core:wood" or "default:wood",
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
{wood_texture},
S("Wooden"))
-- STONE
--------
technic_cnc.register_all("default:stone",
{cracky=3, not_in_creative_inventory=1},
{"default_stone.png"},
S("Stone"))
technic_cnc.register_all(is_mcl and "mcl_core:stone" or "default:stone",
{cracky=3, not_in_creative_inventory=1},
{stone_texture},
S("Stone"))
-- COBBLE
---------
technic_cnc.register_all("default:cobble",
{cracky=3, not_in_creative_inventory=1},
{"default_cobble.png"},
S("Cobble"))
technic_cnc.register_all(is_mcl and "mcl_core:cobble" or "default:cobble",
{cracky=3, not_in_creative_inventory=1},
{cobble_texture},
S("Cobble"))
-- BRICK
--------
technic_cnc.register_all("default:brick",
{cracky=3, not_in_creative_inventory=1},
{"default_brick.png"},
S("Brick"))
technic_cnc.register_all(is_mcl and "mcl_core:brick" or "default:brick",
{cracky=3, not_in_creative_inventory=1},
{brick_texture},
S("Brick"))
-- SANDSTONE
------------
technic_cnc.register_all("default:sandstone",
{crumbly=2, cracky=3, not_in_creative_inventory=1},
{"default_sandstone.png"},
S("Sandstone"))
technic_cnc.register_all(is_mcl and "mcl_core:sandstone" or "default:sandstone",
{crumbly=2, cracky=3, not_in_creative_inventory=1},
{sandstone_texture},
S("Sandstone"))
-- LEAVES
---------
technic_cnc.register_all("default:leaves",
{snappy=2, choppy=2, oddly_breakable_by_hand=3, not_in_creative_inventory=1},
{"default_leaves.png"},
S("Leaves"))
technic_cnc.register_all(is_mcl and "mcl_core:leaves" or "default:leaves",
{snappy=2, choppy=2, oddly_breakable_by_hand=3, not_in_creative_inventory=1},
{leaves_texture},
S("Leaves"))
-- TREE
-------
technic_cnc.register_all("default:tree",
{snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, wood=1, not_in_creative_inventory=1},
{"default_tree.png"},
S("Tree"))
technic_cnc.register_all(is_mcl and "mcl_core:tree" or "default:tree",
{snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, wood=1, not_in_creative_inventory=1},
{tree_texture},
S("Tree"))
-- Bronze
--------
technic_cnc.register_all("default:bronzeblock",
{cracky=1, level=2, not_in_creative_inventory=1},
{"default_bronze_block.png"},
S("Bronze"))
if not is_mcl then
technic_cnc.register_all("default:bronzeblock",
{cracky=1, level=2, not_in_creative_inventory=1},
{bronzeblock_texture},
S("Bronze"))
end
local steeltex = "default_steel_block.png"
local steelname = "Steel"
local steeltex = is_mcl and "default_steel_block.png" or "default_steel_block.png"
local steelname = is_mcl and "Iron" or "Steel"
if technic_cnc.technic_modpath then
steeltex = "technic_wrought_iron_block.png"
steelname = "Wrought Iron"
if not is_mcl then
steeltex = "technic_wrought_iron_block.png"
steelname = "Wrought Iron"
-- Stainless Steel
--------
technic_cnc.register_all("technic:stainless_steel_block",
{cracky=1, level=2, not_in_creative_inventory=1},
{"technic_stainless_steel_block.png"},
S("Stainless Steel"))
-- Stainless Steel
technic_cnc.register_all("technic:stainless_steel_block",
{cracky=1, level=2, not_in_creative_inventory=1},
{"technic_stainless_steel_block.png"},
S("Stainless Steel"))
-- Marble
------------
technic_cnc.register_all("technic:marble",
{cracky=3, not_in_creative_inventory=1},
{"technic_marble.png"},
S("Marble"))
-- Marble
technic_cnc.register_all("technic:marble",
{cracky=3, not_in_creative_inventory=1},
{"technic_marble.png"},
S("Marble"))
-- Granite
------------
technic_cnc.register_all("technic:granite",
{cracky=1, not_in_creative_inventory=1},
{"technic_granite.png"},
S("Granite"))
-- Blast-resistant concrete
---------------------------
technic_cnc.register_all("technic:blast_resistant_concrete",
{cracky=2, level=2, not_in_creative_inventory=1},
{"technic_blast_resistant_concrete_block.png"},
S("Blast-resistant concrete"))
-- Blast-resistant concrete
technic_cnc.register_all("technic:blast_resistant_concrete",
{cracky=2, level=2, not_in_creative_inventory=1},
{"technic_blast_resistant_concrete_block.png"},
S("Blast-resistant concrete"))
end
end
-- STEEL
---------------
technic_cnc.register_all("default:steelblock",
{cracky=1, level=2, not_in_creative_inventory=1},
{steeltex},
S(steelname))
technic_cnc.register_all(is_mcl and "mcl_core:iron_block" or "default:steelblock",
{cracky=1, level=2, not_in_creative_inventory=1},
{steeltex},
S(steelname))
-- CONCRETE AND CEMENT
----------------------
if minetest.get_modpath("basic_materials") then
technic_cnc.register_all("basic_materials:concrete_block",
{cracky=2, level=2, not_in_creative_inventory=1},
{"basic_materials_concrete_block.png"},
S("Concrete"))
technic_cnc.register_all("basic_materials:concrete_block",
{cracky=2, level=2, not_in_creative_inventory=1},
{"basic_materials_concrete_block.png"},
S("Concrete"))
technic_cnc.register_all("basic_materials:cement_block",
{cracky=2, level=2, not_in_creative_inventory=1},
{"basic_materials_cement_block.png"},
S("Cement"))
technic_cnc.register_all("basic_materials:cement_block",
{cracky=2, level=2, not_in_creative_inventory=1},
{"basic_materials_cement_block.png"},
S("Cement"))
technic_cnc.register_all("basic_materials:brass_block",
{cracky=1, level=2, not_in_creative_inventory=1},
{"basic_materials_brass_block.png"},
S("Brass block"))
technic_cnc.register_all("basic_materials:brass_block",
{cracky=1, level=2, not_in_creative_inventory=1},
{"basic_materials_brass_block.png"},
S("Brass block"))
end

View File

@ -1,3 +1,4 @@
name = technic_cnc
depends = default, basic_materials
optional_depends = technic
depends = basic_materials
optional_depends = technic, default, mcl_core
supported_games = minetest_game,mineclone2