This commit is contained in:
James Clarke 2024-01-29 17:55:40 +01:00 committed by GitHub
commit 5040fd0ac0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
87 changed files with 1517 additions and 795 deletions

View File

@ -31,7 +31,9 @@ read_globals = {
"protector", "isprotect", "protector", "isprotect",
"homedecor_expect_infinite_stacks", "homedecor_expect_infinite_stacks",
"craftguide", "i3" "craftguide", "i3",
"mcl_sounds","mcl_core",
"mcl_craftguide"
} }
-- Loop warning -- Loop warning

View File

@ -1,11 +1,32 @@
--Minetest 0.4.7 mod: concrete --Minetest 0.4.7 mod: concrete
--(c) 2013 by RealBadAngel <mk@realbadangel.pl> --(c) 2013 by RealBadAngel <mk@realbadangel.pl>
-- Boilerplate to support localized strings if intllib mod is installed.
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
local technic = rawget(_G, "technic") or {} local technic = rawget(_G, "technic") or {}
technic.concrete_posts = {} technic.concrete_posts = {}
-- Boilerplate to support localized strings if intllib mod is installed. -- Check if mcl_core or default is installed
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end if not minetest.get_modpath("mcl_core") and not minetest.get_modpath("default") then
error(S(minetest.get_current_modname()).." "..S("requires mcl_core or default to be installed (please install MTG or MCL2, or compatible games)"))
end
-- Mineclone2 Support
if minetest.get_modpath("mcl_core") then
stone_ingredient = "mcl_core:stone"
else
stone_ingredient = "default:stone"
end
if minetest.get_modpath("mcl_sounds") then
stone_sounds = mcl_sounds.node_sound_stone_defaults()
else
stone_sounds = default.node_sound_stone_defaults()
end
for i = 0, 31 do for i = 0, 31 do
minetest.register_alias("technic:concrete_post"..i, minetest.register_alias("technic:concrete_post"..i,
@ -26,9 +47,9 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = 'technic:concrete_post 12', output = 'technic:concrete_post 12',
recipe = { recipe = {
{'default:stone','basic_materials:steel_bar','default:stone'}, {stone_ingredient,'basic_materials:steel_bar',stone_ingredient},
{'default:stone','basic_materials:steel_bar','default:stone'}, {stone_ingredient,'basic_materials:steel_bar',stone_ingredient},
{'default:stone','basic_materials:steel_bar','default:stone'}, {stone_ingredient,'basic_materials:steel_bar',stone_ingredient},
} }
}) })
@ -45,7 +66,7 @@ minetest.register_node(":technic:blast_resistant_concrete", {
description = S("Blast-resistant Concrete Block"), description = S("Blast-resistant Concrete Block"),
tiles = {"technic_blast_resistant_concrete_block.png",}, tiles = {"technic_blast_resistant_concrete_block.png",},
groups = {cracky=1, level=3, concrete=1}, groups = {cracky=1, level=3, concrete=1},
sounds = default.node_sound_stone_defaults(), sounds = stone_sounds,
on_blast = function(pos, intensity) on_blast = function(pos, intensity)
if intensity > 9 then if intensity > 9 then
minetest.remove_node(pos) minetest.remove_node(pos)
@ -80,7 +101,7 @@ minetest.register_node(":technic:concrete_post_platform", {
description = S("Concrete Post Platform"), description = S("Concrete Post Platform"),
tiles = {"basic_materials_concrete_block.png",}, tiles = {"basic_materials_concrete_block.png",},
groups={cracky=1, level=2}, groups={cracky=1, level=2},
sounds = default.node_sound_stone_defaults(), sounds = stone_sounds,
paramtype = "light", paramtype = "light",
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
@ -112,7 +133,7 @@ for platform = 0, 1 do
description = S("Concrete Post"), description = S("Concrete Post"),
tiles = {"basic_materials_concrete_block.png"}, tiles = {"basic_materials_concrete_block.png"},
groups = {cracky=1, level=2, concrete_post=1, not_in_creative_inventory=platform}, 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 drop = (platform == 1 and "technic:concrete_post_platform" or
"technic:concrete_post"), "technic:concrete_post"),
paramtype = "light", paramtype = "light",

View File

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

View File

@ -1,8 +1,29 @@
-- Minetest 0.4.6 mod: extranodes -- Minetest 0.4.6 mod: extranodes
-- namespace: technic -- namespace: technic
-- Boilerplate to support localized strings if intllib mod is installed. -- Boilerplate to support localized strings if intllib mod is installed.
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
-- Check if mcl_core or default is installed
if not minetest.get_modpath("mcl_core") and not minetest.get_modpath("default") then
error(S(minetest.get_current_modname()).." "..S("requires mcl_core or default to be installed (please install MTG or MCL2, or compatible games)"))
end
-- MineClone2 support
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_ingredient = nil
if minetest.get_modpath("mcl_core") then
wood_fence_ingredient = "group:fence_wood"
else
wood_fence_ingredient = "default:fence_wood"
end
if minetest.get_modpath("moreblocks") then if minetest.get_modpath("moreblocks") then
-- register stairsplus/circular_saw nodes -- register stairsplus/circular_saw nodes
@ -20,7 +41,7 @@ if minetest.get_modpath("moreblocks") then
groups={cracky=3, not_in_creative_inventory=1}, groups={cracky=3, not_in_creative_inventory=1},
tiles={"technic_marble_bricks.png"}, tiles={"technic_marble_bricks.png"},
}) })
if not minetest.get_modpath("mcl_core") then
stairsplus:register_all("technic", "granite", "technic:granite", { stairsplus:register_all("technic", "granite", "technic:granite", {
description=S("Granite"), description=S("Granite"),
groups={cracky=1, not_in_creative_inventory=1}, groups={cracky=1, not_in_creative_inventory=1},
@ -32,7 +53,7 @@ if minetest.get_modpath("moreblocks") then
groups={cracky=1, not_in_creative_inventory=1}, groups={cracky=1, not_in_creative_inventory=1},
tiles={"technic_granite_bricks.png"}, tiles={"technic_granite_bricks.png"},
}) })
end
stairsplus:register_all("technic", "concrete", "technic:concrete", { stairsplus:register_all("technic", "concrete", "technic:concrete", {
description=S("Concrete"), description=S("Concrete"),
groups={cracky=3, not_in_creative_inventory=1}, groups={cracky=3, not_in_creative_inventory=1},
@ -108,7 +129,9 @@ if minetest.get_modpath("moreblocks") then
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete") register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete")
register_technic_stairs_alias("stairsplus", "marble", "technic", "marble") register_technic_stairs_alias("stairsplus", "marble", "technic", "marble")
register_technic_stairs_alias("stairsplus", "granite", "technic", "granite") 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") register_technic_stairs_alias("stairsplus", "marble_bricks", "technic", "marble_bricks")
end end
@ -120,7 +143,7 @@ local iclip_def = {
tiles = {"technic_insulator_clip.png"}, tiles = {"technic_insulator_clip.png"},
is_ground_content = false, is_ground_content = false,
groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1 }, groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1 },
sounds = default.node_sound_stone_defaults(), sounds = stone_sounds,
} }
local iclipfence_def = { local iclipfence_def = {
@ -154,7 +177,7 @@ local iclipfence_def = {
}, },
connects_to = {"group:fence", "group:wood", "group:tree"}, connects_to = {"group:fence", "group:wood", "group:tree"},
groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1 }, groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1 },
sounds = default.node_sound_stone_defaults(), sounds = stone_sounds,
} }
local sclip_tex = { local sclip_tex = {
@ -182,7 +205,7 @@ local sclip_def = {
paramtype = "light", paramtype = "light",
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
is_ground_content = false, is_ground_content = false,
sounds = default.node_sound_stone_defaults(), sounds = stone_sounds,
groups = { choppy=1, cracky=1 }, groups = { choppy=1, cracky=1 },
backface_culling = false backface_culling = false
} }
@ -214,21 +237,33 @@ end
minetest.register_node(":technic:insulator_clip", iclip_def) minetest.register_node(":technic:insulator_clip", iclip_def)
minetest.register_node(":technic:insulator_clip_fencepost", iclipfence_def) minetest.register_node(":technic:insulator_clip_fencepost", iclipfence_def)
-- MineClone2 support
if minetest.get_modpath("mcl_core") then
stone_ingredient = "mcl_core:stone"
white_dye_ingredient = "mcl_dye:white"
fence_ingredient = "group:fence"
else
stone_ingredient = "default:stone"
white_dye_ingredient = "dye:white"
fence_ingredient = "default:fence_wood"
end
minetest.register_craft({ minetest.register_craft({
output = "technic:insulator_clip", output = "technic:insulator_clip",
recipe = { recipe = {
{ "", "dye:white", ""}, { "", white_dye_ingredient, ""},
{ "", "technic:raw_latex", ""}, { "", "technic:raw_latex", ""},
{ "technic:raw_latex", "default:stone", "technic:raw_latex"}, { "technic:raw_latex", stone_ingredient, "technic:raw_latex"},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "technic:insulator_clip_fencepost 2", output = "technic:insulator_clip_fencepost 2",
recipe = { recipe = {
{ "", "dye:white", ""}, { "", white_dye_ingredient, ""},
{ "", "technic:raw_latex", ""}, { "", "technic:raw_latex", ""},
{ "technic:raw_latex", "default:fence_wood", "technic:raw_latex"}, { "technic:raw_latex", wood_fence_ingredient, "technic:raw_latex"},
} }
}) })

View File

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

View File

@ -38,9 +38,9 @@ if pipeworks.enable_teleport_tube then
minetest.register_craft({ minetest.register_craft({
output = 'pipeworks:teleport_tube_1', output = 'pipeworks:teleport_tube_1',
recipe = { recipe = {
{'default:mese_crystal', 'technic:copper_coil', 'default:mese_crystal'}, {technic_compat.mese_crystal_ingredient, 'technic:copper_coil', technic_compat.mese_crystal_ingredient},
{'pipeworks:tube_1', 'technic:control_logic_unit', 'pipeworks:tube_1'}, {'pipeworks:tube_1', 'technic:control_logic_unit', 'pipeworks:tube_1'},
{'default:mese_crystal', 'technic:copper_coil', 'default:mese_crystal'}, {technic_compat.mese_crystal_ingredient, 'technic:copper_coil', technic_compat.mese_crystal_ingredient},
} }
}) })
end end
@ -62,36 +62,36 @@ minetest.register_craft( {
minetest.register_craft({ minetest.register_craft({
output = 'technic:diamond_drill_head', output = 'technic:diamond_drill_head',
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'default:diamond', 'technic:stainless_steel_ingot'}, {'technic:stainless_steel_ingot', technic_compat.diamond_ingredient, 'technic:stainless_steel_ingot'},
{'default:diamond', '', 'default:diamond'}, {technic_compat.diamond_ingredient, '', technic_compat.diamond_ingredient},
{'technic:stainless_steel_ingot', 'default:diamond', 'technic:stainless_steel_ingot'}, {'technic:stainless_steel_ingot', technic_compat.diamond_ingredient, 'technic:stainless_steel_ingot'},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:green_energy_crystal', output = 'technic:green_energy_crystal',
recipe = { recipe = {
{'default:gold_ingot', 'technic:battery', 'dye:green'}, {technic_compat.gold_ingot_ingredient, 'technic:battery', technic_compat.green_dye_ingredient},
{'technic:battery', 'technic:red_energy_crystal', 'technic:battery'}, {'technic:battery', 'technic:red_energy_crystal', 'technic:battery'},
{'dye:green', 'technic:battery', 'default:gold_ingot'}, {technic_compat.green_dye_ingredient, 'technic:battery', technic_compat.gold_ingot_ingredient},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:blue_energy_crystal', output = 'technic:blue_energy_crystal',
recipe = { recipe = {
{'moreores:mithril_ingot', 'technic:battery', 'dye:blue'}, {'moreores:mithril_ingot', 'technic:battery', technic_compat.blue_dye_ingredient},
{'technic:battery', 'technic:green_energy_crystal', 'technic:battery'}, {'technic:battery', 'technic:green_energy_crystal', 'technic:battery'},
{'dye:blue', 'technic:battery', 'moreores:mithril_ingot'}, {technic_compat.blue_dye_ingredient, 'technic:battery', 'moreores:mithril_ingot'},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:red_energy_crystal', output = 'technic:red_energy_crystal',
recipe = { recipe = {
{'moreores:silver_ingot', 'technic:battery', 'dye:red'}, {'moreores:silver_ingot', 'technic:battery', technic_compat.red_dye_ingredient},
{'technic:battery', 'basic_materials:energy_crystal_simple', 'technic:battery'}, {'technic:battery', 'basic_materials:energy_crystal_simple', 'technic:battery'},
{'dye:red', 'technic:battery', 'moreores:silver_ingot'}, {technic_compat.red_dye_ingredient, 'technic:battery', 'moreores:silver_ingot'},
} }
}) })
@ -143,7 +143,7 @@ minetest.register_craft({
output = 'technic:control_logic_unit', output = 'technic:control_logic_unit',
recipe = { recipe = {
{'', 'basic_materials:gold_wire', ''}, {'', 'basic_materials:gold_wire', ''},
{'default:copper_ingot', 'technic:silicon_wafer', 'default:copper_ingot'}, {technic_compat.copper_ingredient, 'technic:silicon_wafer', technic_compat.copper_ingredient},
{'', 'technic:chromium_ingot', ''}, {'', 'technic:chromium_ingot', ''},
}, },
replacements = { {"basic_materials:gold_wire", "basic_materials:empty_spool"}, }, replacements = { {"basic_materials:gold_wire", "basic_materials:empty_spool"}, },
@ -153,8 +153,8 @@ minetest.register_craft({
output = 'technic:mixed_metal_ingot 9', output = 'technic:mixed_metal_ingot 9',
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot'}, {'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot'},
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'}, {technic_compat.bronze_ingredient, technic_compat.bronze_ingredient, technic_compat.bronze_ingredient},
{'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'}, {technic_compat.tin_ingredient, technic_compat.tin_ingredient, technic_compat.tin_ingredient},
} }
}) })
@ -175,7 +175,7 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "default:dirt 2", output = technic_compat.dirt_ingredient.." 2",
type = "shapeless", type = "shapeless",
replacements = {{"bucket:bucket_water","bucket:bucket_empty"}}, replacements = {{"bucket:bucket_water","bucket:bucket_empty"}},
recipe = { recipe = {
@ -191,14 +191,14 @@ minetest.register_craft({
type = "shapeless", type = "shapeless",
recipe = { recipe = {
"technic:raw_latex", "technic:raw_latex",
"default:coal_lump", technic_compat.coal_ingredient,
"default:coal_lump", technic_compat.coal_ingredient,
"default:coal_lump", technic_compat.coal_ingredient,
"default:coal_lump", technic_compat.coal_ingredient,
"default:coal_lump", technic_compat.coal_ingredient,
"default:coal_lump", technic_compat.coal_ingredient,
"default:coal_lump", technic_compat.coal_ingredient,
"default:coal_lump", technic_compat.coal_ingredient,
}, },
}) })
@ -207,3 +207,11 @@ minetest.register_craft({
type = "cooking", type = "cooking",
recipe = "technic:rubber_goo", recipe = "technic:rubber_goo",
}) })
if minetest.get_modpath("mcl_core") then
minetest.register_craft({
output = "technic:raw_latex",
type = "cooking",
recipe = "mcl_mobitems:slimeball",
})
end

View File

@ -1,11 +1,17 @@
-- namespace: technic -- namespace: technic
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl> -- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl>
if not minetest.get_translator then if not minetest.get_translator then
error("[technic] Your Minetest version is no longer supported." error("[technic] Your Minetest version is no longer supported."
.. " (version < 5.0.0)") .. " (version < 5.0.0)")
end end
local load_start = os.clock() local load_start = os.clock()
technic = rawget(_G, "technic") or {} technic = rawget(_G, "technic") or {}
@ -34,6 +40,11 @@ else
end end
local S = technic.getter local S = technic.getter
-- Check if mcl_core or default is installed
if not minetest.get_modpath("mcl_core") and not minetest.get_modpath("default") then
error(S(minetest.get_current_modname()).." "..S("requires mcl_core or default to be installed (please install MTG or MCL2, or compatible games)"))
end
-- Read configuration file -- Read configuration file
dofile(modpath.."/config.lua") dofile(modpath.."/config.lua")

View File

@ -131,7 +131,7 @@ minetest.register_node("technic:machine_casing", {
paramtype = "light", paramtype = "light",
drawtype = "allfaces", drawtype = "allfaces",
tiles = {"technic_machine_casing.png"}, tiles = {"technic_machine_casing.png"},
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
}) })
minetest.register_craftitem("technic:rubber_goo", { minetest.register_craftitem("technic:rubber_goo", {
@ -188,7 +188,7 @@ for p = 0, 35 do
is_ground_content = true, is_ground_content = true,
groups = {uranium_block=1, not_in_creative_inventory=nici, groups = {uranium_block=1, not_in_creative_inventory=nici,
cracky=1, level=2, radioactive=radioactivity}, cracky=1, level=2, radioactive=radioactivity},
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
}); });
if not ov then if not ov then
minetest.register_craft({ minetest.register_craft({

View File

@ -17,9 +17,9 @@ local cable_entry = "^technic_cable_connection_overlay.png"
minetest.register_craft({ minetest.register_craft({
output = "technic:forcefield_emitter_off", output = "technic:forcefield_emitter_off",
recipe = { recipe = {
{"default:mese", "basic_materials:motor", "default:mese" }, {technic_compat.mese_block_ingredient, "basic_materials:motor", technic_compat.mese_block_ingredient},
{"technic:deployer_off", "technic:machine_casing", "technic:deployer_off"}, {"technic:deployer_off", "technic:machine_casing", "technic:deployer_off"},
{"default:mese", "technic:hv_cable", "default:mese" }, {technic_compat.mese_block_ingredient, "technic:hv_cable", technic_compat.mese_block_ingredient},
} }
}) })
@ -295,7 +295,7 @@ minetest.register_node("technic:forcefield_emitter_off", {
"technic_forcefield_emitter_off.png", "technic_forcefield_emitter_off.png",
"technic_forcefield_emitter_off.png" "technic_forcefield_emitter_off.png"
}, },
groups = {cracky = 1, technic_machine = 1, technic_hv = 1}, groups = {cracky = 1, technic_machine = 1, technic_hv = 1,pickaxey=3},
on_receive_fields = forcefield_receive_fields, on_receive_fields = forcefield_receive_fields,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -314,6 +314,10 @@ minetest.register_node("technic:forcefield_emitter_off", {
mesecons = mesecons, mesecons = mesecons,
digiline = digiline_def, digiline = digiline_def,
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:forcefield_emitter_on", { minetest.register_node("technic:forcefield_emitter_on", {
@ -327,7 +331,7 @@ minetest.register_node("technic:forcefield_emitter_on", {
"technic_forcefield_emitter_on.png" "technic_forcefield_emitter_on.png"
}, },
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, groups = {cracky = 1, technic_machine = 1, technic_hv = 1,
not_in_creative_inventory=1}, not_in_creative_inventory=1,pickaxey=3},
drop = "technic:forcefield_emitter_off", drop = "technic:forcefield_emitter_off",
on_receive_fields = forcefield_receive_fields, on_receive_fields = forcefield_receive_fields,
on_destruct = function(pos) on_destruct = function(pos)
@ -346,6 +350,10 @@ minetest.register_node("technic:forcefield_emitter_on", {
minetest.dig_node(pos) minetest.dig_node(pos)
return {"technic:forcefield_emitter_off"} return {"technic:forcefield_emitter_off"}
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:forcefield", { minetest.register_node("technic:forcefield", {
@ -354,7 +362,7 @@ minetest.register_node("technic:forcefield", {
drawtype = "glasslike", drawtype = "glasslike",
groups = {not_in_creative_inventory=1}, groups = {not_in_creative_inventory=1},
paramtype = "light", paramtype = "light",
light_source = default.LIGHT_MAX, light_source = technic_compat.mt_light_max,
diggable = false, diggable = false,
drop = '', drop = '',
tiles = {{ tiles = {{

View File

@ -24,7 +24,7 @@ local cable_entry = "^technic_cable_connection_overlay.png"
minetest.register_craft({ minetest.register_craft({
output = 'technic:hv_nuclear_reactor_core', output = 'technic:hv_nuclear_reactor_core',
recipe = { recipe = {
{'technic:carbon_plate', 'default:obsidian_glass', 'technic:carbon_plate'}, {'technic:carbon_plate', technic_compat.obsidian_glass_ingredient, 'technic:carbon_plate'},
{'technic:composite_plate', 'technic:machine_casing', 'technic:composite_plate'}, {'technic:composite_plate', 'technic:machine_casing', 'technic:composite_plate'},
{'technic:stainless_steel_ingot', 'technic:hv_cable', 'technic:stainless_steel_ingot'}, {'technic:stainless_steel_ingot', 'technic:hv_cable', 'technic:stainless_steel_ingot'},
} }
@ -424,9 +424,9 @@ minetest.register_node("technic:hv_nuclear_reactor_core", {
}, },
drawtype = "mesh", drawtype = "mesh",
mesh = "technic_reactor.obj", mesh = "technic_reactor.obj",
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, digiline_remote_receive = 1}, groups = {cracky = 1, technic_machine = 1, technic_hv = 1, digiline_remote_receive = 1,pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
stack_max = 1, stack_max = 1,
@ -449,6 +449,10 @@ minetest.register_node("technic:hv_nuclear_reactor_core", {
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move, allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:hv_nuclear_reactor_core_active", { minetest.register_node("technic:hv_nuclear_reactor_core_active", {
@ -459,9 +463,9 @@ minetest.register_node("technic:hv_nuclear_reactor_core_active", {
drawtype = "mesh", drawtype = "mesh",
mesh = "technic_reactor.obj", mesh = "technic_reactor.obj",
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, radioactive = 4, groups = {cracky = 1, technic_machine = 1, technic_hv = 1, radioactive = 4,
not_in_creative_inventory = 1, digiline_remote_receive = 1}, not_in_creative_inventory = 1, digiline_remote_receive = 1,pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
drop = "technic:hv_nuclear_reactor_core", drop = "technic:hv_nuclear_reactor_core",
light_source = 14, light_source = 14,
paramtype = "light", paramtype = "light",
@ -499,6 +503,10 @@ minetest.register_node("technic:hv_nuclear_reactor_core_active", {
meta:set_int("burn_time", burn_time + 1) meta:set_int("burn_time", burn_time + 1)
return true return true
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("HV", "technic:hv_nuclear_reactor_core", technic.producer) technic.register_machine("HV", "technic:hv_nuclear_reactor_core", technic.producer)

View File

@ -229,6 +229,12 @@ local function send_move_error(player)
return 0 return 0
end end
if minetest.get_modpath("mcl_core") then
quarry_pick = "default_tool_diamondpick.png"
else
quarry_pick = "default_tool_mesepick.png"
end
minetest.register_node("technic:quarry", { minetest.register_node("technic:quarry", {
description = S("%s Quarry"):format("HV"), description = S("%s Quarry"):format("HV"),
tiles = { tiles = {
@ -236,11 +242,11 @@ minetest.register_node("technic:quarry", {
"technic_carbon_steel_block.png"..cable_entry, "technic_carbon_steel_block.png"..cable_entry,
"technic_carbon_steel_block.png"..cable_entry, "technic_carbon_steel_block.png"..cable_entry,
"technic_carbon_steel_block.png"..cable_entry, "technic_carbon_steel_block.png"..cable_entry,
"technic_carbon_steel_block.png^default_tool_mesepick.png", "technic_carbon_steel_block.png^"..quarry_pick,
"technic_carbon_steel_block.png"..cable_entry "technic_carbon_steel_block.png"..cable_entry
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {cracky=2, tubedevice=1, technic_machine=1, technic_hv=1}, groups = {cracky=2, tubedevice=1, technic_machine=1, technic_hv=1,pickaxey=3},
connect_sides = {"bottom", "front", "left", "right"}, connect_sides = {"bottom", "front", "left", "right"},
tube = { tube = {
connect_sides = {top = 1}, connect_sides = {top = 1},
@ -283,7 +289,11 @@ minetest.register_node("technic:quarry", {
end, end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player) allow_metadata_inventory_take = function(pos, listname, index, stack, player)
return send_move_error(player) return send_move_error(player)
end end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("HV", "technic:quarry", technic.receiver) technic.register_machine("HV", "technic:quarry", technic.receiver)

View File

@ -4,9 +4,9 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_alloy_furnace', output = 'technic:lv_alloy_furnace',
recipe = { recipe = {
{'default:brick', 'default:brick', 'default:brick'}, {technic_compat.brick_block_ingredient, technic_compat.brick_block_ingredient, technic_compat.brick_block_ingredient},
{'default:brick', 'technic:machine_casing', 'default:brick'}, {technic_compat.brick_block_ingredient, 'technic:machine_casing', technic_compat.brick_block_ingredient},
{'default:brick', 'technic:lv_cable', 'default:brick'}, {technic_compat.brick_block_ingredient, 'technic:lv_cable', technic_compat.brick_block_ingredient},
} }
}) })

View File

@ -4,9 +4,9 @@ minetest.register_alias("lv_cable", "technic:lv_cable")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_cable 6', output = 'technic:lv_cable 6',
recipe = { recipe = {
{'default:paper', 'default:paper', 'default:paper'}, {technic_compat.paper_ingredient, technic_compat.paper_ingredient, technic_compat.paper_ingredient},
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'}, {technic_compat.copper_ingredient, technic_compat.copper_ingredient, technic_compat.copper_ingredient},
{'default:paper', 'default:paper', 'default:paper'}, {technic_compat.paper_ingredient, technic_compat.paper_ingredient, technic_compat.paper_ingredient},
} }
}) })

View File

@ -4,7 +4,7 @@ minetest.register_alias("compressor", "technic:lv_compressor")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_compressor', output = 'technic:lv_compressor',
recipe = { recipe = {
{'default:stone', 'basic_materials:motor', 'default:stone'}, {technic_compat.stone_ingredient, 'basic_materials:motor', technic_compat.stone_ingredient},
{'mesecons:piston', 'technic:machine_casing', 'mesecons:piston'}, {'mesecons:piston', 'technic:machine_casing', 'mesecons:piston'},
{'basic_materials:silver_wire', 'technic:lv_cable', 'basic_materials:silver_wire'}, {'basic_materials:silver_wire', 'technic:lv_cable', 'basic_materials:silver_wire'},
}, },

View File

@ -3,11 +3,11 @@
-- FIXME: kpoppel I'd like to introduce an induction heating element here also -- FIXME: kpoppel I'd like to introduce an induction heating element here also
minetest.register_craft({ minetest.register_craft({
output = 'technic:electric_furnace', output = 'technic:lv_electric_furnace',
recipe = { recipe = {
{'default:cobble', 'default:cobble', 'default:cobble'}, {technic_compat.cobble_ingredient, technic_compat.cobble_ingredient, technic_compat.cobble_ingredient},
{'default:cobble', 'technic:machine_casing', 'default:cobble'}, {technic_compat.cobble_ingredient, 'technic:machine_casing', technic_compat.cobble_ingredient},
{'default:cobble', 'technic:lv_cable', 'default:cobble'}, {technic_compat.cobble_ingredient, 'technic:lv_cable', technic_compat.cobble_ingredient},
} }
}) })

View File

@ -8,9 +8,9 @@ minetest.register_alias("lv_generator", "technic:lv_generator")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_generator', output = 'technic:lv_generator',
recipe = { recipe = {
{'default:stone', 'default:furnace', 'default:stone'}, {technic_compat.stone_ingredient, technic_compat.furnace_ingredient, technic_compat.stone_ingredient},
{'default:stone', 'technic:machine_casing', 'default:stone'}, {technic_compat.stone_ingredient, 'technic:machine_casing', technic_compat.stone_ingredient},
{'default:stone', 'technic:lv_cable', 'default:stone'}, {technic_compat.stone_ingredient, 'technic:lv_cable', technic_compat.stone_ingredient},
} }
}) })

View File

@ -10,9 +10,9 @@ local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:geothermal', output = 'technic:geothermal',
recipe = { recipe = {
{'technic:granite', 'default:diamond', 'technic:granite'}, {technic_compat.granite_ingredient, technic_compat.diamond_ingredient, technic_compat.granite_ingredient},
{'basic_materials:copper_wire', 'technic:machine_casing', 'basic_materials:copper_wire'}, {'basic_materials:copper_wire', 'technic:machine_casing', 'basic_materials:copper_wire'},
{'technic:granite', 'technic:lv_cable', 'technic:granite'}, {technic_compat.granite_ingredient, 'technic:lv_cable', technic_compat.granite_ingredient},
}, },
replacements = { replacements = {
{"basic_materials:copper_wire", "basic_materials:empty_spool"}, {"basic_materials:copper_wire", "basic_materials:empty_spool"},
@ -26,8 +26,8 @@ minetest.register_craftitem("technic:geothermal", {
local check_node_around = function(pos) local check_node_around = function(pos)
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
if node.name == "default:water_source" or node.name == "default:water_flowing" then return 1 end if minetest.get_item_group(node.name, "water") == 3 and (string.find(node.name, "flowing") or string.find(node.name, "source")) then return 1 end
if node.name == "default:lava_source" or node.name == "default:lava_flowing" then return 2 end if minetest.get_item_group(node.name, "lava") == 3 and (string.find(node.name, "flowing") or string.find(node.name, "source")) then return 2 end
return 0 return 0
end end
@ -87,16 +87,20 @@ minetest.register_node("technic:geothermal", {
tiles = {"technic_geothermal_top.png", "technic_machine_bottom.png", "technic_geothermal_side.png", tiles = {"technic_geothermal_top.png", "technic_machine_bottom.png", "technic_geothermal_side.png",
"technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"}, "technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1}, technic_machine=1, technic_lv=1, pickaxey=3},
paramtype2 = "facedir", paramtype2 = "facedir",
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Geothermal %s Generator"):format("LV")) meta:set_string("infotext", S("Geothermal %s Generator"):format("LV"))
meta:set_int("LV_EU_supply", 0) meta:set_int("LV_EU_supply", 0)
end, end,
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:geothermal_active", { minetest.register_node("technic:geothermal_active", {
@ -105,11 +109,15 @@ minetest.register_node("technic:geothermal_active", {
"technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"}, "technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, not_in_creative_inventory=1}, technic_machine=1, technic_lv=1, not_in_creative_inventory=1, pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
drop = "technic:geothermal", drop = "technic:geothermal",
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("LV", "technic:geothermal", technic.producer) technic.register_machine("LV", "technic:geothermal", technic.producer)

View File

@ -3,9 +3,9 @@ minetest.register_alias("grinder", "technic:lv_grinder")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_grinder', output = 'technic:lv_grinder',
recipe = { recipe = {
{'default:desert_stone', 'default:diamond', 'default:desert_stone'}, {technic_compat.desert_stone_ingredient, technic_compat.diamond_ingredient, technic_compat.desert_stone_ingredient},
{'default:desert_stone', 'technic:machine_casing', 'default:desert_stone'}, {technic_compat.desert_stone_ingredient, 'technic:machine_casing', technic_compat.desert_stone_ingredient},
{'technic:granite', 'technic:lv_cable', 'technic:granite'}, {technic_compat.granite_ingredient, 'technic:lv_cable', technic_compat.granite_ingredient},
} }
}) })

View File

@ -26,7 +26,11 @@ minetest.register_node("technic:dummy_light_source", {
diggable = false, diggable = false,
pointable = false, pointable = false,
--drop = "", -- Intentionally allowed to drop itself --drop = "", -- Intentionally allowed to drop itself
groups = {not_in_creative_inventory = 1} groups = {not_in_creative_inventory = 1, pickaxey=3},
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
@ -109,12 +113,16 @@ local ndef
ndef = { ndef = {
description = desc, description = desc,
groups = {cracky = 2, technic_machine = 1, technic_lv = 1}, groups = {cracky = 2, technic_machine = 1, technic_lv = 1, pickaxey=3},
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", desc) meta:set_string("infotext", desc)
meta:set_int("LV_EU_demand", demand) meta:set_int("LV_EU_demand", demand)
end end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
} }
for k, v in pairs(common_fields) do for k, v in pairs(common_fields) do
@ -129,11 +137,15 @@ ndef = {
paramtype = "light", paramtype = "light",
light_source = 14, light_source = 14,
drop = "technic:lv_lamp", drop = "technic:lv_lamp",
groups = {cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1}, groups = {cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1, pickaxey=3},
technic_on_disable = function(pos) technic_on_disable = function(pos)
illuminate(pos, false) illuminate(pos, false)
technic.swap_node(pos, "technic:lv_lamp") technic.swap_node(pos, "technic:lv_lamp")
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
} }
for k, v in pairs(common_fields) do for k, v in pairs(common_fields) do
@ -149,7 +161,7 @@ technic.register_machine("LV", "technic:lv_lamp_active", technic.receiver)
minetest.register_craft({ minetest.register_craft({
output = "technic:lv_lamp", output = "technic:lv_lamp",
recipe = { recipe = {
{"default:glass", "default:glass", "default:glass"}, {technic_compat.glass_ingredient, technic_compat.glass_ingredient, technic_compat.glass_ingredient},
{"technic:lv_led", "technic:lv_led", "technic:lv_led"}, {"technic:lv_led", "technic:lv_led", "technic:lv_led"},
{"mesecons_materials:glue", "technic:lv_cable", "mesecons_materials:glue"}, {"mesecons_materials:glue", "technic:lv_cable", "mesecons_materials:glue"},
} }

View File

@ -48,13 +48,17 @@ ndef = {
description = desc, description = desc,
inventory_image = "technic_lv_led_inv.png", inventory_image = "technic_lv_led_inv.png",
sunlight_propagates = true, sunlight_propagates = true,
groups = {cracky = 2, technic_machine = 1, technic_lv = 1}, groups = {cracky = 2, technic_machine = 1, technic_lv = 1,pickaxey=3},
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", desc) meta:set_string("infotext", desc)
meta:set_int("LV_EU_demand", demand) meta:set_int("LV_EU_demand", demand)
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
} }
for k, v in pairs(common_fields) do for k, v in pairs(common_fields) do
@ -69,10 +73,14 @@ ndef = {
paramtype = "light", paramtype = "light",
light_source = 9, light_source = 9,
drop = "technic:lv_led", drop = "technic:lv_led",
groups = {cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1}, groups = {cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1, pickaxey=3},
technic_on_disable = function(pos) technic_on_disable = function(pos)
technic.swap_node(pos, "technic:lv_led") technic.swap_node(pos, "technic:lv_led")
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
} }
for k, v in pairs(common_fields) do for k, v in pairs(common_fields) do

View File

@ -7,9 +7,9 @@ minetest.register_alias("music_player", "technic:music_player")
minetest.register_craft({ minetest.register_craft({
output = 'technic:music_player', output = 'technic:music_player',
recipe = { recipe = {
{'technic:chromium_ingot', 'default:diamond', 'technic:chromium_ingot'}, {'technic:chromium_ingot', technic_compat.diamond_ingredient, 'technic:chromium_ingot'},
{'default:diamond', 'technic:machine_casing', 'default:diamond'}, {technic_compat.diamond_ingredient, 'technic:machine_casing', technic_compat.diamond_ingredient},
{'default:mossycobble', 'technic:lv_cable', 'default:mossycobble'}, {technic_compat.mossy_cobble_ingredient, 'technic:lv_cable', technic_compat.mossy_cobble_ingredient},
} }
}) })
@ -94,9 +94,9 @@ minetest.register_node("technic:music_player", {
tiles = {"technic_music_player_top.png", "technic_machine_bottom.png", "technic_music_player_side.png", tiles = {"technic_music_player_top.png", "technic_machine_bottom.png", "technic_music_player_side.png",
"technic_music_player_side.png", "technic_music_player_side.png", "technic_music_player_side.png"}, "technic_music_player_side.png", "technic_music_player_side.png", "technic_music_player_side.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1}, technic_machine=1, technic_lv=1, pickaxey=3},
connect_sides = {"bottom"}, connect_sides = {"bottom"},
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("%s Music Player"):format("LV")) meta:set_string("infotext", S("%s Music Player"):format("LV"))
@ -125,6 +125,10 @@ minetest.register_node("technic:music_player", {
on_destruct = stop_player, on_destruct = stop_player,
technic_run = run, technic_run = run,
technic_on_disable = stop_player, technic_on_disable = stop_player,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("LV", "technic:music_player", technic.receiver) technic.register_machine("LV", "technic:music_player", technic.receiver)

View File

@ -48,9 +48,9 @@ minetest.register_node("technic:solar_panel", {
tiles = {"technic_solar_panel_top.png", "technic_solar_panel_bottom.png", "technic_solar_panel_side.png", tiles = {"technic_solar_panel_top.png", "technic_solar_panel_bottom.png", "technic_solar_panel_side.png",
"technic_solar_panel_side.png", "technic_solar_panel_side.png", "technic_solar_panel_side.png"}, "technic_solar_panel_side.png", "technic_solar_panel_side.png", "technic_solar_panel_side.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1}, technic_machine=1, technic_lv=1, pickaxey=3},
connect_sides = {"bottom"}, connect_sides = {"bottom"},
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
description = S("Small Solar %s Generator"):format("LV"), description = S("Small Solar %s Generator"):format("LV"),
active = false, active = false,
drawtype = "nodebox", drawtype = "nodebox",
@ -66,6 +66,10 @@ minetest.register_node("technic:solar_panel", {
meta:set_string("infotext", S("Small Solar %s Generator"):format("LV")) meta:set_string("infotext", S("Small Solar %s Generator"):format("LV"))
end, end,
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("LV", "technic:solar_panel", technic.producer) technic.register_machine("LV", "technic:solar_panel", technic.producer)

View File

@ -11,7 +11,7 @@ minetest.register_alias("water_mill", "technic:water_mill")
minetest.register_craft({ minetest.register_craft({
output = 'technic:water_mill', output = 'technic:water_mill',
recipe = { recipe = {
{'technic:marble', 'default:diamond', 'technic:marble'}, {'technic:marble', technic_compat.diamond_ingredient, 'technic:marble'},
{'group:wood', 'technic:machine_casing', 'group:wood'}, {'group:wood', 'technic:machine_casing', 'group:wood'},
{'technic:marble', 'technic:lv_cable', 'technic:marble'}, {'technic:marble', 'technic:lv_cable', 'technic:marble'},
} }
@ -19,8 +19,7 @@ minetest.register_craft({
local function check_node_around_mill(pos) local function check_node_around_mill(pos)
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
if node.name == "default:water_flowing" if minetest.get_item_group(node.name, "water") == 3 and string.find(node.name, "flowing") then
or node.name == "default:river_water_flowing" then
return node.param2 -- returns approx. water flow, if any return node.param2 -- returns approx. water flow, if any
end end
return false return false
@ -78,15 +77,19 @@ minetest.register_node("technic:water_mill", {
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1}, technic_machine=1, technic_lv=1, pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Hydro %s Generator"):format("LV")) meta:set_string("infotext", S("Hydro %s Generator"):format("LV"))
meta:set_int("LV_EU_supply", 0) meta:set_int("LV_EU_supply", 0)
end, end,
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:water_mill_active", { minetest.register_node("technic:water_mill_active", {
@ -96,12 +99,16 @@ minetest.register_node("technic:water_mill_active", {
"technic_water_mill_side.png", "technic_water_mill_side.png"}, "technic_water_mill_side.png", "technic_water_mill_side.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, not_in_creative_inventory=1}, technic_machine=1, technic_lv=1, not_in_creative_inventory=1, pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
drop = "technic:water_mill", drop = "technic:water_mill",
technic_run = run, technic_run = run,
technic_disabled_machine_name = "technic:water_mill", technic_disabled_machine_name = "technic:water_mill",
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("LV", "technic:water_mill", technic.producer) technic.register_machine("LV", "technic:water_mill", technic.producer)

View File

@ -75,15 +75,19 @@ minetest.register_node("technic:hydro_turbine", {
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_mv=1}, technic_machine=1, technic_mv=1, pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Hydro %s Generator"):format("MV")) meta:set_string("infotext", S("Hydro %s Generator"):format("MV"))
meta:set_int("MV_EU_supply", 0) meta:set_int("MV_EU_supply", 0)
end, end,
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:hydro_turbine_active", { minetest.register_node("technic:hydro_turbine_active", {
@ -93,12 +97,16 @@ minetest.register_node("technic:hydro_turbine_active", {
"technic_hydro_turbine_side.png", "technic_hydro_turbine_side.png"}, "technic_hydro_turbine_side.png", "technic_hydro_turbine_side.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_mv=1, not_in_creative_inventory=1}, technic_machine=1, technic_mv=1, not_in_creative_inventory=1, pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
drop = "technic:hydro_turbine", drop = "technic:hydro_turbine",
technic_run = run, technic_run = run,
technic_disabled_machine_name = "technic:hydro_turbine", technic_disabled_machine_name = "technic:hydro_turbine",
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("MV", "technic:hydro_turbine", technic.producer) technic.register_machine("MV", "technic:hydro_turbine", technic.producer)

View File

@ -105,7 +105,7 @@ minetest.register_node('technic:homedecor_glowlight_half_yellow', {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -145,7 +145,7 @@ minetest.register_node('technic:homedecor_glowlight_half_yellow_active', {
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = minetest.LIGHT_MAX, light_source = minetest.LIGHT_MAX,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3, not_in_creative_inventory=1}, groups = { snappy = 3, not_in_creative_inventory=1},
drop="technic:homedecor_glowlight_half_yellow", drop="technic:homedecor_glowlight_half_yellow",
@ -186,7 +186,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_yellow', {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -226,7 +226,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_yellow_active', {
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = minetest.LIGHT_MAX-1, light_source = minetest.LIGHT_MAX-1,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3, not_in_creative_inventory=1}, groups = { snappy = 3, not_in_creative_inventory=1},
drop="technic:homedecor_glowlight_quarter_yellow", drop="technic:homedecor_glowlight_quarter_yellow",
@ -268,7 +268,7 @@ minetest.register_node('technic:homedecor_glowlight_half_white', {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -308,7 +308,7 @@ minetest.register_node('technic:homedecor_glowlight_half_white_active', {
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = minetest.LIGHT_MAX, light_source = minetest.LIGHT_MAX,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3, not_in_creative_inventory=1}, groups = { snappy = 3, not_in_creative_inventory=1},
drop="technic:homedecor_glowlight_half_white", drop="technic:homedecor_glowlight_half_white",
@ -349,7 +349,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_white', {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -389,7 +389,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_white_active', {
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = minetest.LIGHT_MAX-1, light_source = minetest.LIGHT_MAX-1,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3, not_in_creative_inventory=1}, groups = { snappy = 3, not_in_creative_inventory=1},
drop="technic:homedecor_glowlight_quarter_white", drop="technic:homedecor_glowlight_quarter_white",
@ -430,7 +430,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_yellow', {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -470,7 +470,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_yellow_active', {
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = minetest.LIGHT_MAX-1, light_source = minetest.LIGHT_MAX-1,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3, not_in_creative_inventory=1}, groups = { snappy = 3, not_in_creative_inventory=1},
drop="technic:homedecor_glowlight_small_cube_yellow", drop="technic:homedecor_glowlight_small_cube_yellow",
@ -511,7 +511,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_white', {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -551,7 +551,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_white_active', {
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = minetest.LIGHT_MAX-1, light_source = minetest.LIGHT_MAX-1,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
groups = { snappy = 3, not_in_creative_inventory=1}, groups = { snappy = 3, not_in_creative_inventory=1},
drop="technic:homedecor_glowlight_small_cube_white", drop="technic:homedecor_glowlight_small_cube_white",

View File

@ -122,8 +122,8 @@ minetest.register_node("technic:power_radiator", {
description = "MV Power Radiator", description = "MV Power Radiator",
tiles = {"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png", tiles = {"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png",
"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"}, "technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2}, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, pickaxey=3},
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
is_ground_content = true, is_ground_content = true,
@ -143,7 +143,11 @@ minetest.register_node("technic:power_radiator", {
end, end,
on_punch = function(pos, node, puncher) on_punch = function(pos, node, puncher)
toggle_on_off_inductive_appliances(pos, node, puncher) toggle_on_off_inductive_appliances(pos, node, puncher)
end end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_abm({ minetest.register_abm({

View File

@ -10,9 +10,9 @@ local tube_entry = "^pipeworks_tube_connection_wooden.png"
minetest.register_craft({ minetest.register_craft({
output = 'technic:tool_workshop', output = 'technic:tool_workshop',
recipe = { recipe = {
{'group:wood', 'default:diamond', 'group:wood'}, {'group:wood', technic_compat.diamond_ingredient, 'group:wood'},
{'mesecons_pistons:piston_sticky_off', 'technic:machine_casing', 'technic:carbon_cloth'}, {'mesecons_pistons:piston_sticky_off', 'technic:machine_casing', 'technic:carbon_cloth'},
{'default:obsidian', 'technic:mv_cable', 'default:obsidian'}, {technic_compat.obsidian_ingredient, 'technic:mv_cable', technic_compat.obsidian_ingredient},
} }
}) })
@ -93,9 +93,9 @@ minetest.register_node("technic:tool_workshop", {
"technic_workshop_side.png" "technic_workshop_side.png"
}, },
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_mv=1, tubedevice=1, tubedevice_receiver=1}, technic_machine=1, technic_mv=1, tubedevice=1, tubedevice_receiver=1, pickaxey=3},
connect_sides = {"bottom", "back", "left", "right"}, connect_sides = {"bottom", "back", "left", "right"},
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("%s Tool Workshop"):format("MV")) meta:set_string("infotext", S("%s Tool Workshop"):format("MV"))
@ -119,7 +119,11 @@ minetest.register_node("technic:tool_workshop", {
}, },
technic_run = run, technic_run = run,
after_place_node = pipeworks.after_place, after_place_node = pipeworks.after_place,
after_dig_node = technic.machine_after_dig_node after_dig_node = technic.machine_after_dig_node,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("MV", "technic:tool_workshop", technic.receiver) technic.register_machine("MV", "technic:tool_workshop", technic.receiver)

View File

@ -24,9 +24,13 @@ minetest.register_node("technic:wind_mill_frame", {
drawtype = "glasslike_framed", drawtype = "glasslike_framed",
tiles = {"technic_carbon_steel_block.png", "default_glass.png"}, tiles = {"technic_carbon_steel_block.png", "default_glass.png"},
sunlight_propagates = true, sunlight_propagates = true,
groups = {cracky=3}, groups = {cracky=3, pickaxey=3},
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
paramtype = "light", paramtype = "light",
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
local function check_wind_mill(pos) local function check_wind_mill(pos)
@ -70,9 +74,9 @@ minetest.register_node("technic:wind_mill", {
description = S("Wind %s Generator"):format("MV"), description = S("Wind %s Generator"):format("MV"),
tiles = {"technic_carbon_steel_block.png"}, tiles = {"technic_carbon_steel_block.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {cracky=1, technic_machine=1, technic_mv=1}, groups = {cracky=1, technic_machine=1, technic_mv=1, pickaxey=3},
connect_sides = {"top", "bottom", "back", "left", "right"}, connect_sides = {"top", "bottom", "back", "left", "right"},
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
drawtype = "nodebox", drawtype = "nodebox",
paramtype = "light", paramtype = "light",
node_box = { node_box = {
@ -90,6 +94,10 @@ minetest.register_node("technic:wind_mill", {
meta:set_int("MV_EU_supply", 0) meta:set_int("MV_EU_supply", 0)
end, end,
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
technic.register_machine("MV", "technic:wind_mill", technic.producer) technic.register_machine("MV", "technic:wind_mill", technic.producer)

View File

@ -72,8 +72,8 @@ minetest.register_node("technic:admin_anchor", {
drawtype = "normal", drawtype = "normal",
tiles = {"technic_admin_anchor.png"}, tiles = {"technic_admin_anchor.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=3, not_in_creative_inventory=1}, groups = {cracky=3, not_in_creative_inventory=1, pickaxey=3},
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
after_place_node = function (pos, placer) after_place_node = function (pos, placer)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if placer and placer:is_player() then if placer and placer:is_player() then
@ -114,4 +114,8 @@ minetest.register_node("technic:admin_anchor", {
end end
set_display(pos, meta) set_display(pos, meta)
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })

View File

@ -6,9 +6,9 @@ local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:coal_alloy_furnace', output = 'technic:coal_alloy_furnace',
recipe = { recipe = {
{'default:brick', 'default:brick', 'default:brick'}, {technic_compat.brick_block_ingredient, technic_compat.brick_block_ingredient, technic_compat.brick_block_ingredient},
{'default:brick', '', 'default:brick'}, {technic_compat.brick_block_ingredient, '', technic_compat.brick_block_ingredient},
{'default:brick', 'default:brick', 'default:brick'}, {technic_compat.brick_block_ingredient, technic_compat.brick_block_ingredient, technic_compat.brick_block_ingredient},
} }
}) })
@ -34,9 +34,9 @@ minetest.register_node("technic:coal_alloy_furnace", {
"technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png",
"technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_front.png"}, "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_front.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {cracky=2}, groups = {cracky=2, pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("formspec", formspec) meta:set_string("formspec", formspec)
@ -50,6 +50,10 @@ minetest.register_node("technic:coal_alloy_furnace", {
allow_metadata_inventory_put = technic.machine_inventory_put, allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move, allow_metadata_inventory_move = technic.machine_inventory_move,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:coal_alloy_furnace_active", { minetest.register_node("technic:coal_alloy_furnace_active", {
@ -60,13 +64,17 @@ minetest.register_node("technic:coal_alloy_furnace_active", {
paramtype2 = "facedir", paramtype2 = "facedir",
light_source = 8, light_source = 8,
drop = "technic:coal_alloy_furnace", drop = "technic:coal_alloy_furnace",
groups = {cracky=2, not_in_creative_inventory=1}, groups = {cracky=2, not_in_creative_inventory=1, pickaxey=3},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
can_dig = technic.machine_can_dig, can_dig = technic.machine_can_dig,
allow_metadata_inventory_put = technic.machine_inventory_put, allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move, allow_metadata_inventory_move = technic.machine_inventory_move,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_abm({ minetest.register_abm({

View File

@ -1,5 +1,10 @@
local S = technic.getter local S = technic.getter
if minetest.get_modpath("mcl_core") then
minetest.registered_nodes["mcl_furnaces:furnace"].description = S("Fuel-Fired Furnace")
minetest.override_item("mcl_furnaces:furnace", { description = S("Fuel-Fired Furnace") })
else
if minetest.registered_nodes["default:furnace"].description == "Furnace" then if minetest.registered_nodes["default:furnace"].description == "Furnace" then
minetest.override_item("default:furnace", { description = S("Fuel-Fired Furnace") }) minetest.override_item("default:furnace", { description = S("Fuel-Fired Furnace") })
end end
end

View File

@ -140,9 +140,9 @@ local function make_constructor(mark, length)
"technic_constructor_front_off.png"}, "technic_constructor_front_off.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
mesecon = 2, technic_constructor = 1}, mesecon = 2, technic_constructor = 1, pickaxey=3},
mesecons = {effector = {action_on = make_on(mark, length)}}, mesecons = {effector = {action_on = make_on(mark, length)}},
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local formspec = "size[8,9;]".. local formspec = "size[8,9;]"..
@ -179,7 +179,11 @@ local function make_constructor(mark, length)
allow_metadata_inventory_put = allow_inventory_put, allow_metadata_inventory_put = allow_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move, allow_metadata_inventory_move = technic.machine_inventory_move,
on_rotate = screwdriver.rotate_simple on_rotate = screwdriver.rotate_simple,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:constructor_mk"..mark.."_on", { minetest.register_node("technic:constructor_mk"..mark.."_on", {
@ -192,13 +196,17 @@ local function make_constructor(mark, length)
paramtype2 = "facedir", paramtype2 = "facedir",
drop = "technic:constructor_mk"..mark.."_off", drop = "technic:constructor_mk"..mark.."_off",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
mesecon=2, not_in_creative_inventory=1, technic_constructor=1}, mesecon=2, not_in_creative_inventory=1, technic_constructor=1, pickaxey = 3},
mesecons= {effector = {action_off = make_off(mark)}}, mesecons= {effector = {action_off = make_off(mark)}},
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
allow_metadata_inventory_put = allow_inventory_put, allow_metadata_inventory_put = allow_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move, allow_metadata_inventory_move = technic.machine_inventory_move,
on_rotate = false on_rotate = false,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
end end

View File

@ -236,7 +236,7 @@ for zp = 0, 1 do
end end
local nameext = string.format("%d%d%d%d%d%d", xm, xp, ym, yp, zm, zp) local nameext = string.format("%d%d%d%d%d%d", xm, xp, ym, yp, zm, zp)
local groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 } local groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, pickaxey=3}
if nameext ~= "111111" then groups.not_in_creative_inventory = 1 end if nameext ~= "111111" then groups.not_in_creative_inventory = 1 end
@ -373,6 +373,10 @@ for zp = 0, 1 do
end end
end end
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
end end
@ -616,7 +620,7 @@ minetest.register_node("technic:frame_motor", {
"pipeworks_filter_top.png^[transformR90", "technic_lv_cable.png", "technic_lv_cable.png", "pipeworks_filter_top.png^[transformR90", "technic_lv_cable.png", "technic_lv_cable.png",
"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png" "technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"
}, },
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2, pickaxey=3},
paramtype2 = "facedir", paramtype2 = "facedir",
mesecons = { effector = { action_on = frame_motor_on } }, mesecons = { effector = { action_on = frame_motor_on } },
@ -633,7 +637,10 @@ minetest.register_node("technic:frame_motor", {
{ x = -1, y = 0, z = 0 }, { x = 0, y = -1, z = 0 } { x = -1, y = 0, z = 0 }, { x = 0, y = -1, z = 0 }
})[math.floor(node.param2 / 4) + 1] })[math.floor(node.param2 / 4) + 1]
return dir2.x ~= -dir.x or dir2.y ~= -dir.y or dir2.z ~= -dir.z return dir2.x ~= -dir.x or dir2.y ~= -dir.y or dir2.z ~= -dir.z
end end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
@ -825,37 +832,46 @@ minetest.register_node("technic:template", {
description = S("Template"), description = S("Template"),
tiles = { "technic_mv_cable.png" }, tiles = { "technic_mv_cable.png" },
drop = "", drop = "",
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, pickaxey=3},
on_destruct = template_on_destruct, on_destruct = template_on_destruct,
after_dig_node = template_drops, after_dig_node = template_drops,
on_punch = function(pos, node, puncher) on_punch = function(pos, node, puncher)
swap_template(pos, "technic:template_disabled") swap_template(pos, "technic:template_disabled")
end end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:template_disabled", { minetest.register_node("technic:template_disabled", {
description = S("Template"), description = S("Template"),
tiles = { "technic_hv_cable.png" }, tiles = { "technic_hv_cable.png" },
drop = "", drop = "",
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1, pickaxey=3},
on_destruct = template_on_destruct, on_destruct = template_on_destruct,
after_dig_node = template_drops, after_dig_node = template_drops,
on_punch = function(pos, node, puncher) on_punch = function(pos, node, puncher)
local _ = minetest.get_meta(pos) local _ = minetest.get_meta(pos)
swap_template(pos, "technic:template_connector") swap_template(pos, "technic:template_connector")
end end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:template_connector", { minetest.register_node("technic:template_connector", {
description = S("Template"), description = S("Template"),
tiles = { "technic_lv_cable.png" }, tiles = { "technic_lv_cable.png" },
drop = "", drop = "",
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, not_in_creative_inventory = 1, pickaxey=3},
on_destruct = template_on_destruct, on_destruct = template_on_destruct,
after_dig_node = template_drops, after_dig_node = template_drops,
on_punch = function(pos, node, puncher) on_punch = function(pos, node, puncher)
swap_template(pos, "technic:template") swap_template(pos, "technic:template")
end end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_craftitem("technic:template_replacer", { minetest.register_craftitem("technic:template_replacer", {
@ -949,13 +965,16 @@ minetest.register_node("technic:template_motor", {
"technic_lv_cable.png", "technic_lv_cable.png",
"technic_lv_cable.png" "technic_lv_cable.png"
}, },
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2, pickaxey=3},
paramtype2 = "facedir", paramtype2 = "facedir",
mesecons = { effector = { action_on = template_motor_on } }, mesecons = { effector = { action_on = template_motor_on } },
after_place_node = function(pos, placer, itemstack) after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name()) meta:set_string("owner", placer:get_player_name())
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
-- Crafts -- Crafts
@ -981,7 +1000,7 @@ minetest.register_craft({
output = 'technic:template 10', output = 'technic:template 10',
recipe = { recipe = {
{ '', 'basic_materials:brass_ingot', '' }, { '', 'basic_materials:brass_ingot', '' },
{ 'basic_materials:brass_ingot', 'default:mese_crystal', 'basic_materials:brass_ingot' }, { 'basic_materials:brass_ingot', technic_compat.mese_crystal_ingredient, 'basic_materials:brass_ingot' },
{ '', 'basic_materials:brass_ingot', '' }, { '', 'basic_materials:brass_ingot', '' },
} }
}) })
@ -1009,7 +1028,7 @@ minetest.register_craft({
output = 'technic:template_tool', output = 'technic:template_tool',
recipe = { recipe = {
{ '', 'technic:template', '' }, { '', 'technic:template', '' },
{ 'default:mese_crystal', 'default:stick', 'default:mese_crystal' }, { technic_compat.mese_crystal_ingredient, 'default:stick', technic_compat.mese_crystal_ingredient },
{ '', 'default:stick', '' }, { '', 'default:stick', '' },
} }
}) })

View File

@ -47,7 +47,7 @@ minetest.register_craft({
output = 'technic:injector 1', output = 'technic:injector 1',
recipe = { recipe = {
{'', 'technic:control_logic_unit',''}, {'', 'technic:control_logic_unit',''},
{'', 'default:chest',''}, {'', technic_compat.chest_ingredient,''},
{'', 'pipeworks:tube_1',''}, {'', 'pipeworks:tube_1',''},
} }
}) })
@ -90,7 +90,7 @@ minetest.register_node("technic:injector", {
"technic_injector_side.png" "technic_injector_side.png"
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, tubedevice=1, tubedevice_receiver=1}, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, tubedevice=1, tubedevice_receiver=1, pickaxey=3},
tube = { tube = {
can_insert = function(pos, node, stack, direction) can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -105,7 +105,7 @@ minetest.register_node("technic:injector", {
end, end,
connect_sides = {left=1, right=1, back=1, top=1, bottom=1}, connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
}, },
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Self-Contained Injector")) meta:set_string("infotext", S("Self-Contained Injector"))
@ -140,7 +140,10 @@ minetest.register_node("technic:injector", {
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move, allow_metadata_inventory_move = technic.machine_inventory_move,
after_place_node = pipeworks.after_place, after_place_node = pipeworks.after_place,
after_dig_node = pipeworks.after_dig after_dig_node = pipeworks.after_dig,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_abm({ minetest.register_abm({

View File

@ -10,7 +10,7 @@ minetest.register_craft({
output = "technic:power_monitor", output = "technic:power_monitor",
recipe = { recipe = {
{"", "", ""}, {"", "", ""},
{"", "technic:machine_casing", "default:copper_ingot"}, {"", "technic:machine_casing", technic_compat.copper_ingredient},
{"technic:lv_cable", "technic:lv_cable", "technic:lv_cable"} {"technic:lv_cable", "technic:lv_cable", "technic:lv_cable"}
} }
}) })
@ -26,13 +26,17 @@ minetest.register_node("technic:power_monitor",{
"technic_power_monitor_front.png" "technic_power_monitor_front.png"
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_all_tiers=1, technic_machine=1}, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_all_tiers=1, technic_machine=1,pickaxey=3},
connect_sides = {"bottom", "back"}, connect_sides = {"bottom", "back"},
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Power Monitor")) meta:set_string("infotext", S("Power Monitor"))
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_abm({ minetest.register_abm({

View File

@ -11,26 +11,6 @@ function technic.register_alloy_recipe(data)
technic.register_recipe("alloy", data) technic.register_recipe("alloy", data)
end end
local recipes = { for _, data in pairs(alloy_recipes) do
{"technic:copper_dust 7", "technic:tin_dust", "technic:bronze_dust 8", 12},
{"default:copper_ingot 7", "default:tin_ingot", "default:bronze_ingot 8", 12},
{"technic:wrought_iron_dust 2", "technic:coal_dust", "technic:carbon_steel_dust 2", 6},
{"technic:wrought_iron_ingot 2", "technic:coal_dust", "technic:carbon_steel_ingot 2", 6},
{"technic:carbon_steel_dust 2", "technic:coal_dust", "technic:cast_iron_dust 2", 6},
{"technic:carbon_steel_ingot 2", "technic:coal_dust", "technic:cast_iron_ingot 2", 6},
{"technic:carbon_steel_dust 4", "technic:chromium_dust", "technic:stainless_steel_dust 5", 7.5},
{"technic:carbon_steel_ingot 4", "technic:chromium_ingot", "technic:stainless_steel_ingot 5", 7.5},
{"technic:copper_dust 2", "technic:zinc_dust", "technic:brass_dust 3"},
{"default:copper_ingot 2", "technic:zinc_ingot", "basic_materials:brass_ingot 3"},
{"default:sand 2", "technic:coal_dust 2", "technic:silicon_wafer"},
{"technic:silicon_wafer", "technic:gold_dust", "technic:doped_silicon_wafer"},
-- from https://en.wikipedia.org/wiki/Carbon_black
-- The highest volume use of carbon black is as a reinforcing filler in rubber products, especially tires.
-- "[Compounding a] pure gum vulcanizate … with 50% of its weight of carbon black improves its tensile strength and wear resistance …"
{"technic:raw_latex 4", "technic:coal_dust 2", "technic:rubber 6", 2},
{"default:ice", "bucket:bucket_empty", "bucket:bucket_water", 1 },
}
for _, data in pairs(recipes) do
technic.register_alloy_recipe({input = {data[1], data[2]}, output = data[3], time = data[4]}) technic.register_alloy_recipe({input = {data[1], data[2]}, output = data[3], time = data[4]})
end end

View File

@ -17,9 +17,9 @@ technic.register_power_tool("technic:blue_energy_crystal", 450000)
minetest.register_craft({ minetest.register_craft({
output = "technic:battery", output = "technic:battery",
recipe = { recipe = {
{"group:wood", "default:copper_ingot", "group:wood"}, {"group:wood", technic_compat.copper_ingredient, "group:wood"},
{"group:wood", "default:tin_ingot", "group:wood"}, {"group:wood", technic_compat.tin_ingredient, "group:wood"},
{"group:wood", "default:copper_ingot", "group:wood"}, {"group:wood", technic_compat.copper_ingredient, "group:wood"},
} }
}) })
-- Sulfur-lead-water recipes: -- Sulfur-lead-water recipes:
@ -266,7 +266,7 @@ function technic.register_battery_box(data)
for i = 0, 8 do for i = 0, 8 do
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, ["technic_"..ltier]=1} technic_machine=1, ["technic_"..ltier]=1, pickaxey=3}
if i ~= 0 then if i ~= 0 then
groups.not_in_creative_inventory = 1 groups.not_in_creative_inventory = 1
end end
@ -300,7 +300,7 @@ function technic.register_battery_box(data)
connect_sides = {"bottom"}, connect_sides = {"bottom"},
tube = data.tube and tube or nil, tube = data.tube and tube or nil,
paramtype2 = "facedir", paramtype2 = "facedir",
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
drop = "technic:"..ltier.."_battery_box0", drop = "technic:"..ltier.."_battery_box0",
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -381,6 +381,9 @@ function technic.register_battery_box(data)
end end
}, },
}, },
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
end end

View File

@ -141,7 +141,7 @@ function technic.register_cable(tier, size)
local ltier = string.lower(tier) local ltier = string.lower(tier)
cable_tier["technic:"..ltier.."_cable"] = tier cable_tier["technic:"..ltier.."_cable"] = tier
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, pickaxey=2,
["technic_"..ltier.."_cable"] = 1} ["technic_"..ltier.."_cable"] = 1}
local node_box = { local node_box = {
@ -161,7 +161,7 @@ function technic.register_cable(tier, size)
inventory_image = "technic_"..ltier.."_cable_wield.png", inventory_image = "technic_"..ltier.."_cable_wield.png",
wield_image = "technic_"..ltier.."_cable_wield.png", wield_image = "technic_"..ltier.."_cable_wield.png",
groups = groups, groups = groups,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
drop = "technic:"..ltier.."_cable", drop = "technic:"..ltier.."_cable",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
@ -171,6 +171,8 @@ function technic.register_cable(tier, size)
"group:technic_"..ltier, "group:technic_all_tiers"}, "group:technic_"..ltier, "group:technic_all_tiers"},
on_construct = clear_networks, on_construct = clear_networks,
on_destruct = clear_networks, on_destruct = clear_networks,
_mcl_blast_resistance = 1.5,
_mcl_hardness = 3
}) })
local xyz = { local xyz = {
@ -201,7 +203,7 @@ function technic.register_cable(tier, size)
description = S("%s Cable Plate"):format(tier), description = S("%s Cable Plate"):format(tier),
tiles = {"technic_"..ltier.."_cable.png"}, tiles = {"technic_"..ltier.."_cable.png"},
groups = table.copy(groups), groups = table.copy(groups),
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
drop = "technic:"..ltier.."_cable_plate_1", drop = "technic:"..ltier.."_cable_plate_1",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
@ -211,6 +213,9 @@ function technic.register_cable(tier, size)
"group:technic_"..ltier, "group:technic_all_tiers"}, "group:technic_"..ltier, "group:technic_all_tiers"},
on_construct = clear_networks, on_construct = clear_networks,
on_destruct = clear_networks, on_destruct = clear_networks,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
} }
def.node_box.fixed = { def.node_box.fixed = {
{-size, -size, -size, size, size, size}, {-size, -size, -size, size, size, size},

View File

@ -10,31 +10,23 @@ function technic.register_separating_recipe(data)
technic.register_recipe("separating", data) technic.register_recipe("separating", data)
end end
local recipes = {
{ "technic:bronze_dust 8", "technic:copper_dust 7", "technic:tin_dust" },
{ "technic:stainless_steel_dust 5", "technic:wrought_iron_dust 4", "technic:chromium_dust" },
{ "technic:brass_dust 3", "technic:copper_dust 2", "technic:zinc_dust" },
{ "technic:chernobylite_dust", "default:sand", "technic:uranium3_dust" },
{ "default:dirt 4", "default:sand", "default:gravel", "default:clay_lump 2" },
}
local function uranium_dust(p) local function uranium_dust(p)
return "technic:uranium"..(p == 7 and "" or p).."_dust" return "technic:uranium"..(p == 7 and "" or p).."_dust"
end end
for p = 1, 34 do for p = 1, 34 do
table.insert(recipes, { uranium_dust(p).." 2", uranium_dust(p-1), uranium_dust(p+1) }) table.insert(centrifuge_recipes, { uranium_dust(p).." 2", uranium_dust(p-1), uranium_dust(p+1) })
end end
if minetest.get_modpath("bushes_classic") then if minetest.get_modpath("bushes_classic") then
for _, berry in ipairs({ "blackberry", "blueberry", "gooseberry", "raspberry", "strawberry" }) do for _, berry in ipairs({ "blackberry", "blueberry", "gooseberry", "raspberry", "strawberry" }) do
table.insert(recipes, { "bushes:"..berry.."_bush", "default:stick 20", "bushes:"..berry.." 4" }) table.insert(centrifuge_recipes, { "bushes:"..berry.."_bush", "default:stick 20", "bushes:"..berry.." 4" })
end end
end end
if minetest.get_modpath("farming") then if minetest.get_modpath("farming") then
table.insert(recipes, { "farming:wheat 4", "farming:seed_wheat 3", "default:dry_shrub 1" }) table.insert(centrifuge_recipes, { "farming:wheat 4", "farming:seed_wheat 3", "default:dry_shrub 1" })
end end
for _, data in pairs(recipes) do for _, data in pairs(centrifuge_recipes) do
technic.register_separating_recipe({ input = { data[1] }, output = { data[2], data[3], data[4] } }) technic.register_separating_recipe({ input = { data[1] }, output = { data[2], data[3], data[4] } })
end end

View File

@ -35,7 +35,7 @@ end
-- handles the machine upgrades when set or removed -- handles the machine upgrades when set or removed
local function on_machine_upgrade(meta, stack) local function on_machine_upgrade(meta, stack)
local stack_name = stack:get_name() local stack_name = stack:get_name()
if stack_name == "default:chest" then if stack_name == technic_compat.chest_ingredient then
meta:set_int("public", 1) meta:set_int("public", 1)
return 1 return 1
elseif stack_name ~= "technic:control_logic_unit" elseif stack_name ~= "technic:control_logic_unit"
@ -47,7 +47,7 @@ end
-- something is about to be removed -- something is about to be removed
local function on_machine_downgrade(meta, stack, list) local function on_machine_downgrade(meta, stack, list)
if stack:get_name() == "default:chest" then if stack:get_name() == technic_compat.chest_ingredient then
local inv = meta:get_inventory() local inv = meta:get_inventory()
local upg1, upg2 = inv:get_stack("upgrade1", 1), inv:get_stack("upgrade2", 1) local upg1, upg2 = inv:get_stack("upgrade1", 1), inv:get_stack("upgrade2", 1)

View File

@ -8,19 +8,9 @@ function technic.register_compressor_recipe(data)
technic.register_recipe("compressing", data) technic.register_recipe("compressing", data)
end end
local recipes = { if minetest.get_modpath("default") then
{"default:snowblock", "default:ice"}, table.insert(compressor_recipes, {"default:silver_sand 2", "default:silver_sandstone"})
{"default:sand 2", "default:sandstone"}, end
{"default:desert_sand 2", "default:desert_sandstone"},
{"default:silver_sand 2", "default:silver_sandstone"},
{"default:desert_sand", "default:desert_stone"},
{"technic:mixed_metal_ingot", "technic:composite_plate"},
{"default:copper_ingot 5", "technic:copper_plate"},
{"technic:coal_dust 4", "technic:graphite"},
{"technic:carbon_cloth", "technic:carbon_plate"},
{"technic:uranium35_ingot 5", "technic:uranium_fuel"},
}
-- defuse the default sandstone recipe, since we have the compressor to take over in a more realistic manner -- defuse the default sandstone recipe, since we have the compressor to take over in a more realistic manner
minetest.clear_craft({ minetest.clear_craft({
recipe = { recipe = {
@ -41,7 +31,7 @@ minetest.clear_craft({
}, },
}) })
for _, data in pairs(recipes) do for _, data in pairs(compressor_recipes) do
technic.register_compressor_recipe({input = {data[1]}, output = data[2]}) technic.register_compressor_recipe({input = {data[1]}, output = data[2]})
end end

View File

@ -8,29 +8,11 @@ function technic.register_extractor_recipe(data)
technic.register_recipe("extracting", data) technic.register_recipe("extracting", data)
end end
if minetest.get_modpath("dye") then if minetest.get_modpath("dye") or minetest.get_modpath("mcl_dye") then
-- check if we are using dye or unifieddyes -- check if we are using dye or unifieddyes
local unifieddyes = minetest.get_modpath("unifieddyes") local unifieddyes = minetest.get_modpath("unifieddyes")
-- register recipes with the same crafting ratios as `dye` provides for _, data in ipairs(extractor_recipes) do
local dye_recipes = {
{"technic:coal_dust", "dye:black 2"},
{"default:blueberries", "dye:violet 2"},
{"default:grass_1", "dye:green 1"},
{"default:dry_shrub", "dye:brown 1"},
{"default:junglegrass", "dye:green 2"},
{"default:cactus", "dye:green 4"},
{"flowers:geranium", "dye:blue 4"},
{"flowers:dandelion_white", "dye:white 4"},
{"flowers:dandelion_yellow", "dye:yellow 4"},
{"flowers:tulip", "dye:orange 4"},
{"flowers:rose", "dye:red 4"},
{"flowers:viola", "dye:violet 4"},
{"bushes:blackberry", unifieddyes and "unifieddyes:magenta_s50 4" or "dye:violet 4"},
{"bushes:blueberry", unifieddyes and "unifieddyes:magenta_s50 4" or "dye:magenta 4"},
}
for _, data in ipairs(dye_recipes) do
technic.register_extractor_recipe({input = {data[1]}, output = data[2]}) technic.register_extractor_recipe({input = {data[1]}, output = data[2]})
end end

View File

@ -8,14 +8,7 @@ function technic.register_freezer_recipe(data)
technic.register_recipe("freezing", data) technic.register_recipe("freezing", data)
end end
local recipes = { for _, data in pairs(freezer_recipes) do
{"bucket:bucket_water", { "default:ice", "bucket:bucket_empty" } },
{"bucket:bucket_river_water", { "default:ice", "bucket:bucket_empty" } },
{"default:dirt", "default:dirt_with_snow" },
{"bucket:bucket_lava", { "default:obsidian", "bucket:bucket_empty" } }
}
for _, data in pairs(recipes) do
technic.register_freezer_recipe({input = {data[1]}, output = data[2]}) technic.register_freezer_recipe({input = {data[1]}, output = data[2]})
end end

View File

@ -26,12 +26,12 @@ function technic.register_generator(data)
local ltier = string.lower(tier) local ltier = string.lower(tier)
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, ["technic_"..ltier]=1} technic_machine=1, ["technic_"..ltier]=1, pickaxey=3}
if data.tube then if data.tube then
groups.tubedevice = 1 groups.tubedevice = 1
groups.tubedevice_receiver = 1 groups.tubedevice_receiver = 1
end end
local active_groups = {not_in_creative_inventory = 1} local active_groups = {not_in_creative_inventory = 1, pickaxey=3}
for k, v in pairs(groups) do active_groups[k] = v end for k, v in pairs(groups) do active_groups[k] = v end
local generator_formspec = local generator_formspec =
@ -125,7 +125,7 @@ function technic.register_generator(data)
groups = groups, groups = groups,
connect_sides = {"bottom", "back", "left", "right"}, connect_sides = {"bottom", "back", "left", "right"},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
tube = data.tube and tube or nil, tube = data.tube and tube or nil,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -176,6 +176,9 @@ function technic.register_generator(data)
end end
meta:set_string("formspec", generator_formspec..form_buttons) meta:set_string("formspec", generator_formspec..form_buttons)
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_node("technic:"..ltier.."_generator_active", { minetest.register_node("technic:"..ltier.."_generator_active", {
@ -192,7 +195,7 @@ function technic.register_generator(data)
groups = active_groups, groups = active_groups,
connect_sides = {"bottom"}, connect_sides = {"bottom"},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
tube = data.tube and tube or nil, tube = data.tube and tube or nil,
drop = "technic:"..ltier.."_generator", drop = "technic:"..ltier.."_generator",
can_dig = technic.machine_can_dig, can_dig = technic.machine_can_dig,
@ -284,6 +287,9 @@ function technic.register_generator(data)
form_buttons form_buttons
) )
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}) })
technic.register_machine(tier, "technic:"..ltier.."_generator", technic.producer) technic.register_machine(tier, "technic:"..ltier.."_generator", technic.producer)

View File

@ -8,33 +8,11 @@ function technic.register_grinder_recipe(data)
technic.register_recipe("grinding", data) technic.register_recipe("grinding", data)
end end
local recipes = {
-- Dusts
{"default:coal_lump", "technic:coal_dust 2"},
{"default:copper_lump", "technic:copper_dust 2"},
{"default:desert_stone", "default:desert_sand"},
{"default:gold_lump", "technic:gold_dust 2"},
{"default:iron_lump", "technic:wrought_iron_dust 2"},
{"default:tin_lump", "technic:tin_dust 2"},
{"technic:chromium_lump", "technic:chromium_dust 2"},
{"technic:uranium_lump", "technic:uranium_dust 2"},
{"technic:zinc_lump", "technic:zinc_dust 2"},
{"technic:lead_lump", "technic:lead_dust 2"},
{"technic:sulfur_lump", "technic:sulfur_dust 2"},
{"default:stone", "technic:stone_dust"},
{"default:sand", "technic:stone_dust"},
{"default:desert_sand", "technic:stone_dust"},
{"default:silver_sand", "technic:stone_dust"},
-- Other if minetest.get_modpath("default") then
{"default:cobble", "default:gravel"}, table.insert(grinder_recipes, {"default:silver_sandstone", "default:silver_sand 2"}) -- reverse recipe can be found in the compressor
{"default:gravel", "default:sand"}, table.insert(grinder_recipes, {"default:silver_sand", "technic:stone_dust"})
{"default:sandstone", "default:sand 2"}, -- reverse recipe can be found in the compressor end
{"default:desert_sandstone", "default:desert_sand 2"}, -- reverse recipe can be found in the compressor
{"default:silver_sandstone", "default:silver_sand 2"}, -- reverse recipe can be found in the compressor
{"default:ice", "default:snowblock"},
}
-- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe) -- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe)
minetest.clear_craft({ minetest.clear_craft({
@ -54,27 +32,27 @@ minetest.clear_craft({
}) })
if minetest.get_modpath("farming") then if minetest.get_modpath("farming") then
table.insert(recipes, {"farming:seed_wheat", "farming:flour 1"}) table.insert(grinder_recipes, {"farming:seed_wheat", "farming:flour 1"})
end end
if minetest.get_modpath("moreores") then if minetest.get_modpath("moreores") then
table.insert(recipes, {"moreores:mithril_lump", "technic:mithril_dust 2"}) table.insert(grinder_recipes, {"moreores:mithril_lump", "technic:mithril_dust 2"})
table.insert(recipes, {"moreores:silver_lump", "technic:silver_dust 2"}) table.insert(grinder_recipes, {"moreores:silver_lump", "technic:silver_dust 2"})
end end
if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then
table.insert(recipes, {"gloopores:alatro_lump", "technic:alatro_dust 2"}) table.insert(grinder_recipes, {"gloopores:alatro_lump", "technic:alatro_dust 2"})
table.insert(recipes, {"gloopores:kalite_lump", "technic:kalite_dust 2"}) table.insert(grinder_recipes, {"gloopores:kalite_lump", "technic:kalite_dust 2"})
table.insert(recipes, {"gloopores:arol_lump", "technic:arol_dust 2"}) table.insert(grinder_recipes, {"gloopores:arol_lump", "technic:arol_dust 2"})
table.insert(recipes, {"gloopores:talinite_lump", "technic:talinite_dust 2"}) table.insert(grinder_recipes, {"gloopores:talinite_lump", "technic:talinite_dust 2"})
table.insert(recipes, {"gloopores:akalin_lump", "technic:akalin_dust 2"}) table.insert(grinder_recipes, {"gloopores:akalin_lump", "technic:akalin_dust 2"})
end end
if minetest.get_modpath("homedecor") then if minetest.get_modpath("homedecor") then
table.insert(recipes, {"home_decor:brass_ingot", "technic:brass_dust 1"}) table.insert(grinder_recipes, {"home_decor:brass_ingot", "technic:brass_dust 1"})
end end
for _, data in pairs(recipes) do for _, data in pairs(grinder_recipes) do
technic.register_grinder_recipe({input = {data[1]}, output = data[2]}) technic.register_grinder_recipe({input = {data[1]}, output = data[2]})
end end
@ -104,15 +82,15 @@ register_dust("Cast Iron", "technic:cast_iron_ingot")
register_dust("Chernobylite", "technic:chernobylite_block") register_dust("Chernobylite", "technic:chernobylite_block")
register_dust("Chromium", "technic:chromium_ingot") register_dust("Chromium", "technic:chromium_ingot")
register_dust("Coal", nil) register_dust("Coal", nil)
register_dust("Copper", "default:copper_ingot") register_dust("Copper", technic_compat.copper_ingredient)
register_dust("Lead", "technic:lead_ingot") register_dust("Lead", "technic:lead_ingot")
register_dust("Gold", "default:gold_ingot") register_dust("Gold", technic_compat.gold_ingot_ingredient)
register_dust("Mithril", "moreores:mithril_ingot") register_dust("Mithril", "moreores:mithril_ingot")
register_dust("Silver", "moreores:silver_ingot") register_dust("Silver", "moreores:silver_ingot")
register_dust("Stainless Steel", "technic:stainless_steel_ingot") register_dust("Stainless Steel", "technic:stainless_steel_ingot")
register_dust("Stone", "default:stone") register_dust("Stone", "default:stone")
register_dust("Sulfur", nil) register_dust("Sulfur", nil)
register_dust("Tin", "default:tin_ingot") register_dust("Tin", technic_compat.tin_ingredient)
register_dust("Wrought Iron", "technic:wrought_iron_ingot") register_dust("Wrought Iron", "technic:wrought_iron_ingot")
register_dust("Zinc", "technic:zinc_ingot") register_dust("Zinc", "technic:zinc_ingot")
if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then

View File

@ -41,12 +41,12 @@ function technic.register_base_machine(data)
data.modname = data.modname or minetest.get_current_modname() data.modname = data.modname or minetest.get_current_modname()
local groups = {cracky = 2, technic_machine = 1, ["technic_"..ltier] = 1} local groups = {cracky = 2, technic_machine = 1, ["technic_"..ltier] = 1, pickaxey=3}
if data.tube then if data.tube then
groups.tubedevice = 1 groups.tubedevice = 1
groups.tubedevice_receiver = 1 groups.tubedevice_receiver = 1
end end
local active_groups = {not_in_creative_inventory = 1} local active_groups = {not_in_creative_inventory = 1, pickaxey=3}
for k, v in pairs(groups) do active_groups[k] = v end for k, v in pairs(groups) do active_groups[k] = v end
local formspec = local formspec =
@ -174,7 +174,7 @@ function technic.register_base_machine(data)
tube = data.tube and tube or nil, tube = data.tube and tube or nil,
connect_sides = data.connect_sides or connect_default, connect_sides = data.connect_sides or connect_default,
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -228,6 +228,9 @@ function technic.register_base_machine(data)
end end
meta:set_string("formspec", formspec..form_buttons) meta:set_string("formspec", formspec..form_buttons)
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}) })
minetest.register_node(data.modname..":"..ltier.."_"..machine_name.."_active",{ minetest.register_node(data.modname..":"..ltier.."_"..machine_name.."_active",{
@ -245,7 +248,7 @@ function technic.register_base_machine(data)
groups = active_groups, groups = active_groups,
connect_sides = data.connect_sides or connect_default, connect_sides = data.connect_sides or connect_default,
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
tube = data.tube and tube or nil, tube = data.tube and tube or nil,
can_dig = technic.machine_can_dig, can_dig = technic.machine_can_dig,
allow_metadata_inventory_put = technic.machine_inventory_put, allow_metadata_inventory_put = technic.machine_inventory_put,
@ -273,6 +276,9 @@ function technic.register_base_machine(data)
end end
meta:set_string("formspec", formspec..form_buttons) meta:set_string("formspec", formspec..form_buttons)
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}) })
technic.register_machine(tier, data.modname..":"..ltier.."_"..machine_name, technic.receiver) technic.register_machine(tier, data.modname..":"..ltier.."_"..machine_name, technic.receiver)

View File

@ -121,22 +121,25 @@ function technic.get_recipe(typename, items)
return return
end end
local recipe = technic.recipes[typename].recipes[index] local recipe = technic.recipes[typename].recipes[index]
if recipe then if recipe then
local new_input = {} local new_input = {}
for i, stack in ipairs(items) do for i, stack in ipairs(items) do
if stack:get_count() < recipe.input[stack:get_name()] then local input_count = recipe.input[stack:get_name()]
return nil if input_count == nil then
else -- Handle nil value, maybe return nil or log a warning
new_input[i] = ItemStack(stack) return nil
new_input[i]:take_item(recipe.input[stack:get_name()]) end
end if stack:get_count() < input_count then
end return nil
return {time = recipe.time, else
new_input = new_input, new_input[i] = ItemStack(stack)
output = recipe.output} new_input[i]:take_item(input_count)
else end
return nil end
end return {time = recipe.time, new_input = new_input, output = recipe.output}
else
return nil
end
end end

View File

@ -43,9 +43,9 @@ function technic.register_solar_array(data)
tiles = {"technic_"..ltier.."_solar_array_top.png", "technic_"..ltier.."_solar_array_bottom.png", tiles = {"technic_"..ltier.."_solar_array_top.png", "technic_"..ltier.."_solar_array_bottom.png",
"technic_"..ltier.."_solar_array_side.png", "technic_"..ltier.."_solar_array_side.png", "technic_"..ltier.."_solar_array_side.png", "technic_"..ltier.."_solar_array_side.png",
"technic_"..ltier.."_solar_array_side.png", "technic_"..ltier.."_solar_array_side.png"}, "technic_"..ltier.."_solar_array_side.png", "technic_"..ltier.."_solar_array_side.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_machine=1, ["technic_"..ltier]=1}, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_machine=1, ["technic_"..ltier]=1, pickaxey=3},
connect_sides = {"bottom"}, connect_sides = {"bottom"},
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
description = S("Arrayed Solar %s Generator"):format(tier), description = S("Arrayed Solar %s Generator"):format(tier),
active = false, active = false,
drawtype = "nodebox", drawtype = "nodebox",
@ -59,6 +59,9 @@ function technic.register_solar_array(data)
meta:set_int(tier.."_EU_supply", 0) meta:set_int(tier.."_EU_supply", 0)
end, end,
technic_run = run, technic_run = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}) })
technic.register_machine(tier, "technic:solar_array_"..ltier, technic.producer) technic.register_machine(tier, "technic:solar_array_"..ltier, technic.producer)

View File

@ -198,9 +198,9 @@ minetest.register_node("technic:supply_converter", {
"technic_supply_converter_side.png" "technic_supply_converter_side.png"
}, },
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_all_tiers=1}, technic_machine=1, technic_all_tiers=1, pickaxey=3},
connect_sides = {"top", "bottom"}, connect_sides = {"top", "bottom"},
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_receive_fields = supply_converter_receive_fields, on_receive_fields = supply_converter_receive_fields,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
@ -218,6 +218,10 @@ minetest.register_node("technic:supply_converter", {
digiline = digiline_def, digiline = digiline_def,
technic_run = run, technic_run = run,
technic_on_disable = run, technic_on_disable = run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -15,7 +15,7 @@ minetest.register_craft({
output = "technic:switching_station", output = "technic:switching_station",
recipe = { recipe = {
{"", "technic:lv_transformer", ""}, {"", "technic:lv_transformer", ""},
{"default:copper_ingot", "technic:machine_casing", "default:copper_ingot"}, {technic_compat.copper_ingredient, "technic:machine_casing", technic_compat.copper_ingredient},
{"technic:lv_cable", "technic:lv_cable", "technic:lv_cable"} {"technic:lv_cable", "technic:lv_cable", "technic:lv_cable"}
} }
}) })
@ -36,9 +36,9 @@ minetest.register_node("technic:switching_station",{
"technic_water_mill_top_active.png", "technic_water_mill_top_active.png",
"technic_water_mill_top_active.png", "technic_water_mill_top_active.png",
"technic_water_mill_top_active.png"}, "technic_water_mill_top_active.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_all_tiers=1}, groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_all_tiers=1,pickaxey=3},
connect_sides = {"bottom"}, connect_sides = {"bottom"},
sounds = default.node_sound_wood_defaults(), sounds = technic_compat.wood_sounds,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Switching Station")) meta:set_string("infotext", S("Switching Station"))

View File

@ -1,3 +1,4 @@
name = technic name = technic
depends = default, pipeworks, technic_worldgen, basic_materials depends = pipeworks, technic_worldgen, basic_materials, technic_compat
optional_depends = bucket, screwdriver, mesecons, mesecons_mvps, digilines, digiline_remote, intllib, unified_inventory, vector_extras, dye, craftguide,i3 optional_depends = bucket, default, screwdriver, mesecons,mesecons_torch, mesecons_mvps, digilines, digiline_remote, intllib, unified_inventory, vector_extras, dye, craftguide,i3, mcl_core, mcl_craftguide
supported_games = minetest_game,mineclone2,mineclonia,mineclone5

View File

@ -52,7 +52,7 @@ local rad_resistance_node = {
["default:ice"] = 5.6, ["default:ice"] = 5.6,
["default:lava_flowing"] = 8.5, ["default:lava_flowing"] = 8.5,
["default:lava_source"] = 17, ["default:lava_source"] = 17,
["default:mese"] = 21, [technic_compat.mese_block_ingredient] = 21,
["default:mossycobble"] = 15, ["default:mossycobble"] = 15,
["default:tinblock"] = 37, ["default:tinblock"] = 37,
["pbj_pup:pbj_pup"] = 10000, ["pbj_pup:pbj_pup"] = 10000,
@ -64,7 +64,7 @@ local rad_resistance_node = {
["nyancat:nyancat"] = 10000, ["nyancat:nyancat"] = 10000,
["nyancat:nyancat_rainbow"] = 10000, ["nyancat:nyancat_rainbow"] = 10000,
["default:obsidian"] = 18, ["default:obsidian"] = 18,
["default:obsidian_glass"] = 18, [technic_compat.obsidian_glass_ingredient] = 18,
["default:sand"] = 10, ["default:sand"] = 10,
["default:sandstone"] = 15, ["default:sandstone"] = 15,
["default:sandstonebrick"] = 15, ["default:sandstonebrick"] = 15,
@ -153,7 +153,7 @@ local rad_resistance_node = {
["technic:chromium_block"] = 37, ["technic:chromium_block"] = 37,
["technic:corium_flowing"] = 40, ["technic:corium_flowing"] = 40,
["technic:corium_source"] = 80, ["technic:corium_source"] = 80,
["technic:granite"] = 18, [technic_compat.granite_ingredient] = 18,
["technic:lead_block"] = 80, ["technic:lead_block"] = 80,
["technic:marble"] = 18, ["technic:marble"] = 18,
["technic:marble_bricks"] = 18, ["technic:marble_bricks"] = 18,
@ -457,7 +457,7 @@ minetest.register_node("technic:chernobylite_block", {
tiles = {"technic_chernobylite_block.png"}, tiles = {"technic_chernobylite_block.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky=1, radioactive=4, level=2}, groups = {cracky=1, radioactive=4, level=2},
sounds = default.node_sound_stone_defaults(), sounds = technic_compat.stone_sounds,
light_source = 2, light_source = 2,
}) })

View File

@ -86,8 +86,8 @@ technic.register_can({
can_description = S("Water Can"), can_description = S("Water Can"),
can_inventory_image = "technic_water_can.png", can_inventory_image = "technic_water_can.png",
can_capacity = 16, can_capacity = 16,
liquid_source_name = "default:water_source", liquid_source_name = technic_compat.water_source_fluid,
liquid_flowing_name = "default:water_flowing", liquid_flowing_name = technic_compat.water_flowing_fluid,
}) })
minetest.register_craft({ minetest.register_craft({
@ -104,8 +104,8 @@ technic.register_can({
can_description = S("Lava Can"), can_description = S("Lava Can"),
can_inventory_image = "technic_lava_can.png", can_inventory_image = "technic_lava_can.png",
can_capacity = 8, can_capacity = 8,
liquid_source_name = "default:lava_source", liquid_source_name = technic_compat.lava_source_fluid,
liquid_flowing_name = "default:lava_flowing", liquid_flowing_name = technic_compat.lava_flowing_fluid,
}) })
minetest.register_craft({ minetest.register_craft({
@ -122,15 +122,15 @@ technic.register_can({
can_description = S("River Water Can"), can_description = S("River Water Can"),
can_inventory_image = "technic_river_water_can.png", can_inventory_image = "technic_river_water_can.png",
can_capacity = 16, can_capacity = 16,
liquid_source_name = "default:river_water_source", liquid_source_name = technic_compat.river_water_source_fluid,
liquid_flowing_name = "default:river_water_flowing", liquid_flowing_name = technic_compat.river_water_flowing_fluid,
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:river_water_can 1', output = 'technic:river_water_can 1',
recipe = { recipe = {
{'technic:zinc_ingot', 'technic:rubber', 'technic:zinc_ingot'}, {'technic:zinc_ingot', 'technic:rubber', 'technic:zinc_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'}, {technic_compat.iron_ingredient, '', technic_compat.iron_ingredient},
{'technic:zinc_ingot', 'default:steel_ingot', 'technic:zinc_ingot'}, {'technic:zinc_ingot', technic_compat.iron_ingredient, 'technic:zinc_ingot'},
} }
}) })

View File

@ -338,7 +338,13 @@ minetest.register_tool("technic:chainsaw", {
}) })
local mesecons_button = minetest.get_modpath("mesecons_button") local mesecons_button = minetest.get_modpath("mesecons_button")
local trigger = mesecons_button and "mesecons_button:button_off" or "default:mese_crystal_fragment" local trigger = nil
if minetest.get_modpath("mcl_core") then
trigger = "mesecons_button:button_stone_off"
else
trigger = mesecons_button and "mesecons_button:button_off" or "default:mese_crystal_fragment"
end
minetest.register_craft({ minetest.register_craft({
output = "technic:chainsaw", output = "technic:chainsaw",

View File

@ -114,11 +114,14 @@ minetest.register_node("technic:light", {
drawtype = "glasslike", drawtype = "glasslike",
tiles = {"technic_light.png"}, tiles = {"technic_light.png"},
paramtype = "light", paramtype = "light",
groups = {not_in_creative_inventory = 1}, groups = {not_in_creative_inventory = 1, pickaxey=3},
drop = "", drop = "",
walkable = false, walkable = false,
buildable_to = true, buildable_to = true,
sunlight_propagates = true, sunlight_propagates = true,
light_source = minetest.LIGHT_MAX, light_source = minetest.LIGHT_MAX,
pointable = false, pointable = false,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}) })

View File

@ -6,9 +6,9 @@ local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:mining_drill', output = 'technic:mining_drill',
recipe = { recipe = {
{'default:tin_ingot', 'technic:diamond_drill_head', 'default:tin_ingot'}, {technic_compat.tin_ingredient, 'technic:diamond_drill_head', technic_compat.tin_ingredient},
{'technic:stainless_steel_ingot', 'basic_materials:motor', 'technic:stainless_steel_ingot'}, {'technic:stainless_steel_ingot', 'basic_materials:motor', 'technic:stainless_steel_ingot'},
{'', 'technic:red_energy_crystal', 'default:copper_ingot'}, {'', 'technic:red_energy_crystal', technic_compat.copper_ingredient},
} }
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -11,25 +11,25 @@ local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = "technic:laser_mk1", output = "technic:laser_mk1",
recipe = { recipe = {
{"default:diamond", "basic_materials:brass_ingot", "default:obsidian_glass"}, {technic_compat.diamond_ingredient, "basic_materials:brass_ingot", technic_compat.obsidian_glass_ingredient},
{"", "basic_materials:brass_ingot", "technic:red_energy_crystal"}, {"","basic_materials:brass_ingot", "technic:red_energy_crystal"},
{"", "", "default:copper_ingot"}, {"", "", technic_compat.copper_ingredient},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "technic:laser_mk2", output = "technic:laser_mk2",
recipe = { recipe = {
{"default:diamond", "technic:carbon_steel_ingot", "technic:laser_mk1"}, {technic_compat.diamond_ingredient, "technic:carbon_steel_ingot", "technic:laser_mk1"},
{"", "technic:carbon_steel_ingot", "technic:green_energy_crystal"}, {"", "technic:carbon_steel_ingot", "technic:green_energy_crystal"},
{"", "", "default:copper_ingot"}, {"", "", technic_compat.copper_ingredient},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "technic:laser_mk3", output = "technic:laser_mk3",
recipe = { recipe = {
{"default:diamond", "technic:carbon_steel_ingot", "technic:laser_mk2"}, {technic_compat.diamond_ingredient, "technic:carbon_steel_ingot", "technic:laser_mk2"},
{"", "technic:carbon_steel_ingot", "technic:blue_energy_crystal"}, {"", "technic:carbon_steel_ingot", "technic:blue_energy_crystal"},
{"", "", "default:copper_ingot"}, {"", "", technic_compat.copper_ingredient},
} }
}) })

View File

@ -91,9 +91,9 @@ minetest.register_tool("technic:sonic_screwdriver", {
minetest.register_craft({ minetest.register_craft({
output = "technic:sonic_screwdriver", output = "technic:sonic_screwdriver",
recipe = { recipe = {
{"", "default:diamond", ""}, {"", technic_compat.diamond_ingredient, ""},
{"mesecons_materials:fiber", "technic:battery", "mesecons_materials:fiber"}, {technic_compat.mesecons_fiber_ingredient, "technic:battery", technic_compat.mesecons_fiber_ingredient},
{"mesecons_materials:fiber", "moreores:mithril_ingot", "mesecons_materials:fiber"} {technic_compat.mesecons_fiber_ingredient, "moreores:mithril_ingot", technic_compat.mesecons_fiber_ingredient}
} }
}) })

View File

@ -38,8 +38,8 @@ minetest.register_tool("technic:treetap", {
minetest.register_craft({ minetest.register_craft({
output = "technic:treetap", output = "technic:treetap",
recipe = { recipe = {
{"pipeworks:tube_1", "group:wood", "default:stick"}, {"pipeworks:tube_1", "group:wood", technic_compat.stick_ingredient},
{"", "default:stick", "default:stick"} {"", technic_compat.stick_ingredient, technic_compat.stick_ingredient}
}, },
}) })

View File

@ -1,18 +1,18 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:copper_chest 1', output = 'technic:copper_chest 1',
recipe = { recipe = {
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'}, {copper_ingredient,copper_ingredient,copper_ingredient},
{'default:copper_ingot','technic:iron_chest','default:copper_ingot'}, {copper_ingredient,'technic:iron_chest',copper_ingredient},
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'}, {copper_ingredient,copper_ingredient,copper_ingredient},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:copper_locked_chest 1', output = 'technic:copper_locked_chest 1',
recipe = { recipe = {
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'}, {copper_ingredient,copper_ingredient,copper_ingredient},
{'default:copper_ingot','technic:iron_locked_chest','default:copper_ingot'}, {copper_ingredient,'technic:iron_locked_chest',copper_ingredient},
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'}, {copper_ingredient,copper_ingredient,copper_ingredient},
} }
}) })

View File

@ -11,18 +11,18 @@ for _, material in ipairs(material_list) do
minetest.register_craft({ minetest.register_craft({
output = 'technic:gold_chest', output = 'technic:gold_chest',
recipe = { recipe = {
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'}, {gold_ingot_ingredient,gold_ingot_ingredient,gold_ingot_ingredient},
{'default:gold_ingot',"technic:"..material.."_chest",'default:gold_ingot'}, {gold_ingot_ingredient,"technic:"..material.."_chest",gold_ingot_ingredient},
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'}, {gold_ingot_ingredient,gold_ingot_ingredient,gold_ingot_ingredient},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:gold_locked_chest', output = 'technic:gold_locked_chest',
recipe = { recipe = {
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'}, {gold_ingot_ingredient,gold_ingot_ingredient,gold_ingot_ingredient},
{'default:gold_ingot',"technic:"..material.."_locked_chest",'default:gold_ingot'}, {gold_ingot_ingredient,"technic:"..material.."_locked_chest",gold_ingot_ingredient},
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'}, {gold_ingot_ingredient,gold_ingot_ingredient,gold_ingot_ingredient},
} }
}) })
end end

View File

@ -4,6 +4,76 @@
local modpath = minetest.get_modpath("technic_chests") local modpath = minetest.get_modpath("technic_chests")
-- Check if mcl_core or default is installed
if not minetest.get_modpath("mcl_core") and not minetest.get_modpath("default") then
error(minetest.get_current_modname().." ".."requires mcl_core or default to be installed (please install MTG or MCL2, or compatible games)")
end
-- Mineclone2 Support
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
node_sounds = nil
if minetest.get_modpath("mcl_sounds") then
node_sounds = mcl_sounds.node_sound_defaults()
else
node_sounds = default.node_sound_defaults()
end
wood_sounds = nil
if minetest.get_modpath("mcl_sounds") then
wood_sounds = mcl_sounds.node_sound_wood_defaults()
else
wood_sounds = default.node_sound_wood_defaults()
end
-- Mineclone2 Recipes
chest_ingredient = nil
if minetest.get_modpath("mcl_core") then
chest_ingredient = "mcl_chests:chest"
else
chest_ingredient = "default:chest"
end
copper_ingredient = nil
if minetest.get_modpath("mcl_core") then
copper_ingredient = "mcl_copper:copper_ingot"
else
copper_ingredient = 'default:copper_ingot'
end
gold_ingot_ingredient = nil
if minetest.get_modpath("mcl_core") then
gold_ingot_ingredient = "mcl_core:gold_ingot"
else
gold_ingot_ingredient = 'default:gold_ingot'
end
granite_ingredient = nil
if minetest.get_modpath("mcl_core") then
granite_ingredient = "mcl_core:granite"
else
granite_ingredient = 'technic:granite'
end
granite_bricks_ingredient = nil
if minetest.get_modpath("mcl_core") then
granite_bricks_ingredient = "mcl_core:granite_smooth"
else
granite_bricks_ingredient = 'technic:granite_bricks'
end
coal_ingredient = nil
if minetest.get_modpath("mcl_core") then
coal_ingredient = "group:coal"
else
coal_ingredient = "default:coal_lump"
end
technic = rawget(_G, "technic") or {} technic = rawget(_G, "technic") or {}
technic.chests = {} technic.chests = {}

View File

@ -9,11 +9,12 @@ minetest.register_craft({
output = 'technic:iron_chest 1', output = 'technic:iron_chest 1',
recipe = { recipe = {
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot}, {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
{cast_iron_ingot,'default:chest',cast_iron_ingot}, {cast_iron_ingot,chest_ingredient,cast_iron_ingot},
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot}, {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
} }
}) })
if minetest.get_modpath("default") then
minetest.register_craft({ minetest.register_craft({
output = 'technic:iron_locked_chest 1', output = 'technic:iron_locked_chest 1',
recipe = { recipe = {
@ -22,6 +23,7 @@ minetest.register_craft({
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot}, {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
} }
}) })
end
minetest.register_craft({ minetest.register_craft({
output = 'technic:iron_locked_chest 1', output = 'technic:iron_locked_chest 1',

View File

@ -1,3 +1,4 @@
name = technic_chests name = technic_chests
depends = default, basic_materials depends = basic_materials, technic_compat
optional_depends = moreblocks, moreores, pipeworks, intllib, tubelib optional_depends = moreblocks, moreores, pipeworks, intllib, tubelib, default, mcl_core
supported_games = minetest_game,mineclone2,mineclonia,mineclone5

View File

@ -298,7 +298,7 @@ function technic.chests:definition(name, data)
groups = self.groups, groups = self.groups,
tube = self.tube, tube = self.tube,
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = wood_sounds,
after_place_node = locked_after_place, after_place_node = locked_after_place,
after_dig_node = pipeworks.after_dig, after_dig_node = pipeworks.after_dig,
@ -321,7 +321,12 @@ function technic.chests:definition(name, data)
minetest.remove_node(pos) minetest.remove_node(pos)
return drops return drops
end, end,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
} }
def.groups.pickaxey = 3
if data.locked then if data.locked then
def.allow_metadata_inventory_move = self.inv_move def.allow_metadata_inventory_move = self.inv_move
def.allow_metadata_inventory_put = self.inv_put def.allow_metadata_inventory_put = self.inv_put

View File

@ -19,9 +19,9 @@ if technic_cnc.use_technic then
minetest.register_craft({ minetest.register_craft({
output = 'technic:cnc', output = 'technic:cnc',
recipe = { recipe = {
{'default:glass', 'technic:diamond_drill_head', 'default:glass'}, {technic_cnc.compat.glass_ingredient, 'technic:diamond_drill_head', technic_cnc.compat.glass_ingredient},
{'technic:control_logic_unit', 'technic:machine_casing', 'basic_materials:motor'}, {'technic:control_logic_unit', 'technic:machine_casing', 'basic_materials:motor'},
{'technic:carbon_steel_ingot', 'technic:lv_cable', 'technic:carbon_steel_ingot'}, {'technic:carbon_steel_ingot', 'technic:lv_cable', 'technic:carbon_steel_ingot'},
}, },
}) })
@ -34,9 +34,9 @@ else
minetest.register_craft({ minetest.register_craft({
output = 'technic:cnc', output = 'technic:cnc',
recipe = { recipe = {
{'default:glass', 'default:diamond', 'default:glass'}, {technic_cnc.compat.glass_ingredient, technic_cnc.compat.diamond_ingredient, technic_cnc.compat.glass_ingredient},
{'basic_materials:ic', 'default:steelblock', 'basic_materials:motor'}, {'basic_materials:ic', 'default:steelblock', 'basic_materials:motor'},
{'default:steel_ingot', 'default:mese', 'default:steel_ingot'}, {'default:steel_ingot', technic_cnc.compat.mese_block_ingredient, 'default:steel_ingot'},
}, },
}) })
@ -250,7 +250,7 @@ minetest.register_node(":technic:cnc", {
description = desc_tr, description = desc_tr,
tiles = {"technic_cnc_top.png", "technic_cnc_bottom.png", "technic_cnc_side.png", tiles = {"technic_cnc_top.png", "technic_cnc_bottom.png", "technic_cnc_side.png",
"technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front.png"}, "technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front.png"},
groups = {cracky=2, technic_machine=1, technic_lv=1}, groups = {cracky=2, technic_machine=1, technic_lv=1, pickaxey=3},
connect_sides = {"bottom", "back", "left", "right"}, connect_sides = {"bottom", "back", "left", "right"},
paramtype2 = "facedir", paramtype2 = "facedir",
legacy_facedir_simple = true, legacy_facedir_simple = true,
@ -269,6 +269,9 @@ minetest.register_node(":technic:cnc", {
allow_metadata_inventory_move = allow_metadata_inventory_move, allow_metadata_inventory_move = allow_metadata_inventory_move,
on_receive_fields = form_handler, on_receive_fields = form_handler,
technic_run = technic_cnc.use_technic and run, technic_run = technic_cnc.use_technic and run,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}) })
-- Active state block -- Active state block
@ -278,7 +281,7 @@ if technic_cnc.use_technic then
description = desc_tr, description = desc_tr,
tiles = {"technic_cnc_top_active.png", "technic_cnc_bottom.png", "technic_cnc_side.png", tiles = {"technic_cnc_top_active.png", "technic_cnc_bottom.png", "technic_cnc_side.png",
"technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front_active.png"}, "technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front_active.png"},
groups = {cracky=2, technic_machine=1, technic_lv=1, not_in_creative_inventory=1}, groups = {cracky=2, technic_machine=1, technic_lv=1, not_in_creative_inventory=1, pickaxey=3},
connect_sides = {"bottom", "back", "left", "right"}, connect_sides = {"bottom", "back", "left", "right"},
paramtype2 = "facedir", paramtype2 = "facedir",
drop = "technic:cnc", drop = "technic:cnc",
@ -290,6 +293,9 @@ if technic_cnc.use_technic then
on_receive_fields = form_handler, on_receive_fields = form_handler,
technic_run = run, technic_run = run,
technic_disabled_machine_name = "technic:cnc", technic_disabled_machine_name = "technic:cnc",
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}) })
technic.register_machine("LV", "technic:cnc", technic.receiver) technic.register_machine("LV", "technic:cnc", technic.receiver)

View File

@ -273,7 +273,8 @@ technic_cnc.programs_disable = {
-- Generic function for registering all the different node types -- Generic function for registering all the different node types
function technic_cnc.register_program(recipeitem, suffix, model, groups, images, description, cbox, sbox) function technic_cnc.register_program(recipeitem, suffix, model, groups, images, description, cbox, sbox)
groups.pickaxey = 3
local dtype local dtype
local nodeboxdef local nodeboxdef
local meshdef local meshdef
@ -303,7 +304,10 @@ function technic_cnc.register_program(recipeitem, suffix, model, groups, images,
walkable = true, walkable = true,
groups = groups, groups = groups,
selection_box = sbox, selection_box = sbox,
collision_box = cbox collision_box = cbox,
_mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}) })
end end

View File

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

View File

@ -7,6 +7,14 @@ technic_cnc.technic_modpath = minetest.get_modpath("technic")
technic_cnc.use_technic = technic_cnc.technic_modpath technic_cnc.use_technic = technic_cnc.technic_modpath
and minetest.settings:get_bool("technic_cnc_use_technic") ~= false and minetest.settings:get_bool("technic_cnc_use_technic") ~= false
local mcl = minetest.get_modpath("mcl_core")
-- Compatibility table
technic_cnc.compat = {}
technic_cnc.compat.glass_ingredient = mcl and "mcl_core:glass" or 'default:glass'
technic_cnc.compat.mese_block_ingredient = mcl and "mesecons_torch:redstoneblock" or "default:mese"
technic_cnc.compat.diamond_ingredient = mcl and "mcl_core:diamond" or "default:diamond"
if rawget(_G, "intllib") then if rawget(_G, "intllib") then
technic_cnc.getter = intllib.Getter() technic_cnc.getter = intllib.Getter()
else else
@ -23,6 +31,14 @@ else
end end
end end
local S = technic_cnc.getter
-- Check if mcl_core or default is installed
if not minetest.get_modpath("mcl_core") and not minetest.get_modpath("default") then
error(S(minetest.get_current_modname()).." "..S("requires mcl_core or default to be installed (please install MTG or MCL2, or compatible games)"))
end
dofile(modpath.."/cnc.lua") dofile(modpath.."/cnc.lua")
dofile(modpath.."/cnc_api.lua") dofile(modpath.."/cnc_api.lua")
dofile(modpath.."/cnc_materials.lua") dofile(modpath.."/cnc_materials.lua")

View File

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

17
technic_compat/init.lua Normal file
View File

@ -0,0 +1,17 @@
local modpath = minetest.get_modpath("technic_compat")
-- Compatibility table
technic_compat = {}
technic_compat.mcl = minetest.get_modpath("mcl_core")
technic_compat.default = minetest.get_modpath("default") and default or {}
local mcl_path = modpath .. "/mcl/"
-- Load files
dofile(mcl_path .. "sounds.lua")
dofile(mcl_path .. "textures.lua")
dofile(mcl_path .. "miscellaneous.lua")
dofile(mcl_path .. "fluids.lua")
dofile(mcl_path .. "crafting.lua")
dofile(mcl_path .. "craftguide.lua")

View File

@ -0,0 +1,189 @@
-- Register craft types for each machine
if technic_compat.mcl then
mcl_craftguide.register_craft_type("centrifuge", {
description = "Centrifuge",
icon = "technic_mv_centrifuge_front_active.png",
})
mcl_craftguide.register_craft_type("compressor", {
description = "Compressor",
icon = "technic_lv_compressor_front_active.png",
})
mcl_craftguide.register_craft_type("extractor", {
description = "Extractor",
icon = "technic_lv_extractor_front_active.png",
})
mcl_craftguide.register_craft_type("freezer", {
description = "Freezer",
icon = "technic_mv_freezer_front_active.png",
})
mcl_craftguide.register_craft_type("grinder", {
description = "Grinder",
icon = "technic_lv_grinder_front_active.png",
})
mcl_craftguide.register_craft_type("alloy_furnace", {
description = "Alloy Furnace",
icon = "technic_coal_alloy_furnace_front_active.png",
})
centrifuge_recipes = {
{ "technic:bronze_dust 8", "technic:copper_dust 7", "technic:tin_dust" },
{ "technic:stainless_steel_dust 5", "technic:wrought_iron_dust 4", "technic:chromium_dust" },
{ "technic:brass_dust 3", "technic:copper_dust 2", "technic:zinc_dust" },
{ "technic:chernobylite_dust", technic_compat.sand_ingredient, "technic:uranium3_dust" },
{ technic_compat.dirt_ingredient.." 4", technic_compat.sand_ingredient, technic_compat.gravel_ingredient, "default:clay_lump 2" },
}
compressor_recipes = {
{technic_compat.snow_block_ingredient, technic_compat.ice_block_ingredient},
{technic_compat.sand_ingredient.." 2", technic_compat.sandstone_ingredient},
{technic_compat.desert_sand_ingredient.." 2", technic_compat.desert_stone_ingredient},
{technic_compat.desert_sand_ingredient, technic_compat.desert_stone_ingredient},
{"technic:mixed_metal_ingot", "technic:composite_plate"},
{technic_compat.copper_ingredient.." 5", "technic:copper_plate"},
{"technic:coal_dust 4", "technic:graphite"},
{"technic:carbon_cloth", "technic:carbon_plate"},
{"technic:uranium35_ingot 5", "technic:uranium_fuel"},
}
extractor_recipes = {
{"technic:coal_dust", technic_compat.dye_black .. " 2"},
{technic_compat.blueberries_ingredient, technic_compat.dye_violet .. " 2"},
{technic_compat.grass_ingredient, technic_compat.dye_green .. " 1"},
{technic_compat.dry_shrub_ingredient, technic_compat.dye_brown .. " 1"},
{technic_compat.junglegrass_ingredient, technic_compat.dye_green .. " 2"},
{technic_compat.cactus_ingredient, technic_compat.dye_green .. " 4"},
{technic_compat.geranium_ingredient, technic_compat.dye_blue .. " 4"},
{technic_compat.dandelion_white_ingredient, technic_compat.dye_white .. " 4"},
{technic_compat.dandelion_yellow_ingredient, technic_compat.dye_yellow .. " 4"},
{technic_compat.tulip_ingredient, technic_compat.dye_orange .. " 4"},
{technic_compat.rose_ingredient, technic_compat.dye_red .. " 4"},
{technic_compat.viola_ingredient, technic_compat.dye_violet .. " 4"},
{technic_compat.blackberry_ingredient, unifieddyes and "unifieddyes:magenta_s50 4" or technic_compat.dye_violet .. " 4"},
{technic_compat.blueberry_ingredient, unifieddyes and "unifieddyes:magenta_s50 4" or ""},
}
freezer_recipes = {
{technic_compat.water_bucket_ingredient, { technic_compat.ice_block_ingredient, technic_compat.emtpy_bucket_ingredient } },
{technic_compat.bucket_river_water_ingredient, { technic_compat.ice_block_ingredient, technic_compat.emtpy_bucket_ingredient } },
{technic_compat.dirt_ingredient , technic_compat.dirt_with_snow_ingredient },
{technic_compat.bucket_lava_ingredient, { technic_compat.obsidian_ingredient, technic_compat.emtpy_bucket_ingredient } }
}
grinder_recipes = {
-- Dusts
{technic_compat.coal_ingredient, "technic:coal_dust 2"},
{technic_compat.copper_lump_ingredient, "technic:copper_dust 2"},
{technic_compat.desert_stone_ingredient, technic_compat.desert_sand_ingredient},
{technic_compat.gold_lump_ingredient, "technic:gold_dust 2"},
{technic_compat.iron_lump_ingredient, "technic:wrought_iron_dust 2"},
{"moreores:tin_lump", "technic:tin_dust 2"},
{"technic:chromium_lump", "technic:chromium_dust 2"},
{"technic:uranium_lump", "technic:uranium_dust 2"},
{"technic:zinc_lump", "technic:zinc_dust 2"},
{"technic:lead_lump", "technic:lead_dust 2"},
{"technic:sulfur_lump", "technic:sulfur_dust 2"},
{technic_compat.stone_ingredient, "technic:stone_dust"},
{technic_compat.sand_ingredient, "technic:stone_dust"},
{technic_compat.desert_sand_ingredient, "technic:stone_dust"},
-- Other
{technic_compat.cobble_ingredient, technic_compat.gravel_ingredient},
{technic_compat.gravel_ingredient, technic_compat.sand_ingredient},
{technic_compat.sandstone_ingredient, technic_compat.sand_ingredient.." 2"}, -- reverse recipe can be found in the compressor
{technic_compat.desert_stone_ingredient, technic_compat.desert_sand_ingredient.." 2"}, -- reverse recipe can be found in the compressor
{technic_compat.ice_block_ingredient, technic_compat.snow_block_ingredient},
}
alloy_recipes = {
{"technic:copper_dust 7", "technic:tin_dust", "technic:bronze_dust 8", 12},
{technic_compat.copper_ingredient.." 7", technic_compat.tin_ingredient, technic_compat.bronze_ingredient.." 8", 12},
{"technic:wrought_iron_dust 2", "technic:coal_dust", "technic:carbon_steel_dust 2", 6},
{"technic:wrought_iron_ingot 2", "technic:coal_dust", "technic:carbon_steel_ingot 2", 6},
{"technic:carbon_steel_dust 2", "technic:coal_dust", "technic:cast_iron_dust 2", 6},
{"technic:carbon_steel_ingot 2", "technic:coal_dust", "technic:cast_iron_ingot 2", 6},
{"technic:carbon_steel_dust 4", "technic:chromium_dust", "technic:stainless_steel_dust 5", 7.5},
{"technic:carbon_steel_ingot 4", "technic:chromium_ingot", "technic:stainless_steel_ingot 5", 7.5},
{"technic:copper_dust 2", "technic:zinc_dust", "technic:brass_dust 3"},
{technic_compat.copper_ingredient.." 2", "technic:zinc_ingot", "basic_materials:brass_ingot 3"},
{technic_compat.sand_ingredient.." 2", "technic:coal_dust 2", "technic:silicon_wafer"},
{"technic:silicon_wafer", "technic:gold_dust", "technic:doped_silicon_wafer"},
-- from https://en.wikipedia.org/wiki/Carbon_black
-- The highest volume use of carbon black is as a reinforcing filler in rubber products, especially tires.
-- "[Compounding a] pure gum vulcanizate … with 50% of its weight of carbon black improves its tensile strength and wear resistance …"
{"technic:raw_latex 4", "technic:coal_dust 2", "technic:rubber 6", 2},
{technic_compat.ice_block_ingredient, technic_compat.emtpy_bucket_ingredient, technic_compat.water_bucket_ingredient, 1 },
}
for _, data in pairs(alloy_recipes) do
mcl_craftguide.register_craft({
type = "alloy_furnace",
width = 1,
output = data[3],
items = {data[1], data[2]},
})
end
-- Register Centrifuge Recipes
for _, data in pairs(centrifuge_recipes) do
mcl_craftguide.register_craft({
type = "centrifuge",
width = 1,
output = table.concat({data[2], data[3], data[4]}, " "),
items = {data[1]},
})
end
-- Register Compressor Recipes
for _, data in pairs(compressor_recipes) do
mcl_craftguide.register_craft({
type = "compressor",
width = 1,
output = data[2],
items = {data[1]},
})
end
-- Register Extractor Recipes
for _, data in ipairs(extractor_recipes) do
mcl_craftguide.register_craft({
type = "extractor",
width = 1,
output = data[2],
items = {data[1]},
})
end
-- Register Freezer Recipes
for _, data in pairs(freezer_recipes) do
local output_string
if type(data[2]) == "table" then
output_string = table.concat(data[2], ", ")
else
output_string = data[2]
end
mcl_craftguide.register_craft({
type = "freezer",
width = 1,
output = output_string,
items = {data[1]},
})
end
-- Register Grinder Recipes
for _, data in pairs(grinder_recipes) do
mcl_craftguide.register_craft({
type = "grinder",
width = 1,
output = data[2],
items = {data[1]},
})
end
end

View File

@ -0,0 +1,102 @@
-- Helper function to set compatibility variables
local function set_compat(mcl_value, default_value)
return technic_compat.mcl and mcl_value or default_value
end
-- Mineclone2 Support
technic_compat.copper_ingredient = technic_compat.mcl and "mcl_copper:copper_ingot" or 'default:copper_ingot'
technic_compat.iron_ingredient = technic_compat.mcl and "mcl_core:iron_ingot" or 'default:steel_ingot'
technic_compat.iron_lump_ingredient = technic_compat.mcl and "mcl_raw_ores:raw_iron" or 'default:iron_lump'
technic_compat.gold_lump_ingredient = technic_compat.mcl and "mcl_raw_ores:raw_gold" or 'default:gold_lump'
technic_compat.copper_lump_ingredient = technic_compat.mcl and "mcl_copper:raw_copper" or 'default:copper_lump'
technic_compat.mese_crystal_ingredient = technic_compat.mcl and "mesecons:wire_00000000_off" or 'default:mese_crystal'
technic_compat.diamond_ingredient = technic_compat.mcl and "mcl_core:diamond" or 'default:diamond'
technic_compat.glass_ingredient = technic_compat.mcl and "mcl_core:glass" or 'default:glass'
technic_compat.brick_block_ingredient = technic_compat.mcl and "mcl_core:brick_block" or 'default:brick'
technic_compat.mese_block_ingredient = technic_compat.mcl and "mesecons_torch:redstoneblock" or "default:mese"
technic_compat.paper_ingredient = technic_compat.mcl and "mcl_core:paper" or 'default:paper'
technic_compat.obsidian_glass_ingredient = technic_compat.mcl and "mcl_core:obsidian" or 'default:obsidian_glass'
technic_compat.obsidian_ingredient = technic_compat.mcl and "mcl_core:obsidian" or 'default:obsidian'
technic_compat.green_dye_ingredient = technic_compat.mcl and "mcl_dye:green" or 'dye:green'
technic_compat.blue_dye_ingredient = technic_compat.mcl and "mcl_dye:blue" or 'dye:blue'
technic_compat.red_dye_ingredient = technic_compat.mcl and "mcl_dye:red" or 'dye:red'
technic_compat.white_dye_ingredient = technic_compat.mcl and "mcl_dye:white" or 'dye:white'
technic_compat.gold_ingot_ingredient = technic_compat.mcl and "mcl_core:gold_ingot" or 'default:gold_ingot'
technic_compat.chest_ingredient = technic_compat.mcl and "mcl_chests:chest" or "default:chest"
technic_compat.stone_ingredient = technic_compat.mcl and "mcl_core:stone" or "default:stone"
technic_compat.wood_fence_ingredient = technic_compat.mcl and "group:fence_wood" or "default:fence_wood"
technic_compat.diamond_ingredient = technic_compat.mcl and "mcl_core:diamond" or "default:diamond"
technic_compat.bronze_ingredient = technic_compat.mcl and "mcl_copper:copper_ingot" or 'default:bronze_ingot'
technic_compat.tin_ingredient = technic_compat.mcl and "moreores:tin_ingot" or 'default:tin_ingot'
technic_compat.sandstone_ingredient = technic_compat.mcl and "mcl_core:sandstone" or 'default:desert_stone'
technic_compat.sand_ingredient = technic_compat.mcl and "mcl_core:sand" or 'default:sand'
technic_compat.gravel_ingredient = technic_compat.mcl and "mcl_core:gravel" or 'default:gravel'
technic_compat.desert_stone_ingredient = technic_compat.mcl and "mcl_core:redsandstone" or 'default:desert_stone'
technic_compat.desert_sand_ingredient = technic_compat.mcl and "mcl_core:redsand" or 'default:desert_sand'
technic_compat.furnace_ingredient = technic_compat.mcl and "mcl_furnaces:furnace" or 'default:furnace'
technic_compat.mossy_cobble_ingredient = technic_compat.mcl and "mcl_core:mossycobble" or 'default:mossycobble'
technic_compat.cobble_ingredient = technic_compat.mcl and "mcl_core:cobble" or 'default:cobble'
technic_compat.snow_block_ingredient = technic_compat.mcl and "mcl_core:snowblock" or 'default:snowblock'
technic_compat.ice_block_ingredient = technic_compat.mcl and "mcl_core:ice" or 'default:ice'
technic_compat.granite_ingredient = technic_compat.mcl and "mcl_core:granite" or 'technic:granite'
technic_compat.granite_bricks_ingredient = technic_compat.mcl and "mcl_core:granite_smooth" or 'technic:granite_bricks'
technic_compat.coal_ingredient = technic_compat.mcl and "mcl_core:coal_lump" or "default:coal_lump"
technic_compat.dirt_ingredient = technic_compat.mcl and "mcl_core:dirt" or "default:dirt"
technic_compat.mesecons_fiber_ingredient = technic_compat.mcl and "mesecons:wire_00000000_off" or "mesecons_materials:fiber"
technic_compat.stick_ingredient = technic_compat.mcl and "mcl_core:stick" or "default:stick"
technic_compat.emtpy_bucket_ingredient = technic_compat.mcl and "mcl_buckets:bucket_empty" or "bucket:bucket_empty"
technic_compat.water_bucket_ingredient = technic_compat.mcl and "mcl_buckets:bucket_water" or "bucket:bucket_water"
-- Ingredient Variables
if technic_compat.mcl then
technic_compat.blueberries_ingredient = "mcl_farming:blueberries"
technic_compat.grass_ingredient = "mcl_core:grass"
technic_compat.dry_shrub_ingredient = "mcl_core:deadbush"
technic_compat.junglegrass_ingredient = "mcl_core:tallgrass"
technic_compat.cactus_ingredient = "mcl_core:cactus"
technic_compat.geranium_ingredient = "mcl_flowers:blue_orchid"
technic_compat.dandelion_white_ingredient = "mcl_flowers:oxeye_daisy"
technic_compat.dandelion_yellow_ingredient = "mcl_flowers:dandelion"
technic_compat.tulip_ingredient = "mcl_flowers:orange_tulip"
technic_compat.rose_ingredient = "mcl_flowers:poppy"
technic_compat.viola_ingredient = "mcl_flowers:allium"
else
technic_compat.blueberries_ingredient = "default:blueberries"
technic_compat.grass_ingredient = "default:grass_1"
technic_compat.dry_shrub_ingredient = "default:dry_shrub"
technic_compat.junglegrass_ingredient = "default:junglegrass"
technic_compat.cactus_ingredient = "default:cactus"
technic_compat.geranium_ingredient = "flowers:geranium"
technic_compat.dandelion_white_ingredient = "flowers:dandelion_white"
technic_compat.dandelion_yellow_ingredient = "flowers:dandelion_yellow"
technic_compat.tulip_ingredient = "flowers:tulip"
technic_compat.rose_ingredient = "flowers:rose"
technic_compat.viola_ingredient = "flowers:viola"
end
-- Dye Output Variables
if technic_compat.mcl then
technic_compat.dye_black = "mcl_dye:black"
technic_compat.dye_violet = "mcl_dye:violet"
technic_compat.dye_green = "mcl_dye:green"
technic_compat.dye_brown = "mcl_dye:brown"
technic_compat.dye_blue = "mcl_dye:blue"
technic_compat.dye_white = "mcl_dye:white"
technic_compat.dye_yellow = "mcl_dye:yellow"
technic_compat.dye_orange = "mcl_dye:orange"
technic_compat.dye_red = "mcl_dye:red"
else
technic_compat.dye_black = "dye:black"
technic_compat.dye_violet = "dye:violet"
technic_compat.dye_green = "dye:green"
technic_compat.dye_brown = "dye:brown"
technic_compat.dye_blue = "dye:blue"
technic_compat.dye_white = "dye:white"
technic_compat.dye_yellow = "dye:yellow"
technic_compat.dye_orange = "dye:orange"
technic_compat.dye_red = "dye:red"
end
technic_compat.dirt_with_snow_ingredient = technic_compat.mcl and "mcl_core:dirt_with_grass_snow" or "default:dirt_with_snow"
technic_compat.bucket_lava_ingredient = technic_compat.mcl and "mcl_buckets:bucket_lava" or "bucket:bucket_lava"
technic_compat.bucket_river_water_ingredient = technic_compat.mcl and "mcl_buckets:bucket_river_water" or "bucket:bucket_river_water"

View File

@ -0,0 +1,6 @@
technic_compat.water_source_fluid = technic_compat.mcl and "mcl_core:water_source" or "default:water_source"
technic_compat.water_flowing_fluid = technic_compat.mcl and "mcl_core:water_flowing" or "default:water_flowing"
technic_compat.river_water_source_fluid = technic_compat.mcl and "mclx_core:river_water_source" or "default:river_water_source"
technic_compat.river_water_flowing_fluid = technic_compat.mcl and "mclx_core:river_water_flowing" or "default:river_water_flowing"
technic_compat.lava_source_fluid = technic_compat.mcl and "mcl_core:lava_source" or "default:lava_source"
technic_compat.lava_flowing_fluid = technic_compat.mcl and "mcl_core:lava_flowing" or "default:lava_flowing"

View File

@ -0,0 +1 @@
technic_compat.mt_light_max = technic_compat.mcl and mcl_core.LIGHT_MAX or (default and default.LIGHT_MAX)

View File

@ -0,0 +1 @@
technic_compat.stone_sounds = technic_compat.mcl and mcl_sounds.node_sound_stone_defaults() or default.node_sound_stone_defaults()

View File

@ -0,0 +1,10 @@
local dirt_texture = technic_compat.mcl and "default_dirt.png" or "default_dirt.png"
local grass_texture = technic_compat.mcl and "mcl_core_palette_grass.png" or "default_grass.png"
local wood_texture = technic_compat.mcl and "default_wood.png" or "default_wood.png"
local stone_texture = technic_compat.mcl and "default_stone.png" or "default_stone.png"
local cobble_texture = technic_compat.mcl and "default_cobble.png" or "default_cobble.png"
local brick_texture = technic_compat.mcl and "default_brick.png" or "default_brick.png"
local sandstone_texture = technic_compat.mcl and "mcl_core_sandstone_top.png" or "default_sandstone.png"
local leaves_texture = technic_compat.mcl and "default_leaves.png" or "default_leaves.png"
local tree_texture = technic_compat.mcl and "default_tree.png" or "default_tree.png"
local bronzeblock_texture = technic_compat.mcl and "mcl_core_bronze_block.png" or "default_bronze_block.png"

4
technic_compat/mod.conf Normal file
View File

@ -0,0 +1,4 @@
name = technic_compat
description = Makes Technic compatible with other games and mods
optional_depends = mcl_core, mcl_sounds, default, mcl_craftguide
supported_games = minetest_game,mineclone2,mineclonia,mineclone5

View File

@ -48,12 +48,21 @@ minetest.register_craftitem(":technic:sulfur_lump", {
inventory_image = "technic_sulfur_lump.png", inventory_image = "technic_sulfur_lump.png",
}) })
if minetest.get_modpath("default") then
minetest.register_alias("technic:wrought_iron_ingot", "default:steel_ingot") minetest.register_alias("technic:wrought_iron_ingot", "default:steel_ingot")
minetest.override_item("default:steel_ingot", { minetest.override_item("default:steel_ingot", {
description = S("Wrought Iron Ingot"), description = S("Wrought Iron Ingot"),
inventory_image = "technic_wrought_iron_ingot.png", inventory_image = "technic_wrought_iron_ingot.png",
}) })
elseif minetest.get_modpath("mcl_core") then
minetest.register_alias("technic:wrought_iron_ingot", "mcl_core:iron_ingot")
minetest.override_item("mcl_core:iron_ingot", {
description = S("Wrought Iron Ingot"),
inventory_image = "technic_wrought_iron_ingot.png",
})
end
minetest.register_craftitem(":technic:cast_iron_ingot", { minetest.register_craftitem(":technic:cast_iron_ingot", {
description = S("Cast Iron Ingot"), description = S("Cast Iron Ingot"),
@ -127,6 +136,9 @@ minetest.register_craft({
output = "technic:cast_iron_ingot", output = "technic:cast_iron_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
type = 'cooking', type = 'cooking',
recipe = "technic:cast_iron_ingot", recipe = "technic:cast_iron_ingot",

View File

@ -1,10 +1,19 @@
local modpath = minetest.get_modpath("technic_worldgen") local modpath = minetest.get_modpath("technic_worldgen")
-- Mineclone Support
sounds = minetest.get_modpath("mcl_sounds") and mcl_sounds or default
technic = rawget(_G, "technic") or {} technic = rawget(_G, "technic") or {}
technic.worldgen = { technic.worldgen = {
gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end, gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end,
} }
-- Check if mcl_core or default is installed
if not minetest.get_modpath("mcl_core") and not minetest.get_modpath("default") then
error(minetest.get_current_modname().." ".."requires mcl_core or default to be installed (please install MTG or MCL2, or compatible games)")
end
dofile(modpath.."/config.lua") dofile(modpath.."/config.lua")
dofile(modpath.."/nodes.lua") dofile(modpath.."/nodes.lua")
dofile(modpath.."/oregen.lua") dofile(modpath.."/oregen.lua")

View File

@ -1,3 +1,4 @@
name = technic_worldgen name = technic_worldgen
depends = default, basic_materials depends = basic_materials, technic_compat
optional_depends = intllib, mg, doors, farming, glooptest, mesecons_doors, vessels optional_depends = intllib, mg, doors, farming, glooptest, mesecons_doors, vessels, default, mcl_core, mcl_sounds
supported_games = minetest_game,mineclone2,mineclonia,mineclone5

View File

@ -1,153 +1,237 @@
local S = technic.worldgen.gettext local S = technic.worldgen.gettext
minetest.register_node( ":technic:mineral_uranium", { local mineral_uranium_def = {
description = S("Uranium Ore"), description = S("Uranium Ore"),
tiles = { "default_stone.png^technic_mineral_uranium.png" }, tiles = { "default_stone.png^technic_mineral_uranium.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=3, radioactive=1}, groups = {cracky=3, radioactive=1,pickaxey=5,material_stone=1},
sounds = default.node_sound_stone_defaults(), sounds = sounds.node_sound_stone_defaults(),
drop = "technic:uranium_lump", drop = "technic:uranium_lump",
}) _mcl_hardness = 5,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
}
minetest.register_node( ":technic:mineral_chromium", { local mineral_chromium_def = {
description = S("Chromium Ore"), description = S("Chromium Ore"),
tiles = { "default_stone.png^technic_mineral_chromium.png" }, tiles = { "default_stone.png^technic_mineral_chromium.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=3}, groups = {cracky=3,pickaxey=3,material_stone=1},
sounds = default.node_sound_stone_defaults(), sounds = sounds.node_sound_stone_defaults(),
drop = "technic:chromium_lump", drop = "technic:chromium_lump",
}) _mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
}
minetest.register_node( ":technic:mineral_zinc", { local mineral_zinc_def = {
description = S("Zinc Ore"), description = S("Zinc Ore"),
tiles = { "default_stone.png^technic_mineral_zinc.png" }, tiles = { "default_stone.png^technic_mineral_zinc.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=3}, groups = {cracky=3,pickaxey=2,material_stone=1},
sounds = default.node_sound_stone_defaults(), sounds = sounds.node_sound_stone_defaults(),
drop = "technic:zinc_lump", drop = "technic:zinc_lump",
}) _mcl_hardness = 2,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
}
minetest.register_node( ":technic:mineral_lead", { local mineral_lead_def = {
description = S("Lead Ore"), description = S("Lead Ore"),
tiles = { "default_stone.png^technic_mineral_lead.png" }, tiles = { "default_stone.png^technic_mineral_lead.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=3}, groups = {cracky=3,pickaxey=2,material_stone=1},
sounds = default.node_sound_stone_defaults(), sounds = sounds.node_sound_stone_defaults(),
drop = "technic:lead_lump", drop = "technic:lead_lump",
}) _mcl_hardness = 2,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
}
minetest.register_node( ":technic:mineral_sulfur", { local mineral_sulfur_def = {
description = S("Sulfur Ore"), description = S("Sulfur Ore"),
tiles = { "default_stone.png^technic_mineral_sulfur.png" }, tiles = { "default_stone.png^technic_mineral_sulfur.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=3}, groups = {cracky=3,pickaxey=1,material_stone=1},
sounds = default.node_sound_stone_defaults(), sounds = sounds.node_sound_stone_defaults(),
drop = "technic:sulfur_lump", drop = "technic:sulfur_lump",
}) _mcl_hardness = 1,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
}
minetest.register_node( ":technic:granite", { local marble_def = {
description = S("Granite"),
tiles = { "technic_granite.png" },
is_ground_content = true,
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node( ":technic:granite_bricks", {
description = S("Granite Bricks"),
tiles = { "technic_granite_bricks.png" },
is_ground_content = false,
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node( ":technic:marble", {
description = S("Marble"), description = S("Marble"),
tiles = { "technic_marble.png" }, tiles = { "technic_marble.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=3, marble=1}, groups = {cracky=3, marble=1,pickaxey=3},
sounds = default.node_sound_stone_defaults(), sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}
minetest.register_node( ":technic:marble_bricks", { local marble_bricks_def = {
description = S("Marble Bricks"), description = S("Marble Bricks"),
tiles = { "technic_marble_bricks.png" }, tiles = { "technic_marble_bricks.png" },
is_ground_content = false, is_ground_content = false,
groups = {cracky=3}, groups = {cracky=3,pickaxey=3},
sounds = default.node_sound_stone_defaults(), sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}
minetest.register_node(":technic:uranium_block", { local uranium_block_def = {
description = S("Uranium Block"), description = S("Uranium Block"),
tiles = { "technic_uranium_block.png" }, tiles = { "technic_uranium_block.png" },
is_ground_content = true, is_ground_content = true,
groups = {uranium_block=1, cracky=1, level=2, radioactive=2}, groups = {uranium_block=1, cracky=1, level=2, radioactive=2,pickaxey=5},
sounds = default.node_sound_stone_defaults() sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 5,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}
minetest.register_node(":technic:chromium_block", { local chromium_block_def = {
description = S("Chromium Block"), description = S("Chromium Block"),
tiles = { "technic_chromium_block.png" }, tiles = { "technic_chromium_block.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=1, level=2}, groups = {cracky=1, level=2,pickaxey=4},
sounds = default.node_sound_stone_defaults() sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 4,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}
minetest.register_node(":technic:zinc_block", { local zinc_block_def = {
description = S("Zinc Block"), description = S("Zinc Block"),
tiles = { "technic_zinc_block.png" }, tiles = { "technic_zinc_block.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=1, level=2}, groups = {cracky=1, level=2,pickaxey=3},
sounds = default.node_sound_stone_defaults() sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}
minetest.register_node(":technic:lead_block", { local lead_block_def = {
description = S("Lead Block"), description = S("Lead Block"),
tiles = { "technic_lead_block.png" }, tiles = { "technic_lead_block.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=1, level=2}, groups = {cracky=1, level=2,pickaxey=5},
sounds = default.node_sound_stone_defaults() sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 5,
_mcl_blast_resistance = 5,
_mcl_silk_touch_drop = true
}
minetest.register_alias("technic:wrought_iron_block", "default:steelblock") local cast_iron_block_def = {
minetest.override_item("default:steelblock", {
description = S("Wrought Iron Block"),
tiles = { "technic_wrought_iron_block.png" },
})
minetest.register_node(":technic:cast_iron_block", {
description = S("Cast Iron Block"), description = S("Cast Iron Block"),
tiles = { "technic_cast_iron_block.png" }, tiles = { "technic_cast_iron_block.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=1, level=2}, groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults() sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}
minetest.register_node(":technic:carbon_steel_block", { local carbon_steel_block_def = {
description = S("Carbon Steel Block"), description = S("Carbon Steel Block"),
tiles = { "technic_carbon_steel_block.png" }, tiles = { "technic_carbon_steel_block.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=1, level=2}, groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults() sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}
minetest.register_node(":technic:stainless_steel_block", { local stainless_steel_block_def = {
description = S("Stainless Steel Block"), description = S("Stainless Steel Block"),
tiles = { "technic_stainless_steel_block.png" }, tiles = { "technic_stainless_steel_block.png" },
is_ground_content = true, is_ground_content = true,
groups = {cracky=1, level=2}, groups = {cracky=1, level=2},
sounds = default.node_sound_stone_defaults() sounds = sounds.node_sound_stone_defaults(),
}) _mcl_hardness = 3,
_mcl_blast_resistance = 3,
_mcl_silk_touch_drop = true
}
minetest.register_craft({
output = 'technic:granite_bricks 4',
recipe = { minetest.register_node( ":technic:mineral_uranium", mineral_uranium_def)
{'technic:granite','technic:granite'},
{'technic:granite','technic:granite'} minetest.register_node( ":technic:mineral_chromium", mineral_chromium_def)
}
}) minetest.register_node( ":technic:mineral_zinc", mineral_zinc_def)
minetest.register_node( ":technic:mineral_lead", mineral_lead_def)
minetest.register_node( ":technic:mineral_sulfur", mineral_sulfur_def)
if minetest.get_modpath("default") then
minetest.register_node( ":technic:granite", {
description = S("Granite"),
tiles = { "technic_granite.png" },
is_ground_content = true,
groups = {cracky=1},
sounds = sounds.node_sound_stone_defaults(),
})
minetest.register_node( ":technic:granite_bricks", {
description = S("Granite Bricks"),
tiles = { "technic_granite_bricks.png" },
is_ground_content = false,
groups = {cracky=1},
sounds = sounds.node_sound_stone_defaults(),
})
end
minetest.register_node( ":technic:marble", marble_def)
minetest.register_node( ":technic:marble_bricks", marble_bricks_def)
minetest.register_node(":technic:uranium_block", uranium_block_def)
minetest.register_node(":technic:chromium_block", chromium_block_def)
minetest.register_node(":technic:zinc_block", zinc_block_def)
minetest.register_node(":technic:lead_block", lead_block_def)
if minetest.get_modpath("default") then
minetest.register_alias("technic:wrought_iron_block", "default:steelblock")
minetest.override_item("default:steelblock", {
description = S("Wrought Iron Block"),
tiles = { "technic_wrought_iron_block.png" },
})
end
minetest.register_node(":technic:cast_iron_block", cast_iron_block_def)
minetest.register_node(":technic:carbon_steel_block", carbon_steel_block_def)
minetest.register_node(":technic:stainless_steel_block", stainless_steel_block_def)
if minetest.get_modpath("default") then
minetest.register_craft({
output = 'technic:granite_bricks 4',
recipe = {
{granite_ingredient,granite_ingredient},
{granite_ingredient,granite_ingredient}
}
})
end
minetest.register_craft({ minetest.register_craft({
output = 'technic:marble_bricks 4', output = 'technic:marble_bricks 4',
@ -172,33 +256,35 @@ local function for_each_registered_node(action)
end end
end end
for_each_registered_node(function(node_name, node_def) if minetest.get_modpath("default") then
if node_name ~= "default:steelblock" and for_each_registered_node(function(node_name, node_def)
node_name:find("steelblock", 1, true) and if node_name ~= "default:steelblock" and
node_def.description:find("Steel", 1, true) then node_name:find("steelblock", 1, true) and
minetest.override_item(node_name, { node_def.description:find("Steel", 1, true) then
description = node_def.description:gsub("Steel", S("Wrought Iron")),
})
end
local tiles = node_def.tiles or node_def.tile_images
if tiles then
local new_tiles = {}
local do_override = false
if type(tiles) == "string" then
tiles = {tiles}
end
for i, t in ipairs(tiles) do
if type(t) == "string" and t == "default_steel_block.png" then
do_override = true
t = "technic_wrought_iron_block.png"
end
table.insert(new_tiles, t)
end
if do_override then
minetest.override_item(node_name, { minetest.override_item(node_name, {
tiles = new_tiles description = node_def.description:gsub("Steel", S("Wrought Iron")),
}) })
end end
end local tiles = node_def.tiles or node_def.tile_images
end) if tiles then
local new_tiles = {}
local do_override = false
if type(tiles) == "string" then
tiles = {tiles}
end
for i, t in ipairs(tiles) do
if type(t) == "string" and t == "default_steel_block.png" then
do_override = true
t = "technic_wrought_iron_block.png"
end
table.insert(new_tiles, t)
end
if do_override then
minetest.override_item(node_name, {
tiles = new_tiles
})
end
end
end)
end

View File

@ -1,148 +1,123 @@
local uranium_params = { local uranium_params = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 100, y = 100, z = 100}, spread = {x = 100, y = 100, z = 100},
seed = 420, seed = 420,
octaves = 3, octaves = 3,
persist = 0.7 persist = 0.7
} }
local uranium_threshold = 0.55 local uranium_threshold = 0.55
local chromium_params = { local chromium_params = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 100, y = 100, z = 100}, spread = {x = 100, y = 100, z = 100},
seed = 421, seed = 421,
octaves = 3, octaves = 3,
persist = 0.7 persist = 0.7
} }
local chromium_threshold = 0.55 local chromium_threshold = 0.55
local zinc_params = { local zinc_params = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 100, y = 100, z = 100}, spread = {x = 100, y = 100, z = 100},
seed = 422, seed = 422,
octaves = 3, octaves = 3,
persist = 0.7 persist = 0.7
} }
local zinc_threshold = 0.5 local zinc_threshold = 0.5
local lead_params = { local lead_params = {
offset = 0, offset = 0,
scale = 1, scale = 1,
spread = {x = 100, y = 100, z = 100}, spread = {x = 100, y = 100, z = 100},
seed = 423, seed = 423,
octaves = 3, octaves = 3,
persist = 0.7 persist = 0.7
} }
local lead_threshold = 0.3 local lead_threshold = 0.3
local mcl_core_modpath = minetest.get_modpath("mcl_core")
local stone_id = mcl_core_modpath and "mcl_core:stone" or "default:stone"
local lava_source_id = mcl_core_modpath and "mcl_core:lava_source" or "default:lava_source"
local lava_flowing_id = mcl_core_modpath and "mcl_core:lava_flowing" or "default:lava_flowing"
-- Define default values for y_min and y_max
local uranium_y_min = -300
local uranium_y_max = -80
local chromium_y_min = -200
local chromium_y_max = -100
local zinc_y_min = -32
local zinc_y_max = 2
local lead_y_min = -16
local lead_y_max = 16
-- Update values if MineClone2 is detected
if mcl_core_modpath then
uranium_y_min = -57
uranium_y_max = 100
chromium_y_min = -57
chromium_y_max = 100
zinc_y_min = -57
zinc_y_max = 100
lead_y_min = -57
lead_y_max = 100
end
-- Uranium
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "technic:mineral_uranium", ore = "technic:mineral_uranium",
wherein = "default:stone", wherein = stone_id,
clust_scarcity = 8*8*8, clust_scarcity = 8*8*8,
clust_num_ores = 4, clust_num_ores = 4,
clust_size = 3, clust_size = 3,
y_min = -300, y_min = uranium_y_min,
y_max = -80, y_max = uranium_y_max,
noise_params = uranium_params, noise_params = uranium_params,
noise_threshold = uranium_threshold, noise_threshold = uranium_threshold,
}) })
-- Chromium
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "technic:mineral_chromium", ore = "technic:mineral_chromium",
wherein = "default:stone", wherein = stone_id,
clust_scarcity = 8*8*8, clust_scarcity = 8*8*8,
clust_num_ores = 2, clust_num_ores = 2,
clust_size = 3, clust_size = 3,
y_min = -200, y_min = chromium_y_min,
y_max = -100, y_max = chromium_y_max,
noise_params = chromium_params, noise_params = chromium_params,
noise_threshold = chromium_threshold, noise_threshold = chromium_threshold,
}) })
-- Zinc
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "technic:mineral_chromium", ore = "technic:mineral_zinc",
wherein = "default:stone", wherein = stone_id,
clust_scarcity = 6*6*6, clust_scarcity = 8*8*8,
clust_num_ores = 2, clust_num_ores = 5,
clust_size = 3, clust_size = 7,
y_min = -31000, y_min = zinc_y_min,
y_max = -200, y_max = zinc_y_max,
flags = "absheight", noise_params = zinc_params,
noise_params = chromium_params, noise_threshold = zinc_threshold,
noise_threshold = chromium_threshold,
}) })
-- Lead
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "technic:mineral_zinc", ore = "technic:mineral_lead",
wherein = "default:stone", wherein = stone_id,
clust_scarcity = 8*8*8, clust_scarcity = 9*9*9,
clust_num_ores = 5, clust_num_ores = 5,
clust_size = 7, clust_size = 3,
y_min = -32, y_min = lead_y_min,
y_max = 2, y_max = lead_y_max,
noise_params = zinc_params, noise_params = lead_params,
noise_threshold = zinc_threshold, noise_threshold = lead_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_zinc",
wherein = "default:stone",
clust_scarcity = 6*6*6,
clust_num_ores = 4,
clust_size = 3,
y_min = -31000,
y_max = -32,
flags = "absheight",
noise_params = zinc_params,
noise_threshold = zinc_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_lead",
wherein = "default:stone",
clust_scarcity = 9*9*9,
clust_num_ores = 5,
clust_size = 3,
y_min = -16,
y_max = 16,
noise_params = lead_params,
noise_threshold = lead_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_lead",
wherein = "default:stone",
clust_scarcity = 8*8*8,
clust_num_ores = 5,
clust_size = 3,
y_min = -128,
y_max = -16,
noise_params = lead_params,
noise_threshold = lead_threshold,
})
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_lead",
wherein = "default:stone",
clust_scarcity = 6*6*6,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -128,
flags = "absheight",
noise_params = lead_params,
noise_threshold = lead_threshold,
}) })
-- Sulfur -- Sulfur
@ -150,78 +125,79 @@ local sulfur_buf = {}
local sulfur_noise local sulfur_noise
minetest.register_on_generated(function(minp, maxp) minetest.register_on_generated(function(minp, maxp)
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local a = VoxelArea:new({MinEdge=emin, MaxEdge=emax}) local a = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
local data = vm:get_data(sulfur_buf) local data = vm:get_data(sulfur_buf)
local pr = PseudoRandom(17 * minp.x + 42 * minp.y + 101 * minp.z) local pr = PseudoRandom(17 * minp.x + 42 * minp.y + 101 * minp.z)
sulfur_noise = sulfur_noise or minetest.get_perlin(9876, 3, 0.5, 100) sulfur_noise = sulfur_noise or minetest.get_perlin(9876, 3, 0.5, 100)
local c_lava = minetest.get_content_id("default:lava_source") local c_lava = minetest.get_content_id(lava_source_id)
local c_lava_flowing = minetest.get_content_id("default:lava_flowing") local c_lava_flowing = minetest.get_content_id(lava_flowing_id)
local c_stone = minetest.get_content_id("default:stone") local c_stone = minetest.get_content_id(stone_id)
local c_sulfur = minetest.get_content_id("technic:mineral_sulfur") local c_sulfur = minetest.get_content_id("technic:mineral_sulfur")
local grid_size = 5 local grid_size = 5
for x = minp.x + math.floor(grid_size / 2), maxp.x, grid_size do for x = minp.x + math.floor(grid_size / 2), maxp.x, grid_size do
for y = minp.y + math.floor(grid_size / 2), maxp.y, grid_size do for y = minp.y + math.floor(grid_size / 2), maxp.y, grid_size do
for z = minp.z + math.floor(grid_size / 2), maxp.z, grid_size do for z = minp.z + math.floor(grid_size / 2), maxp.z, grid_size do
local c = data[a:index(x, y, z)] local c = data[a:index(x, y, z)]
if (c == c_lava or c == c_lava_flowing) if (c == c_lava or c == c_lava_flowing)
and sulfur_noise:get3d({x = x, y = z, z = z}) >= 0.4 then and sulfur_noise:get3d({x = x, y = z, z = z}) >= 0.4 then
for i in a:iter( for i in a:iter(
math.max(minp.x, x - grid_size), math.max(minp.x, x - grid_size),
math.max(minp.y, y - grid_size), math.max(minp.y, y - grid_size),
math.max(minp.z, z - grid_size), math.max(minp.z, z - grid_size),
math.min(maxp.x, x + grid_size), math.min(maxp.x, x + grid_size),
math.min(maxp.y, y + grid_size), math.min(maxp.y, y + grid_size),
math.min(maxp.z, z + grid_size) math.min(maxp.z, z + grid_size)
) do ) do
if data[i] == c_stone and pr:next(1, 10) <= 7 then if data[i] == c_stone and pr:next(1, 10) <= 7 then
data[i] = c_sulfur data[i] = c_sulfur
end end
end end
end end
end end
end end
end end
vm:set_data(data) vm:set_data(data)
vm:write_to_map(data) vm:write_to_map(data)
end) end)
-- Marble and Granite (if enabled)
if technic.config:get_bool("enable_marble_generation") then if technic.config:get_bool("enable_marble_generation") then
minetest.register_ore({ minetest.register_ore({
ore_type = "sheet", ore_type = "sheet",
ore = "technic:marble", ore = "technic:marble",
wherein = "default:stone", wherein = stone_id,
clust_scarcity = 1, clust_scarcity = 1,
clust_num_ores = 1, clust_num_ores = 1,
clust_size = 3, clust_size = 3,
y_min = -31000, y_min = -31000,
y_max = -50, y_max = -50,
noise_threshold = 0.4, noise_threshold = 0.4,
noise_params = { noise_params = {
offset = 0, scale = 15, spread = {x = 150, y = 150, z = 150}, offset = 0, scale = 15, spread = {x = 150, y = 150, z = 150},
seed = 23, octaves = 3, persist = 0.70 seed = 23, octaves = 3, persist = 0.70
} }
}) })
end end
if not minetest.get_modpath("mcl_core") then
if technic.config:get_bool("enable_granite_generation") then if technic.config:get_bool("enable_granite_generation") then
minetest.register_ore({ minetest.register_ore({
ore_type = "sheet", ore_type = "sheet",
ore = "technic:granite", ore = "technic:granite",
wherein = "default:stone", wherein = stone_id,
clust_scarcity = 1, clust_scarcity = 1,
clust_num_ores = 1, clust_num_ores = 1,
clust_size = 4, clust_size = 4,
y_min = -31000, y_min = -31000,
y_max = -150, y_max = -150,
noise_threshold = 0.4, noise_threshold = 0.4,
noise_params = { noise_params = {
offset = 0, scale = 15, spread = {x = 130, y = 130, z = 130}, offset = 0, scale = 15, spread = {x = 130, y = 130, z = 130},
seed = 24, octaves = 3, persist = 0.70 seed = 24, octaves = 3, persist = 0.70
} }
}) })
end
end end

View File

@ -10,8 +10,11 @@ minetest.register_node(":moretrees:rubber_tree_sapling", {
wield_image = "technic_rubber_sapling.png", wield_image = "technic_rubber_sapling.png",
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
groups = {dig_immediate=3, flammable=2, sapling=1}, groups = {dig_immediate=3, flammable=2, sapling=1, pickaxey=1, handy=1},
sounds = default.node_sound_defaults(), sounds = sounds.node_sound_defaults(),
_mcl_hardness = 1,
_mcl_blast_resistance = 1,
_mcl_silk_touch_drop = true
}) })
minetest.register_craft({ minetest.register_craft({
@ -25,8 +28,11 @@ minetest.register_node(":moretrees:rubber_tree_trunk", {
tiles = {"default_tree_top.png", "default_tree_top.png", tiles = {"default_tree_top.png", "default_tree_top.png",
"technic_rubber_tree_full.png"}, "technic_rubber_tree_full.png"},
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1, groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2}, flammable=2, handy=1},
sounds = default.node_sound_wood_defaults(), sounds = sounds.node_sound_wood_defaults(),
_mcl_hardness = 1,
_mcl_blast_resistance = 1,
_mcl_silk_touch_drop = true
}) })
minetest.register_node(":moretrees:rubber_tree_trunk_empty", { minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
@ -34,8 +40,11 @@ minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
tiles = {"default_tree_top.png", "default_tree_top.png", tiles = {"default_tree_top.png", "default_tree_top.png",
"technic_rubber_tree_empty.png"}, "technic_rubber_tree_empty.png"},
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1, groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2, not_in_creative_inventory=1}, flammable=2, not_in_creative_inventory=1,handy=1},
sounds = default.node_sound_wood_defaults(), sounds = sounds.node_sound_wood_defaults(),
_mcl_hardness = 1,
_mcl_blast_resistance = 1,
_mcl_silk_touch_drop = true
}) })
minetest.register_node(":moretrees:rubber_tree_leaves", { minetest.register_node(":moretrees:rubber_tree_leaves", {
@ -43,7 +52,7 @@ minetest.register_node(":moretrees:rubber_tree_leaves", {
description = S("Rubber Tree Leaves"), description = S("Rubber Tree Leaves"),
tiles = {"technic_rubber_leaves.png"}, tiles = {"technic_rubber_leaves.png"},
paramtype = "light", paramtype = "light",
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1}, groups = {snappy=3, leafdecay=3, flammable=2, leaves=1,},
drop = { drop = {
max_items = 1, max_items = 1,
items = {{ items = {{
@ -55,7 +64,10 @@ minetest.register_node(":moretrees:rubber_tree_leaves", {
} }
} }
}, },
sounds = default.node_sound_leaves_defaults(), sounds = sounds.node_sound_leaves_defaults(),
_mcl_hardness = 1,
_mcl_blast_resistance = 1,
_mcl_silk_touch_drop = true
}) })
technic.rubber_tree_model={ technic.rubber_tree_model={
@ -91,8 +103,17 @@ if technic.config:get_bool("enable_rubber_tree_generation") then
x = (maxp.x - minp.x) / 2 + minp.x, x = (maxp.x - minp.x) / 2 + minp.x,
y = (maxp.y - minp.y) / 2 + minp.y, y = (maxp.y - minp.y) / 2 + minp.y,
z = (maxp.z - minp.z) / 2 + minp.z} z = (maxp.z - minp.z) / 2 + minp.z}
local near_node = nil
if minetest.get_modpath("mcl_core") then
near_node = "mcl_core:dirt_with_grass"
else if minetest.get_modpath("default") then
near_node = "default:dirt_with_grass"
else
error(S("[TECHNIC] Cant generate rubber trees as default or mcl_core is not installed, please use a mineclone compatible game or minetest_game"))
end
end
local pos = minetest.find_node_near(tmp, maxp.x - minp.x, local pos = minetest.find_node_near(tmp, maxp.x - minp.x,
{"default:dirt_with_grass"}) near_node)
if pos ~= nil then if pos ~= nil then
minetest.spawn_tree({x=pos.x, y=pos.y+1, z=pos.z}, technic.rubber_tree_model) minetest.spawn_tree({x=pos.x, y=pos.y+1, z=pos.z}, technic.rubber_tree_model)
end end

View File

@ -13,6 +13,11 @@ available to survival-mode players.
local LATEST_SERIALIZATION_VERSION = 1 local LATEST_SERIALIZATION_VERSION = 1
-- Check if mcl_core or default is installed
if not minetest.get_modpath("mcl_core") and not minetest.get_modpath("default") then
error(minetest.get_current_modname().." ".."requires mcl_core or default to be installed (please install MTG or MCL2, or compatible games)")
end
wrench = {} wrench = {}
local modpath = minetest.get_modpath(minetest.get_current_modname()) local modpath = minetest.get_modpath(minetest.get_current_modname())

View File

@ -1,3 +1,3 @@
name = wrench name = wrench
depends = default optional_depends = technic, technic_chests, technic_worldgen, intllib, default, mcl_core
optional_depends = technic, technic_chests, technic_worldgen, intllib supported_games = minetest_game,mineclone2,mineclonia,mineclone5

View File

@ -23,7 +23,7 @@ local STRING, FLOAT =
wrench.META_TYPE_FLOAT wrench.META_TYPE_FLOAT
wrench.registered_nodes = { wrench.registered_nodes = {
["default:chest"] = { [chest_ingredient] = {
lists = {"main"}, lists = {"main"},
}, },
["default:chest_locked"] = { ["default:chest_locked"] = {