diff --git a/.luacheckrc b/.luacheckrc index 7191d7b..2d3e858 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -31,7 +31,9 @@ read_globals = { "protector", "isprotect", "homedecor_expect_infinite_stacks", - "craftguide", "i3" + "craftguide", "i3", + "mcl_sounds","mcl_core", + "mcl_craftguide" } -- Loop warning diff --git a/concrete/init.lua b/concrete/init.lua index f186f09..37c7483 100644 --- a/concrete/init.lua +++ b/concrete/init.lua @@ -1,26 +1,32 @@ --Minetest 0.4.7 mod: concrete --(c) 2013 by RealBadAngel +-- 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 {} technic.concrete_posts = {} --- Mineclone2 Support -local stone_ingrediant = nil -if minetest.get_modpath("mcl_core") then - stone_ingrediant = "mcl_core:stone" -else - stone_ingrediant = "default:stone" +-- 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_core") then + stone_ingredient = "mcl_core:stone" +else + stone_ingredient = "default:stone" end -local stone_sounds = nil if minetest.get_modpath("mcl_sounds") then stone_sounds = mcl_sounds.node_sound_stone_defaults() else stone_sounds = default.node_sound_stone_defaults() end --- Boilerplate to support localized strings if intllib mod is installed. -local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end + for i = 0, 31 do minetest.register_alias("technic:concrete_post"..i, @@ -41,9 +47,9 @@ minetest.register_craft({ minetest.register_craft({ output = 'technic:concrete_post 12', recipe = { - {stone_ingrediant,'basic_materials:steel_bar',stone_ingrediant}, - {stone_ingrediant,'basic_materials:steel_bar',stone_ingrediant}, - {stone_ingrediant,'basic_materials:steel_bar',stone_ingrediant}, + {stone_ingredient,'basic_materials:steel_bar',stone_ingredient}, + {stone_ingredient,'basic_materials:steel_bar',stone_ingredient}, + {stone_ingredient,'basic_materials:steel_bar',stone_ingredient}, } }) diff --git a/concrete/mod.conf b/concrete/mod.conf index 6f4a76a..5a17f88 100644 --- a/concrete/mod.conf +++ b/concrete/mod.conf @@ -1,3 +1,3 @@ name = concrete optional_depends = basic_materials, intllib, moreblocks, default -supported_games = minetest_game,mineclone2 \ No newline at end of file +supported_games = minetest_game,mineclone2,mineclonia,mineclone5 \ No newline at end of file diff --git a/extranodes/init.lua b/extranodes/init.lua index ac4941c..5dd0121 100644 --- a/extranodes/init.lua +++ b/extranodes/init.lua @@ -5,19 +5,23 @@ 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 -local stone_sounds = nil if minetest.get_modpath("mcl_sounds") then stone_sounds = mcl_sounds.node_sound_stone_defaults() else stone_sounds = default.node_sound_stone_defaults() end -wood_fence_ingrediant = nil +wood_fence_ingredient = nil if minetest.get_modpath("mcl_core") then - wood_fence_ingrediant = "group:fence_wood" + wood_fence_ingredient = "group:fence_wood" else - wood_fence_ingrediant = "default:fence_wood" + wood_fence_ingredient = "default:fence_wood" end if minetest.get_modpath("moreblocks") then @@ -126,7 +130,7 @@ end register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete") register_technic_stairs_alias("stairsplus", "marble", "technic", "marble") if not minetest.get_modpath("mcl_core") then - register_technic_stairs_alias("stairsplus", "granite", "technic", "granite") + register_technic_stairs_alias("stairsplus", "granite", "technic", "granite") end register_technic_stairs_alias("stairsplus", "marble_bricks", "technic", "marble_bricks") @@ -234,35 +238,32 @@ minetest.register_node(":technic:insulator_clip", iclip_def) minetest.register_node(":technic:insulator_clip_fencepost", iclipfence_def) -- MineClone2 support -local stone_ingrediant = nil -local white_dye_ingrediant = nil -local fence_ingrediant = nil if minetest.get_modpath("mcl_core") then - stone_ingrediant = "mcl_core:stone" - white_dye_ingrediant = "mcl_dye:white" - fence_ingrediant = "group:fence" + stone_ingredient = "mcl_core:stone" + white_dye_ingredient = "mcl_dye:white" + fence_ingredient = "group:fence" else - stone_ingrediant = "default:stone" - white_dye_ingrediant = "dye:white" - fence_ingrediant = "default:fence_wood" + stone_ingredient = "default:stone" + white_dye_ingredient = "dye:white" + fence_ingredient = "default:fence_wood" end minetest.register_craft({ output = "technic:insulator_clip", recipe = { - { "", white_dye_ingrediant, ""}, + { "", white_dye_ingredient, ""}, { "", "technic:raw_latex", ""}, - { "technic:raw_latex", stone_ingrediant, "technic:raw_latex"}, + { "technic:raw_latex", stone_ingredient, "technic:raw_latex"}, } }) minetest.register_craft({ output = "technic:insulator_clip_fencepost 2", recipe = { - { "", white_dye_ingrediant, ""}, + { "", white_dye_ingredient, ""}, { "", "technic:raw_latex", ""}, - { "technic:raw_latex", wood_fence_ingrediant, "technic:raw_latex"}, + { "technic:raw_latex", wood_fence_ingredient, "technic:raw_latex"}, } }) diff --git a/extranodes/mod.conf b/extranodes/mod.conf index 5080158..5963baf 100644 --- a/extranodes/mod.conf +++ b/extranodes/mod.conf @@ -1,4 +1,4 @@ name = extranodes depends = technic_worldgen, basic_materials, concrete optional_depends = unifieddyes, intllib, moreblocks, steel, streetsmod, default, mcl_core, mcl_sounds -supported_games = minetest_game,mineclone2 \ No newline at end of file +supported_games = minetest_game,mineclone2,mineclonia,mineclone5 \ No newline at end of file diff --git a/refactor.py b/refactor.py new file mode 100644 index 0000000..ba43106 --- /dev/null +++ b/refactor.py @@ -0,0 +1,40 @@ +import os +import re + +# Define the directory path of the project here +# For this example, I'm just using a placeholder path +# You would replace this with the path to your project directory +project_directory = './technic' + +# Regex to find all lines with either _ingredient or _sounds variables +variable_regex = re.compile(r'(\w+)(_ingredient|_sounds) = (.*)') + +# Function to refactor a single file +def refactor_file(file_path): + changes_made = False + with open(file_path, 'r') as file: + lines = file.readlines() + + with open(file_path, 'w') as file: + for line in lines: + match = variable_regex.search(line) + if match: + variable_name = match.group(1) + match.group(2) + new_line = f'technic.compat.{variable_name} = {match.group(3)}\n' + file.write(new_line) + changes_made = True + else: + file.write(line) + return changes_made + +# Function to walk through the project directory and refactor all files +def refactor_project(directory): + for subdir, _, files in os.walk(directory): + for file in files: + file_path = os.path.join(subdir, file) + if file_path.endswith('.lua'): + if refactor_file(file_path): + print(f'Refactored {file_path}') + +# Run the refactoring on the project directory +refactor_project(project_directory) diff --git a/technic/crafts.lua b/technic/crafts.lua index e7e7234..eb75b41 100644 --- a/technic/crafts.lua +++ b/technic/crafts.lua @@ -38,9 +38,9 @@ if pipeworks.enable_teleport_tube then minetest.register_craft({ output = 'pipeworks:teleport_tube_1', recipe = { - {mese_crystal_ingrediant, 'technic:copper_coil', mese_crystal_ingrediant}, + {mese_crystal_ingredient, 'technic:copper_coil', mese_crystal_ingredient}, {'pipeworks:tube_1', 'technic:control_logic_unit', 'pipeworks:tube_1'}, - {mese_crystal_ingrediant, 'technic:copper_coil', mese_crystal_ingrediant}, + {mese_crystal_ingredient, 'technic:copper_coil', mese_crystal_ingredient}, } }) end @@ -62,36 +62,36 @@ minetest.register_craft( { minetest.register_craft({ output = 'technic:diamond_drill_head', recipe = { - {'technic:stainless_steel_ingot', diamond_ingrediant, 'technic:stainless_steel_ingot'}, - {diamond_ingrediant, '', diamond_ingrediant}, - {'technic:stainless_steel_ingot', diamond_ingrediant, 'technic:stainless_steel_ingot'}, + {'technic:stainless_steel_ingot', diamond_ingredient, 'technic:stainless_steel_ingot'}, + {diamond_ingredient, '', diamond_ingredient}, + {'technic:stainless_steel_ingot', diamond_ingredient, 'technic:stainless_steel_ingot'}, } }) minetest.register_craft({ output = 'technic:green_energy_crystal', recipe = { - {gold_ingot_ingrediant, 'technic:battery', green_dye_ingrediant}, + {gold_ingot_ingredient, 'technic:battery', green_dye_ingredient}, {'technic:battery', 'technic:red_energy_crystal', 'technic:battery'}, - {green_dye_ingrediant, 'technic:battery', gold_ingot_ingrediant}, + {green_dye_ingredient, 'technic:battery', gold_ingot_ingredient}, } }) minetest.register_craft({ output = 'technic:blue_energy_crystal', recipe = { - {'moreores:mithril_ingot', 'technic:battery', blue_dye_ingrediant}, + {'moreores:mithril_ingot', 'technic:battery', blue_dye_ingredient}, {'technic:battery', 'technic:green_energy_crystal', 'technic:battery'}, - {blue_dye_ingrediant, 'technic:battery', 'moreores:mithril_ingot'}, + {blue_dye_ingredient, 'technic:battery', 'moreores:mithril_ingot'}, } }) minetest.register_craft({ output = 'technic:red_energy_crystal', recipe = { - {'moreores:silver_ingot', 'technic:battery', red_dye_ingrediant}, + {'moreores:silver_ingot', 'technic:battery', red_dye_ingredient}, {'technic:battery', 'basic_materials:energy_crystal_simple', 'technic:battery'}, - {red_dye_ingrediant, 'technic:battery', 'moreores:silver_ingot'}, + {red_dye_ingredient, 'technic:battery', 'moreores:silver_ingot'}, } }) @@ -143,7 +143,7 @@ minetest.register_craft({ output = 'technic:control_logic_unit', recipe = { {'', 'basic_materials:gold_wire', ''}, - {copper_ingrediant, 'technic:silicon_wafer', copper_ingrediant}, + {copper_ingredient, 'technic:silicon_wafer', copper_ingredient}, {'', 'technic:chromium_ingot', ''}, }, replacements = { {"basic_materials:gold_wire", "basic_materials:empty_spool"}, }, @@ -153,8 +153,8 @@ minetest.register_craft({ output = 'technic:mixed_metal_ingot 9', recipe = { {'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot'}, - {bronze_ingrediant, bronze_ingrediant, bronze_ingrediant}, - {tin_ingrediant, tin_ingrediant, tin_ingrediant}, + {bronze_ingredient, bronze_ingredient, bronze_ingredient}, + {tin_ingredient, tin_ingredient, tin_ingredient}, } }) @@ -175,7 +175,7 @@ minetest.register_craft({ }) minetest.register_craft({ - output = dirt_ingrediant.." 2", + output = dirt_ingredient.." 2", type = "shapeless", replacements = {{"bucket:bucket_water","bucket:bucket_empty"}}, recipe = { @@ -191,14 +191,14 @@ minetest.register_craft({ type = "shapeless", recipe = { "technic:raw_latex", - coal_ingrediant, - coal_ingrediant, - coal_ingrediant, - coal_ingrediant, - coal_ingrediant, - coal_ingrediant, - coal_ingrediant, - coal_ingrediant, + coal_ingredient, + coal_ingredient, + coal_ingredient, + coal_ingredient, + coal_ingredient, + coal_ingredient, + coal_ingredient, + coal_ingredient, }, }) diff --git a/technic/init.lua b/technic/init.lua index 816a15a..3f469bc 100644 --- a/technic/init.lua +++ b/technic/init.lua @@ -40,6 +40,11 @@ else end 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 dofile(modpath.."/config.lua") diff --git a/technic/machines/HV/forcefield.lua b/technic/machines/HV/forcefield.lua index ea28fcd..792aba6 100644 --- a/technic/machines/HV/forcefield.lua +++ b/technic/machines/HV/forcefield.lua @@ -17,9 +17,9 @@ local cable_entry = "^technic_cable_connection_overlay.png" minetest.register_craft({ output = "technic:forcefield_emitter_off", recipe = { - {mese_block_ingrediant, "basic_materials:motor", mese_block_ingrediant }, + {mese_block_ingredient, "basic_materials:motor", mese_block_ingredient}, {"technic:deployer_off", "technic:machine_casing", "technic:deployer_off"}, - {mese_block_ingrediant, "technic:hv_cable", mese_block_ingrediant }, + {mese_block_ingredient, "technic:hv_cable", mese_block_ingredient}, } }) diff --git a/technic/machines/HV/nuclear_reactor.lua b/technic/machines/HV/nuclear_reactor.lua index 3978d3e..43c6bf6 100644 --- a/technic/machines/HV/nuclear_reactor.lua +++ b/technic/machines/HV/nuclear_reactor.lua @@ -24,7 +24,7 @@ local cable_entry = "^technic_cable_connection_overlay.png" minetest.register_craft({ output = 'technic:hv_nuclear_reactor_core', recipe = { - {'technic:carbon_plate', obsidian_glass_ingrediant, 'technic:carbon_plate'}, + {'technic:carbon_plate', obsidian_glass_ingredient, 'technic:carbon_plate'}, {'technic:composite_plate', 'technic:machine_casing', 'technic:composite_plate'}, {'technic:stainless_steel_ingot', 'technic:hv_cable', 'technic:stainless_steel_ingot'}, } diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 28d273b..c1d3c2d 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -229,7 +229,6 @@ local function send_move_error(player) return 0 end -local quarry_pick = nil if minetest.get_modpath("mcl_core") then quarry_pick = "default_tool_diamondpick.png" else diff --git a/technic/machines/LV/alloy_furnace.lua b/technic/machines/LV/alloy_furnace.lua index 773d41c..db35d73 100644 --- a/technic/machines/LV/alloy_furnace.lua +++ b/technic/machines/LV/alloy_furnace.lua @@ -4,9 +4,9 @@ minetest.register_craft({ output = 'technic:lv_alloy_furnace', recipe = { - {brick_block_ingrediant, brick_block_ingrediant, brick_block_ingrediant}, - {brick_block_ingrediant, 'technic:machine_casing', brick_block_ingrediant}, - {brick_block_ingrediant, 'technic:lv_cable', brick_block_ingrediant}, + {brick_block_ingredient, brick_block_ingredient, brick_block_ingredient}, + {brick_block_ingredient, 'technic:machine_casing', brick_block_ingredient}, + {brick_block_ingredient, 'technic:lv_cable', brick_block_ingredient}, } }) diff --git a/technic/machines/LV/cables.lua b/technic/machines/LV/cables.lua index b9c4584..cb12032 100644 --- a/technic/machines/LV/cables.lua +++ b/technic/machines/LV/cables.lua @@ -4,9 +4,9 @@ minetest.register_alias("lv_cable", "technic:lv_cable") minetest.register_craft({ output = 'technic:lv_cable 6', recipe = { - {paper_ingrediant, paper_ingrediant, paper_ingrediant}, - {copper_ingrediant, copper_ingrediant, copper_ingrediant}, - {paper_ingrediant, paper_ingrediant, paper_ingrediant}, + {paper_ingredient, paper_ingredient, paper_ingredient}, + {copper_ingredient, copper_ingredient, copper_ingredient}, + {paper_ingredient, paper_ingredient, paper_ingredient}, } }) diff --git a/technic/machines/LV/compressor.lua b/technic/machines/LV/compressor.lua index be26365..d300cbc 100644 --- a/technic/machines/LV/compressor.lua +++ b/technic/machines/LV/compressor.lua @@ -4,7 +4,7 @@ minetest.register_alias("compressor", "technic:lv_compressor") minetest.register_craft({ output = 'technic:lv_compressor', recipe = { - {stone_ingrediant, 'basic_materials:motor', stone_ingrediant}, + {stone_ingredient, 'basic_materials:motor', stone_ingredient}, {'mesecons:piston', 'technic:machine_casing', 'mesecons:piston'}, {'basic_materials:silver_wire', 'technic:lv_cable', 'basic_materials:silver_wire'}, }, diff --git a/technic/machines/LV/electric_furnace.lua b/technic/machines/LV/electric_furnace.lua index 61dc9cc..53f3a58 100644 --- a/technic/machines/LV/electric_furnace.lua +++ b/technic/machines/LV/electric_furnace.lua @@ -5,9 +5,9 @@ minetest.register_craft({ output = 'technic:electric_furnace', recipe = { - {cobble_ingrediant, cobble_ingrediant, cobble_ingrediant}, - {cobble_ingrediant, 'technic:machine_casing', cobble_ingrediant}, - {cobble_ingrediant, 'technic:lv_cable', cobble_ingrediant}, + {cobble_ingredient, cobble_ingredient, cobble_ingredient}, + {cobble_ingredient, 'technic:machine_casing', cobble_ingredient}, + {cobble_ingredient, 'technic:lv_cable', cobble_ingredient}, } }) diff --git a/technic/machines/LV/generator.lua b/technic/machines/LV/generator.lua index 20fcaac..5ff9e9f 100644 --- a/technic/machines/LV/generator.lua +++ b/technic/machines/LV/generator.lua @@ -8,9 +8,9 @@ minetest.register_alias("lv_generator", "technic:lv_generator") minetest.register_craft({ output = 'technic:lv_generator', recipe = { - {stone_ingrediant, furnace_ingrediant, stone_ingrediant}, - {stone_ingrediant, 'technic:machine_casing', stone_ingrediant}, - {stone_ingrediant, 'technic:lv_cable', stone_ingrediant}, + {stone_ingredient, furnace_ingredient, stone_ingredient}, + {stone_ingredient, 'technic:machine_casing', stone_ingredient}, + {stone_ingredient, 'technic:lv_cable', stone_ingredient}, } }) diff --git a/technic/machines/LV/geothermal.lua b/technic/machines/LV/geothermal.lua index 616cc9e..48aadd6 100644 --- a/technic/machines/LV/geothermal.lua +++ b/technic/machines/LV/geothermal.lua @@ -10,9 +10,9 @@ local S = technic.getter minetest.register_craft({ output = 'technic:geothermal', recipe = { - {granite_ingrediant, diamond_ingrediant, granite_ingrediant}, + {granite_ingredient, diamond_ingredient, granite_ingredient}, {'basic_materials:copper_wire', 'technic:machine_casing', 'basic_materials:copper_wire'}, - {granite_ingrediant, 'technic:lv_cable', granite_ingrediant}, + {granite_ingredient, 'technic:lv_cable', granite_ingredient}, }, replacements = { {"basic_materials:copper_wire", "basic_materials:empty_spool"}, diff --git a/technic/machines/LV/grinder.lua b/technic/machines/LV/grinder.lua index 9fd21fc..d6354fe 100644 --- a/technic/machines/LV/grinder.lua +++ b/technic/machines/LV/grinder.lua @@ -3,9 +3,9 @@ minetest.register_alias("grinder", "technic:lv_grinder") minetest.register_craft({ output = 'technic:lv_grinder', recipe = { - {desert_stone_ingrediant, diamond_ingrediant, desert_stone_ingrediant}, - {desert_stone_ingrediant, 'technic:machine_casing', desert_stone_ingrediant}, - {granite_ingrediant, 'technic:lv_cable', granite_ingrediant}, + {desert_stone_ingredient, diamond_ingredient, desert_stone_ingredient}, + {desert_stone_ingredient, 'technic:machine_casing', desert_stone_ingredient}, + {granite_ingredient, 'technic:lv_cable', granite_ingredient}, } }) diff --git a/technic/machines/LV/lamp.lua b/technic/machines/LV/lamp.lua index 72683d1..6d580bb 100644 --- a/technic/machines/LV/lamp.lua +++ b/technic/machines/LV/lamp.lua @@ -149,7 +149,7 @@ technic.register_machine("LV", "technic:lv_lamp_active", technic.receiver) minetest.register_craft({ output = "technic:lv_lamp", recipe = { - {glass_ingrediant, glass_ingrediant, glass_ingrediant}, + {glass_ingredient, glass_ingredient, glass_ingredient}, {"technic:lv_led", "technic:lv_led", "technic:lv_led"}, {"mesecons_materials:glue", "technic:lv_cable", "mesecons_materials:glue"}, } diff --git a/technic/machines/LV/music_player.lua b/technic/machines/LV/music_player.lua index f47d6b8..272b5a8 100644 --- a/technic/machines/LV/music_player.lua +++ b/technic/machines/LV/music_player.lua @@ -7,9 +7,9 @@ minetest.register_alias("music_player", "technic:music_player") minetest.register_craft({ output = 'technic:music_player', recipe = { - {'technic:chromium_ingot', diamond_ingrediant, 'technic:chromium_ingot'}, - {diamond_ingrediant, 'technic:machine_casing', diamond_ingrediant}, - {mossy_cobble_ingrediant, 'technic:lv_cable', mossy_cobble_ingrediant}, + {'technic:chromium_ingot', diamond_ingredient, 'technic:chromium_ingot'}, + {diamond_ingredient, 'technic:machine_casing', diamond_ingredient}, + {mossy_cobble_ingredient, 'technic:lv_cable', mossy_cobble_ingredient}, } }) diff --git a/technic/machines/LV/water_mill.lua b/technic/machines/LV/water_mill.lua index a397737..2fa8161 100644 --- a/technic/machines/LV/water_mill.lua +++ b/technic/machines/LV/water_mill.lua @@ -11,7 +11,7 @@ minetest.register_alias("water_mill", "technic:water_mill") minetest.register_craft({ output = 'technic:water_mill', recipe = { - {'technic:marble', diamond_ingrediant, 'technic:marble'}, + {'technic:marble', diamond_ingredient, 'technic:marble'}, {'group:wood', 'technic:machine_casing', 'group:wood'}, {'technic:marble', 'technic:lv_cable', 'technic:marble'}, } diff --git a/technic/machines/MV/tool_workshop.lua b/technic/machines/MV/tool_workshop.lua index eee566f..82973c0 100644 --- a/technic/machines/MV/tool_workshop.lua +++ b/technic/machines/MV/tool_workshop.lua @@ -10,9 +10,9 @@ local tube_entry = "^pipeworks_tube_connection_wooden.png" minetest.register_craft({ output = 'technic:tool_workshop', recipe = { - {'group:wood', diamond_ingrediant, 'group:wood'}, + {'group:wood', diamond_ingredient, 'group:wood'}, {'mesecons_pistons:piston_sticky_off', 'technic:machine_casing', 'technic:carbon_cloth'}, - {obsidian_ingrediant, 'technic:mv_cable', obsidian_ingrediant}, + {obsidian_ingredient, 'technic:mv_cable', obsidian_ingredient}, } }) diff --git a/technic/machines/other/coal_alloy_furnace.lua b/technic/machines/other/coal_alloy_furnace.lua index 0197b67..d4584e0 100644 --- a/technic/machines/other/coal_alloy_furnace.lua +++ b/technic/machines/other/coal_alloy_furnace.lua @@ -6,9 +6,9 @@ local S = technic.getter minetest.register_craft({ output = 'technic:coal_alloy_furnace', recipe = { - {brick_block_ingrediant, brick_block_ingrediant, brick_block_ingrediant}, - {brick_block_ingrediant, '', brick_block_ingrediant}, - {brick_block_ingrediant, brick_block_ingrediant, brick_block_ingrediant}, + {brick_block_ingredient, brick_block_ingredient, brick_block_ingredient}, + {brick_block_ingredient, '', brick_block_ingredient}, + {brick_block_ingredient, brick_block_ingredient, brick_block_ingredient}, } }) diff --git a/technic/machines/other/frames.lua b/technic/machines/other/frames.lua index 8120f4c..923adff 100644 --- a/technic/machines/other/frames.lua +++ b/technic/machines/other/frames.lua @@ -981,7 +981,7 @@ minetest.register_craft({ output = 'technic:template 10', recipe = { { '', 'basic_materials:brass_ingot', '' }, - { 'basic_materials:brass_ingot', mese_crystal_ingrediant, 'basic_materials:brass_ingot' }, + { 'basic_materials:brass_ingot', mese_crystal_ingredient, 'basic_materials:brass_ingot' }, { '', 'basic_materials:brass_ingot', '' }, } }) @@ -1009,7 +1009,7 @@ minetest.register_craft({ output = 'technic:template_tool', recipe = { { '', 'technic:template', '' }, - { mese_crystal_ingrediant, 'default:stick', mese_crystal_ingrediant }, + { mese_crystal_ingredient, 'default:stick', mese_crystal_ingredient }, { '', 'default:stick', '' }, } }) diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua index 307a38d..8bc6a56 100644 --- a/technic/machines/other/injector.lua +++ b/technic/machines/other/injector.lua @@ -47,7 +47,7 @@ minetest.register_craft({ output = 'technic:injector 1', recipe = { {'', 'technic:control_logic_unit',''}, - {'', chest_ingrediant,''}, + {'', chest_ingredient,''}, {'', 'pipeworks:tube_1',''}, } }) diff --git a/technic/machines/power_monitor.lua b/technic/machines/power_monitor.lua index 80e8ce2..14e9863 100644 --- a/technic/machines/power_monitor.lua +++ b/technic/machines/power_monitor.lua @@ -10,7 +10,7 @@ minetest.register_craft({ output = "technic:power_monitor", recipe = { {"", "", ""}, - {"", "technic:machine_casing", copper_ingrediant}, + {"", "technic:machine_casing", copper_ingredient}, {"technic:lv_cable", "technic:lv_cable", "technic:lv_cable"} } }) diff --git a/technic/machines/register/battery_box.lua b/technic/machines/register/battery_box.lua index c96df6a..b271550 100644 --- a/technic/machines/register/battery_box.lua +++ b/technic/machines/register/battery_box.lua @@ -17,9 +17,9 @@ technic.register_power_tool("technic:blue_energy_crystal", 450000) minetest.register_craft({ output = "technic:battery", recipe = { - {"group:wood", copper_ingrediant, "group:wood"}, + {"group:wood", copper_ingredient, "group:wood"}, {"group:wood", "default:tin_ingot", "group:wood"}, - {"group:wood", copper_ingrediant, "group:wood"}, + {"group:wood", copper_ingredient, "group:wood"}, } }) -- Sulfur-lead-water recipes: diff --git a/technic/machines/register/common.lua b/technic/machines/register/common.lua index 7dcb7c9..389996e 100644 --- a/technic/machines/register/common.lua +++ b/technic/machines/register/common.lua @@ -35,7 +35,7 @@ end -- handles the machine upgrades when set or removed local function on_machine_upgrade(meta, stack) local stack_name = stack:get_name() - if stack_name == chest_ingrediant then + if stack_name == chest_ingredient then meta:set_int("public", 1) return 1 elseif stack_name ~= "technic:control_logic_unit" @@ -47,7 +47,7 @@ end -- something is about to be removed local function on_machine_downgrade(meta, stack, list) - if stack:get_name() == chest_ingrediant then + if stack:get_name() == chest_ingredient then local inv = meta:get_inventory() local upg1, upg2 = inv:get_stack("upgrade1", 1), inv:get_stack("upgrade2", 1) diff --git a/technic/machines/register/extractor_recipes.lua b/technic/machines/register/extractor_recipes.lua index cc95153..090260b 100644 --- a/technic/machines/register/extractor_recipes.lua +++ b/technic/machines/register/extractor_recipes.lua @@ -11,7 +11,7 @@ end if minetest.get_modpath("dye") or minetest.get_modpath("mcl_dye") then -- check if we are using dye or unifieddyes local unifieddyes = minetest.get_modpath("unifieddyes") - + for _, data in ipairs(extractor_recipes) do technic.register_extractor_recipe({input = {data[1]}, output = data[2]}) end diff --git a/technic/machines/register/grinder_recipes.lua b/technic/machines/register/grinder_recipes.lua index a99ca37..28a1c4a 100644 --- a/technic/machines/register/grinder_recipes.lua +++ b/technic/machines/register/grinder_recipes.lua @@ -82,15 +82,15 @@ register_dust("Cast Iron", "technic:cast_iron_ingot") register_dust("Chernobylite", "technic:chernobylite_block") register_dust("Chromium", "technic:chromium_ingot") register_dust("Coal", nil) -register_dust("Copper", copper_ingrediant) +register_dust("Copper", copper_ingredient) register_dust("Lead", "technic:lead_ingot") -register_dust("Gold", gold_ingot_ingrediant) +register_dust("Gold", gold_ingot_ingredient) register_dust("Mithril", "moreores:mithril_ingot") register_dust("Silver", "moreores:silver_ingot") register_dust("Stainless Steel", "technic:stainless_steel_ingot") register_dust("Stone", "default:stone") register_dust("Sulfur", nil) -register_dust("Tin", tin_ingrediant) +register_dust("Tin", tin_ingredient) register_dust("Wrought Iron", "technic:wrought_iron_ingot") register_dust("Zinc", "technic:zinc_ingot") if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua index e9964a3..ef1c01b 100644 --- a/technic/machines/switching_station.lua +++ b/technic/machines/switching_station.lua @@ -15,7 +15,7 @@ minetest.register_craft({ output = "technic:switching_station", recipe = { {"", "technic:lv_transformer", ""}, - {copper_ingrediant, "technic:machine_casing", copper_ingrediant}, + {copper_ingredient, "technic:machine_casing", copper_ingredient}, {"technic:lv_cable", "technic:lv_cable", "technic:lv_cable"} } }) diff --git a/technic/mcl_craftguide.lua b/technic/mcl_craftguide.lua index ffa162e..b652908 100644 --- a/technic/mcl_craftguide.lua +++ b/technic/mcl_craftguide.lua @@ -6,12 +6,12 @@ mcl_craftguide.register_craft_type("centrifuge", { mcl_craftguide.register_craft_type("compressor", { description = "Compressor", - icon = "technic_lv_compressor_front_active.png", + icon = "technic_lv_compressor_front_active.png", }) mcl_craftguide.register_craft_type("extractor", { description = "Extractor", - icon = "technic_lv_extractor_front_active.png", + icon = "technic_lv_extractor_front_active.png", }) mcl_craftguide.register_craft_type("freezer", { @@ -21,7 +21,7 @@ mcl_craftguide.register_craft_type("freezer", { mcl_craftguide.register_craft_type("grinder", { description = "Grinder", - icon = "technic_lv_grinder_front_active.png", + icon = "technic_lv_grinder_front_active.png", }) mcl_craftguide.register_craft_type("alloy_furnace", { @@ -34,17 +34,17 @@ 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", sand_ingrediant, "technic:uranium3_dust" }, - { dirt_ingrediant.." 4", sand_ingrediant, gravel_ingrediant, "default:clay_lump 2" }, + { "technic:chernobylite_dust", sand_ingredient, "technic:uranium3_dust" }, + { dirt_ingredient.." 4", sand_ingredient, gravel_ingredient, "default:clay_lump 2" }, } compressor_recipes = { - {snow_block_ingrediant, ice_block_ingrediant}, - {sand_ingrediant.." 2", sandstone_ingrediant}, - {desert_sand_ingrediant.." 2", desert_stone_ingrediant}, - {desert_sand_ingrediant, desert_stone_ingrediant}, + {snow_block_ingredient, ice_block_ingredient}, + {sand_ingredient.." 2", sandstone_ingredient}, + {desert_sand_ingredient.." 2", desert_stone_ingredient}, + {desert_sand_ingredient, desert_stone_ingredient}, {"technic:mixed_metal_ingot", "technic:composite_plate"}, - {copper_ingrediant.." 5", "technic:copper_plate"}, + {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"}, @@ -68,40 +68,40 @@ extractor_recipes = { } freezer_recipes = { - {water_bucket_ingrediant, { ice_block_ingrediant, emtpy_bucket_ingrediant } }, - {bucket_river_water_ingrediant, { ice_block_ingrediant, emtpy_bucket_ingrediant } }, - {dirt_ingrediant , dirt_with_snow_ingrediant }, - {bucket_lava_ingrediant, { obsidian_ingrediant, emtpy_bucket_ingrediant } } + {water_bucket_ingredient, { ice_block_ingredient, emtpy_bucket_ingredient } }, + {bucket_river_water_ingredient, { ice_block_ingredient, emtpy_bucket_ingredient } }, + {dirt_ingredient , dirt_with_snow_ingredient }, + {bucket_lava_ingredient, { obsidian_ingredient, emtpy_bucket_ingredient } } } grinder_recipes = { -- Dusts - {coal_ingrediant, "technic:coal_dust 2"}, - {copper_lump_ingrediant, "technic:copper_dust 2"}, - {desert_stone_ingrediant, desert_sand_ingrediant}, - {gold_lump_ingrediant, "technic:gold_dust 2"}, - {iron_lump_ingrediant, "technic:wrought_iron_dust 2"}, + {coal_ingredient, "technic:coal_dust 2"}, + {copper_lump_ingredient, "technic:copper_dust 2"}, + {desert_stone_ingredient, desert_sand_ingredient}, + {gold_lump_ingredient, "technic:gold_dust 2"}, + {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"}, - {stone_ingrediant, "technic:stone_dust"}, - {sand_ingrediant, "technic:stone_dust"}, - {desert_sand_ingrediant, "technic:stone_dust"}, + {stone_ingredient, "technic:stone_dust"}, + {sand_ingredient, "technic:stone_dust"}, + {desert_sand_ingredient, "technic:stone_dust"}, -- Other - {cobble_ingrediant, gravel_ingrediant}, - {gravel_ingrediant, sand_ingrediant}, - {sandstone_ingrediant, sand_ingrediant.." 2"}, -- reverse recipe can be found in the compressor - {desert_stone_ingrediant, desert_sand_ingrediant.." 2"}, -- reverse recipe can be found in the compressor - {ice_block_ingrediant, snow_block_ingrediant}, + {cobble_ingredient, gravel_ingredient}, + {gravel_ingredient, sand_ingredient}, + {sandstone_ingredient, sand_ingredient.." 2"}, -- reverse recipe can be found in the compressor + {desert_stone_ingredient, desert_sand_ingredient.." 2"}, -- reverse recipe can be found in the compressor + {ice_block_ingredient, snow_block_ingredient}, } alloy_recipes = { {"technic:copper_dust 7", "technic:tin_dust", "technic:bronze_dust 8", 12}, - {copper_ingrediant.." 7", tin_ingrediant, bronze_ingrediant.." 8", 12}, + {copper_ingredient.." 7", tin_ingredient, 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}, @@ -109,14 +109,14 @@ alloy_recipes = { {"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"}, - {copper_ingrediant.." 2", "technic:zinc_ingot", "basic_materials:brass_ingot 3"}, - {sand_ingrediant.." 2", "technic:coal_dust 2", "technic:silicon_wafer"}, + {copper_ingredient.." 2", "technic:zinc_ingot", "basic_materials:brass_ingot 3"}, + {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}, - {ice_block_ingrediant, emtpy_bucket_ingrediant, water_bucket_ingrediant, 1 }, + {ice_block_ingredient, emtpy_bucket_ingredient, water_bucket_ingredient, 1 }, } for _, data in pairs(alloy_recipes) do diff --git a/technic/mcl_support.lua b/technic/mcl_support.lua index 2c1d36e..cd1638e 100644 --- a/technic/mcl_support.lua +++ b/technic/mcl_support.lua @@ -1,51 +1,60 @@ local default = minetest.get_modpath("default") and default or {} -local mcl_core_modpath = minetest.get_modpath("mcl_core") +local mcl = minetest.get_modpath("mcl_core") + +-- Compatibility table +local technic = {} +technic.compat = {} + +-- Helper function to set compatibility variables +local function set_compat(mcl_value, default_value) + return mcl and mcl_value or default_value +end -- Mineclone2 Support stone_sounds = mcl_core_modpath and mcl_sounds.node_sound_stone_defaults() or default.node_sound_stone_defaults() mt_light_max = mcl_core_modpath and mcl_core.LIGHT_MAX or default.LIGHT_MAX -copper_ingrediant = mcl_core_modpath and "mcl_copper:copper_ingot" or 'default:copper_ingot' -iron_ingrediant = mcl_core_modpath and "mcl_core:iron_ingot" or 'default:steel_ingot' -iron_lump_ingrediant = mcl_core_modpath and "mcl_raw_ores:raw_iron" or 'default:iron_lump' -gold_lump_ingrediant = mcl_core_modpath and "mcl_raw_ores:raw_gold" or 'default:gold_lump' -copper_lump_ingrediant = mcl_core_modpath and "mcl_copper:raw_copper" or 'default:copper_lump' -mese_crystal_ingrediant = mcl_core_modpath and "mesecons:wire_00000000_off" or 'default:mese_crystal' -diamond_ingrediant = mcl_core_modpath and "mcl_core:diamond" or 'default:diamond' -glass_ingrediant = mcl_core_modpath and "mcl_core:glass" or 'default:glass' -brick_block_ingrediant = mcl_core_modpath and "mcl_core:brick_block" or 'default:brick' -mese_block_ingrediant = mcl_core_modpath and "mesecons_torch:redstoneblock" or "default:mese" -paper_ingrediant = mcl_core_modpath and "mcl_core:paper" or 'default:paper' -obsidian_glass_ingrediant = mcl_core_modpath and "mcl_core:obsidian" or 'default:obsidian_glass' -obsidian_ingrediant = mcl_core_modpath and "mcl_core:obsidian" or 'default:obsidian' -green_dye_ingrediant = mcl_core_modpath and "mcl_dye:green" or 'dye:green' -blue_dye_ingrediant = mcl_core_modpath and "mcl_dye:blue" or 'dye:blue' -red_dye_ingrediant = mcl_core_modpath and "mcl_dye:red" or 'dye:red' -white_dye_ingrediant = mcl_core_modpath and "mcl_dye:white" or 'dye:white' -gold_ingot_ingrediant = mcl_core_modpath and "mcl_core:gold_ingot" or 'default:gold_ingot' -chest_ingrediant = mcl_core_modpath and "mcl_chests:chest" or "default:chest" -stone_ingrediant = mcl_core_modpath and "mcl_core:stone" or "default:stone" -wood_fence_ingrediant = mcl_core_modpath and "group:fence_wood" or "default:fence_wood" -diamond_ingrediant = mcl_core_modpath and "mcl_core:diamond" or "default:diamond" -bronze_ingrediant = mcl_core_modpath and "mcl_copper:copper_ingot" or 'default:bronze_ingot' -tin_ingrediant = mcl_core_modpath and "moreores:tin_ingot" or 'default:tin_ingot' -sandstone_ingrediant = mcl_core_modpath and "mcl_core:sandstone" or 'default:desert_stone' -sand_ingrediant = mcl_core_modpath and "mcl_core:sand" or 'default:sand' -gravel_ingrediant = mcl_core_modpath and "mcl_core:gravel" or 'default:gravel' -desert_stone_ingrediant = mcl_core_modpath and "mcl_core:redsandstone" or 'default:desert_stone' -desert_sand_ingrediant = mcl_core_modpath and "mcl_core:redsand" or 'default:desert_sand' -furnace_ingrediant = mcl_core_modpath and "mcl_furnaces:furnace" or 'default:furnace' -mossy_cobble_ingrediant = mcl_core_modpath and "mcl_core:mossycobble" or 'default:mossycobble' -cobble_ingrediant = mcl_core_modpath and "mcl_core:cobble" or 'default:cobble' -snow_block_ingrediant = mcl_core_modpath and "mcl_core:snowblock" or 'default:snowblock' -ice_block_ingrediant = mcl_core_modpath and "mcl_core:ice" or 'default:ice' -granite_ingrediant = mcl_core_modpath and "mcl_core:granite" or 'technic:granite' -granite_bricks_ingrediant = mcl_core_modpath and "mcl_core:granite_smooth" or 'technic:granite_bricks' -coal_ingrediant = mcl_core_modpath and "group:coal" or "default:coal_lump" -dirt_ingrediant = mcl_core_modpath and "mcl_core:dirt" or "default:dirt" -mesecons_fiber_ingrediant = mcl_core_modpath and "mesecons:wire_00000000_off" or "mesecons_materials:fiber" -stick_ingrediant = mcl_core_modpath and "mcl_core:stick" or "default:stick" -emtpy_bucket_ingrediant = mcl_core_modpath and "mcl_buckets:bucket_empty" or "bucket:bucket_empty" -water_bucket_ingrediant = mcl_core_modpath and "mcl_buckets:bucket_water" or "bucket:bucket_water" +copper_ingredient = mcl_core_modpath and "mcl_copper:copper_ingot" or 'default:copper_ingot' +iron_ingredient = mcl_core_modpath and "mcl_core:iron_ingot" or 'default:steel_ingot' +iron_lump_ingredient = mcl_core_modpath and "mcl_raw_ores:raw_iron" or 'default:iron_lump' +gold_lump_ingredient = mcl_core_modpath and "mcl_raw_ores:raw_gold" or 'default:gold_lump' +copper_lump_ingredient = mcl_core_modpath and "mcl_copper:raw_copper" or 'default:copper_lump' +mese_crystal_ingredient = mcl_core_modpath and "mesecons:wire_00000000_off" or 'default:mese_crystal' +diamond_ingredient = mcl_core_modpath and "mcl_core:diamond" or 'default:diamond' +glass_ingredient = mcl_core_modpath and "mcl_core:glass" or 'default:glass' +brick_block_ingredient = mcl_core_modpath and "mcl_core:brick_block" or 'default:brick' +mese_block_ingredient = mcl_core_modpath and "mesecons_torch:redstoneblock" or "default:mese" +paper_ingredient = mcl_core_modpath and "mcl_core:paper" or 'default:paper' +obsidian_glass_ingredient = mcl_core_modpath and "mcl_core:obsidian" or 'default:obsidian_glass' +obsidian_ingredient = mcl_core_modpath and "mcl_core:obsidian" or 'default:obsidian' +green_dye_ingredient = mcl_core_modpath and "mcl_dye:green" or 'dye:green' +blue_dye_ingredient = mcl_core_modpath and "mcl_dye:blue" or 'dye:blue' +red_dye_ingredient = mcl_core_modpath and "mcl_dye:red" or 'dye:red' +white_dye_ingredient = mcl_core_modpath and "mcl_dye:white" or 'dye:white' +gold_ingot_ingredient = mcl_core_modpath and "mcl_core:gold_ingot" or 'default:gold_ingot' +chest_ingredient = mcl_core_modpath and "mcl_chests:chest" or "default:chest" +stone_ingredient = mcl_core_modpath and "mcl_core:stone" or "default:stone" +wood_fence_ingredient = mcl_core_modpath and "group:fence_wood" or "default:fence_wood" +diamond_ingredient = mcl_core_modpath and "mcl_core:diamond" or "default:diamond" +bronze_ingredient = mcl_core_modpath and "mcl_copper:copper_ingot" or 'default:bronze_ingot' +tin_ingredient = mcl_core_modpath and "moreores:tin_ingot" or 'default:tin_ingot' +sandstone_ingredient = mcl_core_modpath and "mcl_core:sandstone" or 'default:desert_stone' +sand_ingredient = mcl_core_modpath and "mcl_core:sand" or 'default:sand' +gravel_ingredient = mcl_core_modpath and "mcl_core:gravel" or 'default:gravel' +desert_stone_ingredient = mcl_core_modpath and "mcl_core:redsandstone" or 'default:desert_stone' +desert_sand_ingredient = mcl_core_modpath and "mcl_core:redsand" or 'default:desert_sand' +furnace_ingredient = mcl_core_modpath and "mcl_furnaces:furnace" or 'default:furnace' +mossy_cobble_ingredient = mcl_core_modpath and "mcl_core:mossycobble" or 'default:mossycobble' +cobble_ingredient = mcl_core_modpath and "mcl_core:cobble" or 'default:cobble' +snow_block_ingredient = mcl_core_modpath and "mcl_core:snowblock" or 'default:snowblock' +ice_block_ingredient = mcl_core_modpath and "mcl_core:ice" or 'default:ice' +granite_ingredient = mcl_core_modpath and "mcl_core:granite" or 'technic:granite' +granite_bricks_ingredient = mcl_core_modpath and "mcl_core:granite_smooth" or 'technic:granite_bricks' +coal_ingredient = mcl_core_modpath and "group:coal" or "default:coal_lump" +dirt_ingredient = mcl_core_modpath and "mcl_core:dirt" or "default:dirt" +mesecons_fiber_ingredient = mcl_core_modpath and "mesecons:wire_00000000_off" or "mesecons_materials:fiber" +stick_ingredient = mcl_core_modpath and "mcl_core:stick" or "default:stick" +emtpy_bucket_ingredient = mcl_core_modpath and "mcl_buckets:bucket_empty" or "bucket:bucket_empty" +water_bucket_ingredient = mcl_core_modpath and "mcl_buckets:bucket_water" or "bucket:bucket_water" -- Ingredient Variables if mcl_core_modpath then @@ -97,6 +106,6 @@ else dye_red = "dye:red" end -dirt_with_snow_ingrediant = mcl_core_modpath and "mcl_core:dirt_with_grass_snow" or "default:dirt_with_snow" -bucket_lava_ingrediant = mcl_core_modpath and "mcl_buckets:bucket_lava" or "bucket:bucket_lava" -bucket_river_water_ingrediant = mcl_core_modpath and "mcl_buckets:bucket_river_water" or "bucket:bucket_river_water" +dirt_with_snow_ingredient = mcl_core_modpath and "mcl_core:dirt_with_grass_snow" or "default:dirt_with_snow" +bucket_lava_ingredient = mcl_core_modpath and "mcl_buckets:bucket_lava" or "bucket:bucket_lava" +bucket_river_water_ingredient = mcl_core_modpath and "mcl_buckets:bucket_river_water" or "bucket:bucket_river_water" diff --git a/technic/mod.conf b/technic/mod.conf index 480451a..448cf74 100644 --- a/technic/mod.conf +++ b/technic/mod.conf @@ -1,4 +1,4 @@ name = technic depends = pipeworks, technic_worldgen, basic_materials 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 \ No newline at end of file +supported_games = minetest_game,mineclone2,mineclonia,mineclone5 \ No newline at end of file diff --git a/technic/radiation.lua b/technic/radiation.lua index 52554b2..d0cdb59 100644 --- a/technic/radiation.lua +++ b/technic/radiation.lua @@ -52,7 +52,7 @@ local rad_resistance_node = { ["default:ice"] = 5.6, ["default:lava_flowing"] = 8.5, ["default:lava_source"] = 17, - [mese_block_ingrediant] = 21, + [mese_block_ingredient] = 21, ["default:mossycobble"] = 15, ["default:tinblock"] = 37, ["pbj_pup:pbj_pup"] = 10000, @@ -64,7 +64,7 @@ local rad_resistance_node = { ["nyancat:nyancat"] = 10000, ["nyancat:nyancat_rainbow"] = 10000, ["default:obsidian"] = 18, - [obsidian_glass_ingrediant] = 18, + [obsidian_glass_ingredient] = 18, ["default:sand"] = 10, ["default:sandstone"] = 15, ["default:sandstonebrick"] = 15, @@ -153,7 +153,7 @@ local rad_resistance_node = { ["technic:chromium_block"] = 37, ["technic:corium_flowing"] = 40, ["technic:corium_source"] = 80, - [granite_ingrediant] = 18, + [granite_ingredient] = 18, ["technic:lead_block"] = 80, ["technic:marble"] = 18, ["technic:marble_bricks"] = 18, diff --git a/technic/tools/cans.lua b/technic/tools/cans.lua index 8853560..aa6b161 100644 --- a/technic/tools/cans.lua +++ b/technic/tools/cans.lua @@ -135,7 +135,7 @@ minetest.register_craft({ output = 'technic:river_water_can 1', recipe = { {'technic:zinc_ingot', 'technic:rubber', 'technic:zinc_ingot'}, - {iron_ingrediant, '', iron_ingrediant}, - {'technic:zinc_ingot', iron_ingrediant, 'technic:zinc_ingot'}, + {iron_ingredient, '', iron_ingredient}, + {'technic:zinc_ingot', iron_ingredient, 'technic:zinc_ingot'}, } }) diff --git a/technic/tools/mining_drill.lua b/technic/tools/mining_drill.lua index 4b1ad3f..fec7b93 100644 --- a/technic/tools/mining_drill.lua +++ b/technic/tools/mining_drill.lua @@ -6,9 +6,9 @@ local S = technic.getter minetest.register_craft({ output = 'technic:mining_drill', recipe = { - {tin_ingrediant, 'technic:diamond_drill_head', tin_ingrediant}, + {tin_ingredient, 'technic:diamond_drill_head', tin_ingredient}, {'technic:stainless_steel_ingot', 'basic_materials:motor', 'technic:stainless_steel_ingot'}, - {'', 'technic:red_energy_crystal', copper_ingrediant}, + {'', 'technic:red_energy_crystal', copper_ingredient}, } }) minetest.register_craft({ diff --git a/technic/tools/mining_lasers.lua b/technic/tools/mining_lasers.lua index 0f5d88b..f3db2c1 100644 --- a/technic/tools/mining_lasers.lua +++ b/technic/tools/mining_lasers.lua @@ -11,25 +11,25 @@ local S = technic.getter minetest.register_craft({ output = "technic:laser_mk1", recipe = { - {diamond_ingrediant, "basic_materials:brass_ingot", obsidian_glass_ingrediant}, - {"", "basic_materials:brass_ingot", "technic:red_energy_crystal"}, - {"", "", copper_ingrediant}, + {diamond_ingredient, "basic_materials:brass_ingot", obsidian_glass_ingredient}, + {"","basic_materials:brass_ingot", "technic:red_energy_crystal"}, + {"", "", copper_ingredient}, } }) minetest.register_craft({ output = "technic:laser_mk2", recipe = { - {diamond_ingrediant, "technic:carbon_steel_ingot", "technic:laser_mk1"}, - {"", "technic:carbon_steel_ingot", "technic:green_energy_crystal"}, - {"", "", copper_ingrediant}, + {diamond_ingredient, "technic:carbon_steel_ingot", "technic:laser_mk1"}, + {"", "technic:carbon_steel_ingot", "technic:green_energy_crystal"}, + {"", "", copper_ingredient}, } }) minetest.register_craft({ output = "technic:laser_mk3", recipe = { - {diamond_ingrediant, "technic:carbon_steel_ingot", "technic:laser_mk2"}, - {"", "technic:carbon_steel_ingot", "technic:blue_energy_crystal"}, - {"", "", copper_ingrediant}, + {diamond_ingredient, "technic:carbon_steel_ingot", "technic:laser_mk2"}, + {"", "technic:carbon_steel_ingot", "technic:blue_energy_crystal"}, + {"", "", copper_ingredient}, } }) diff --git a/technic/tools/sonic_screwdriver.lua b/technic/tools/sonic_screwdriver.lua index 0cbe511..2044e5b 100644 --- a/technic/tools/sonic_screwdriver.lua +++ b/technic/tools/sonic_screwdriver.lua @@ -90,9 +90,9 @@ minetest.register_tool("technic:sonic_screwdriver", { minetest.register_craft({ output = "technic:sonic_screwdriver", recipe = { - {"", diamond_ingrediant, ""}, - {mesecons_fiber_ingrediant, "technic:battery", mesecons_fiber_ingrediant}, - {mesecons_fiber_ingrediant, "moreores:mithril_ingot", mesecons_fiber_ingrediant} + {"", diamond_ingredient, ""}, + {mesecons_fiber_ingredient, "technic:battery", mesecons_fiber_ingredient}, + {mesecons_fiber_ingredient, "moreores:mithril_ingot", mesecons_fiber_ingredient} } }) diff --git a/technic/tools/tree_tap.lua b/technic/tools/tree_tap.lua index 7a37423..8926aa5 100644 --- a/technic/tools/tree_tap.lua +++ b/technic/tools/tree_tap.lua @@ -38,8 +38,8 @@ minetest.register_tool("technic:treetap", { minetest.register_craft({ output = "technic:treetap", recipe = { - {"pipeworks:tube_1", "group:wood", stick_ingrediant}, - {"", stick_ingrediant, stick_ingrediant} + {"pipeworks:tube_1", "group:wood", stick_ingredient}, + {"", stick_ingredient, stick_ingredient} }, }) diff --git a/technic_chests/copper_chest.lua b/technic_chests/copper_chest.lua index 47241b7..dca3989 100644 --- a/technic_chests/copper_chest.lua +++ b/technic_chests/copper_chest.lua @@ -1,18 +1,18 @@ minetest.register_craft({ output = 'technic:copper_chest 1', recipe = { - {copper_ingrediant,copper_ingrediant,copper_ingrediant}, - {copper_ingrediant,'technic:iron_chest',copper_ingrediant}, - {copper_ingrediant,copper_ingrediant,copper_ingrediant}, + {copper_ingredient,copper_ingredient,copper_ingredient}, + {copper_ingredient,'technic:iron_chest',copper_ingredient}, + {copper_ingredient,copper_ingredient,copper_ingredient}, } }) minetest.register_craft({ output = 'technic:copper_locked_chest 1', recipe = { - {copper_ingrediant,copper_ingrediant,copper_ingrediant}, - {copper_ingrediant,'technic:iron_locked_chest',copper_ingrediant}, - {copper_ingrediant,copper_ingrediant,copper_ingrediant}, + {copper_ingredient,copper_ingredient,copper_ingredient}, + {copper_ingredient,'technic:iron_locked_chest',copper_ingredient}, + {copper_ingredient,copper_ingredient,copper_ingredient}, } }) diff --git a/technic_chests/gold_chest.lua b/technic_chests/gold_chest.lua index 419cc96..bad26d1 100644 --- a/technic_chests/gold_chest.lua +++ b/technic_chests/gold_chest.lua @@ -11,18 +11,18 @@ for _, material in ipairs(material_list) do minetest.register_craft({ output = 'technic:gold_chest', recipe = { - {gold_ingot_ingrediant,gold_ingot_ingrediant,gold_ingot_ingrediant}, - {gold_ingot_ingrediant,"technic:"..material.."_chest",gold_ingot_ingrediant}, - {gold_ingot_ingrediant,gold_ingot_ingrediant,gold_ingot_ingrediant}, + {gold_ingot_ingredient,gold_ingot_ingredient,gold_ingot_ingredient}, + {gold_ingot_ingredient,"technic:"..material.."_chest",gold_ingot_ingredient}, + {gold_ingot_ingredient,gold_ingot_ingredient,gold_ingot_ingredient}, } }) minetest.register_craft({ output = 'technic:gold_locked_chest', recipe = { - {gold_ingot_ingrediant,gold_ingot_ingrediant,gold_ingot_ingrediant}, - {gold_ingot_ingrediant,"technic:"..material.."_locked_chest",gold_ingot_ingrediant}, - {gold_ingot_ingrediant,gold_ingot_ingrediant,gold_ingot_ingrediant}, + {gold_ingot_ingredient,gold_ingot_ingredient,gold_ingot_ingredient}, + {gold_ingot_ingredient,"technic:"..material.."_locked_chest",gold_ingot_ingredient}, + {gold_ingot_ingredient,gold_ingot_ingredient,gold_ingot_ingredient}, } }) end diff --git a/technic_chests/init.lua b/technic_chests/init.lua index 8984b3e..0f88909 100644 --- a/technic_chests/init.lua +++ b/technic_chests/init.lua @@ -4,6 +4,11 @@ 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 @@ -27,46 +32,46 @@ else end -- Mineclone2 Recipes -chest_ingrediant = nil +chest_ingredient = nil if minetest.get_modpath("mcl_core") then - chest_ingrediant = "mcl_chests:chest" + chest_ingredient = "mcl_chests:chest" else - chest_ingrediant = "default:chest" + chest_ingredient = "default:chest" end -copper_ingrediant = nil +copper_ingredient = nil if minetest.get_modpath("mcl_core") then - copper_ingrediant = "mcl_copper:copper_ingot" + copper_ingredient = "mcl_copper:copper_ingot" else - copper_ingrediant = 'default:copper_ingot' + copper_ingredient = 'default:copper_ingot' end -gold_ingot_ingrediant = nil +gold_ingot_ingredient = nil if minetest.get_modpath("mcl_core") then - gold_ingot_ingrediant = "mcl_core:gold_ingot" + gold_ingot_ingredient = "mcl_core:gold_ingot" else - gold_ingot_ingrediant = 'default:gold_ingot' + gold_ingot_ingredient = 'default:gold_ingot' end -granite_ingrediant = nil +granite_ingredient = nil if minetest.get_modpath("mcl_core") then - granite_ingrediant = "mcl_core:granite" + granite_ingredient = "mcl_core:granite" else - granite_ingrediant = 'technic:granite' + granite_ingredient = 'technic:granite' end -granite_bricks_ingrediant = nil +granite_bricks_ingredient = nil if minetest.get_modpath("mcl_core") then - granite_bricks_ingrediant = "mcl_core:granite_smooth" + granite_bricks_ingredient = "mcl_core:granite_smooth" else - granite_bricks_ingrediant = 'technic:granite_bricks' + granite_bricks_ingredient = 'technic:granite_bricks' end -coal_ingrediant = nil +coal_ingredient = nil if minetest.get_modpath("mcl_core") then - coal_ingrediant = "group:coal" + coal_ingredient = "group:coal" else - coal_ingrediant = "default:coal_lump" + coal_ingredient = "default:coal_lump" end technic = rawget(_G, "technic") or {} diff --git a/technic_chests/iron_chest.lua b/technic_chests/iron_chest.lua index 49717a3..e44eafe 100644 --- a/technic_chests/iron_chest.lua +++ b/technic_chests/iron_chest.lua @@ -9,7 +9,7 @@ minetest.register_craft({ output = 'technic:iron_chest 1', recipe = { {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot}, - {cast_iron_ingot,chest_ingrediant,cast_iron_ingot}, + {cast_iron_ingot,chest_ingredient,cast_iron_ingot}, {cast_iron_ingot,cast_iron_ingot,cast_iron_ingot}, } }) diff --git a/technic_chests/mod.conf b/technic_chests/mod.conf index 0556e50..626a825 100644 --- a/technic_chests/mod.conf +++ b/technic_chests/mod.conf @@ -1,4 +1,4 @@ name = technic_chests depends = basic_materials optional_depends = moreblocks, moreores, pipeworks, intllib, tubelib, default, mcl_core -supported_games = minetest_game,mineclone2 \ No newline at end of file +supported_games = minetest_game,mineclone2,mineclonia,mineclone5 \ No newline at end of file diff --git a/technic_cnc/cnc.lua b/technic_cnc/cnc.lua index fed1b3c..841b50e 100644 --- a/technic_cnc/cnc.lua +++ b/technic_cnc/cnc.lua @@ -19,7 +19,7 @@ if technic_cnc.use_technic then minetest.register_craft({ output = 'technic:cnc', recipe = { - {glass_ingrediant, 'technic:diamond_drill_head', glass_ingrediant}, + {glass_ingredient, 'technic:diamond_drill_head', glass_ingredient}, {'technic:control_logic_unit', 'technic:machine_casing', 'basic_materials:motor'}, {'technic:carbon_steel_ingot', 'technic:lv_cable', 'technic:carbon_steel_ingot'}, }, @@ -34,9 +34,9 @@ else minetest.register_craft({ output = 'technic:cnc', recipe = { - {glass_ingrediant, diamond_ingrediant, glass_ingrediant}, + {glass_ingredient, diamond_ingredient, glass_ingredient}, {'basic_materials:ic', 'default:steelblock', 'basic_materials:motor'}, - {'default:steel_ingot', mese_block_ingrediant, 'default:steel_ingot'}, + {'default:steel_ingot', mese_block_ingredient, 'default:steel_ingot'}, }, }) diff --git a/technic_cnc/init.lua b/technic_cnc/init.lua index f1cb03b..84861d3 100644 --- a/technic_cnc/init.lua +++ b/technic_cnc/init.lua @@ -23,6 +23,14 @@ else 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_api.lua") dofile(modpath.."/cnc_materials.lua") diff --git a/technic_cnc/mod.conf b/technic_cnc/mod.conf index 300fdd8..b58bf3d 100644 --- a/technic_cnc/mod.conf +++ b/technic_cnc/mod.conf @@ -1,4 +1,4 @@ name = technic_cnc depends = basic_materials optional_depends = technic, default, mcl_core -supported_games = minetest_game,mineclone2 \ No newline at end of file +supported_games = minetest_game,mineclone2,mineclonia,mineclone5 \ No newline at end of file diff --git a/technic_worldgen/init.lua b/technic_worldgen/init.lua index dbd5f0c..c4b81b3 100644 --- a/technic_worldgen/init.lua +++ b/technic_worldgen/init.lua @@ -1,39 +1,19 @@ local modpath = minetest.get_modpath("technic_worldgen") + -- Mineclone 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 - -leaves_sounds = nil -if minetest.get_modpath("mcl_sounds") then - leaves_sounds = mcl_sounds.node_sound_leaves_defaults() -else - leaves_sounds = default.node_sound_leaves_defaults() -end +sounds = minetest.get_modpath("mcl_sounds") and mcl_sounds or default technic = rawget(_G, "technic") or {} technic.worldgen = { 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.."/nodes.lua") dofile(modpath.."/oregen.lua") diff --git a/technic_worldgen/mod.conf b/technic_worldgen/mod.conf index 4215a15..94fb64d 100644 --- a/technic_worldgen/mod.conf +++ b/technic_worldgen/mod.conf @@ -1,4 +1,4 @@ name = technic_worldgen depends = basic_materials optional_depends = intllib, mg, doors, farming, glooptest, mesecons_doors, vessels, default, mcl_core, mcl_sounds -supported_games = minetest_game,mineclone2 +supported_games = minetest_game,mineclone2,mineclonia,mineclone5 diff --git a/technic_worldgen/nodes.lua b/technic_worldgen/nodes.lua index ad70d63..011f62f 100644 --- a/technic_worldgen/nodes.lua +++ b/technic_worldgen/nodes.lua @@ -6,7 +6,7 @@ minetest.register_node( ":technic:mineral_uranium", { tiles = { "default_stone.png^technic_mineral_uranium.png" }, is_ground_content = true, groups = {cracky=3, radioactive=1,pickaxey=5,material_stone=1}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), drop = "technic:uranium_lump", _mcl_hardness = 5, _mcl_blast_resistance = 3, @@ -19,7 +19,7 @@ minetest.register_node( ":technic:mineral_chromium", { tiles = { "default_stone.png^technic_mineral_chromium.png" }, is_ground_content = true, groups = {cracky=3,pickaxey=3,material_stone=1}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), drop = "technic:chromium_lump", _mcl_hardness = 3, _mcl_blast_resistance = 3, @@ -32,7 +32,7 @@ minetest.register_node( ":technic:mineral_zinc", { tiles = { "default_stone.png^technic_mineral_zinc.png" }, is_ground_content = true, groups = {cracky=3,pickaxey=2,material_stone=1}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), drop = "technic:zinc_lump", _mcl_hardness = 2, _mcl_blast_resistance = 3, @@ -45,7 +45,7 @@ minetest.register_node( ":technic:mineral_lead", { tiles = { "default_stone.png^technic_mineral_lead.png" }, is_ground_content = true, groups = {cracky=3,pickaxey=2,material_stone=1}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), drop = "technic:lead_lump", _mcl_hardness = 2, _mcl_blast_resistance = 3, @@ -58,7 +58,7 @@ minetest.register_node( ":technic:mineral_sulfur", { tiles = { "default_stone.png^technic_mineral_sulfur.png" }, is_ground_content = true, groups = {cracky=3,pickaxey=1,material_stone=1}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), drop = "technic:sulfur_lump", _mcl_hardness = 1, _mcl_blast_resistance = 3, @@ -67,22 +67,22 @@ minetest.register_node( ":technic:mineral_sulfur", { }) 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 = stone_sounds, -}) + 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 = stone_sounds, -}) + 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", { @@ -90,7 +90,7 @@ minetest.register_node( ":technic:marble", { tiles = { "technic_marble.png" }, is_ground_content = true, groups = {cracky=3, marble=1,pickaxey=3}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 3, _mcl_blast_resistance = 3, _mcl_silk_touch_drop = true, @@ -102,7 +102,7 @@ minetest.register_node( ":technic:marble_bricks", { tiles = { "technic_marble_bricks.png" }, is_ground_content = false, groups = {cracky=3,pickaxey=3}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 3, _mcl_blast_resistance = 3, _mcl_silk_touch_drop = true, @@ -114,7 +114,7 @@ minetest.register_node(":technic:uranium_block", { tiles = { "technic_uranium_block.png" }, is_ground_content = true, groups = {uranium_block=1, cracky=1, level=2, radioactive=2,pickaxey=5}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 5, _mcl_blast_resistance = 3, _mcl_silk_touch_drop = true, @@ -126,7 +126,7 @@ minetest.register_node(":technic:chromium_block", { tiles = { "technic_chromium_block.png" }, is_ground_content = true, groups = {cracky=1, level=2,pickaxey=4}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 4, _mcl_blast_resistance = 3, _mcl_silk_touch_drop = true, @@ -138,7 +138,7 @@ minetest.register_node(":technic:zinc_block", { tiles = { "technic_zinc_block.png" }, is_ground_content = true, groups = {cracky=1, level=2,pickaxey=3}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 3, _mcl_blast_resistance = 3, _mcl_silk_touch_drop = true, @@ -150,7 +150,7 @@ minetest.register_node(":technic:lead_block", { tiles = { "technic_lead_block.png" }, is_ground_content = true, groups = {cracky=1, level=2,pickaxey=5}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 5, _mcl_blast_resistance = 5, _mcl_silk_touch_drop = true, @@ -158,12 +158,12 @@ minetest.register_node(":technic:lead_block", { }) if minetest.get_modpath("default") then -minetest.register_alias("technic:wrought_iron_block", "default:steelblock") + 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" }, -}) + minetest.override_item("default:steelblock", { + description = S("Wrought Iron Block"), + tiles = { "technic_wrought_iron_block.png" }, + }) end minetest.register_node(":technic:cast_iron_block", { @@ -171,7 +171,7 @@ minetest.register_node(":technic:cast_iron_block", { tiles = { "technic_cast_iron_block.png" }, is_ground_content = true, groups = {cracky=1, level=2}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 3, _mcl_blast_resistance = 3, _mcl_silk_touch_drop = true, @@ -183,7 +183,7 @@ minetest.register_node(":technic:carbon_steel_block", { tiles = { "technic_carbon_steel_block.png" }, is_ground_content = true, groups = {cracky=1, level=2}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 3, _mcl_blast_resistance = 3, _mcl_silk_touch_drop = true, @@ -195,7 +195,7 @@ minetest.register_node(":technic:stainless_steel_block", { tiles = { "technic_stainless_steel_block.png" }, is_ground_content = true, groups = {cracky=1, level=2}, - sounds = stone_sounds, + sounds = sounds.node_sound_stone_defaults(), _mcl_hardness = 3, _mcl_blast_resistance = 3, _mcl_silk_touch_drop = true, @@ -203,13 +203,13 @@ minetest.register_node(":technic:stainless_steel_block", { }) if minetest.get_modpath("default") then -minetest.register_craft({ - output = 'technic:granite_bricks 4', - recipe = { - {granite_ingrediant,granite_ingrediant}, - {granite_ingrediant,granite_ingrediant} - } -}) + minetest.register_craft({ + output = 'technic:granite_bricks 4', + recipe = { + {granite_ingredient,granite_ingredient}, + {granite_ingredient,granite_ingredient} + } + }) end minetest.register_craft({ @@ -236,35 +236,34 @@ local function for_each_registered_node(action) end if minetest.get_modpath("default") then - -for_each_registered_node(function(node_name, node_def) - if node_name ~= "default:steelblock" and - node_name:find("steelblock", 1, true) and - node_def.description:find("Steel", 1, true) then - minetest.override_item(node_name, { - 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 + for_each_registered_node(function(node_name, node_def) + if node_name ~= "default:steelblock" and + node_name:find("steelblock", 1, true) and + node_def.description:find("Steel", 1, true) then 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 + 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 \ No newline at end of file diff --git a/technic_worldgen/rubber.lua b/technic_worldgen/rubber.lua index aaea86a..fea1346 100644 --- a/technic_worldgen/rubber.lua +++ b/technic_worldgen/rubber.lua @@ -11,7 +11,7 @@ minetest.register_node(":moretrees:rubber_tree_sapling", { paramtype = "light", walkable = false, groups = {dig_immediate=3, flammable=2, sapling=1}, - sounds = node_sounds, + sounds = sounds.node_sound_defaults(), }) minetest.register_craft({ @@ -26,7 +26,7 @@ minetest.register_node(":moretrees:rubber_tree_trunk", { "technic_rubber_tree_full.png"}, groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2}, - sounds = wood_sounds, + sounds = sounds.node_sound_wood_defaults(), }) minetest.register_node(":moretrees:rubber_tree_trunk_empty", { @@ -35,7 +35,7 @@ minetest.register_node(":moretrees:rubber_tree_trunk_empty", { "technic_rubber_tree_empty.png"}, groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1}, - sounds = wood_sounds, + sounds = sounds.node_sound_wood_defaults(), }) minetest.register_node(":moretrees:rubber_tree_leaves", { @@ -55,7 +55,7 @@ minetest.register_node(":moretrees:rubber_tree_leaves", { } } }, - sounds = leaves_sounds, + sounds = sounds.node_sound_leaves_defaults() }) technic.rubber_tree_model={ diff --git a/wrench/init.lua b/wrench/init.lua index 7696df5..d71ab2a 100644 --- a/wrench/init.lua +++ b/wrench/init.lua @@ -13,6 +13,11 @@ available to survival-mode players. 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 = {} local modpath = minetest.get_modpath(minetest.get_current_modname()) diff --git a/wrench/mod.conf b/wrench/mod.conf index b292c49..d12fe53 100644 --- a/wrench/mod.conf +++ b/wrench/mod.conf @@ -1,3 +1,3 @@ name = wrench optional_depends = technic, technic_chests, technic_worldgen, intllib, default, mcl_core -supported_games = minetest_game,mineclone2 \ No newline at end of file +supported_games = minetest_game,mineclone2,mineclonia,mineclone5 \ No newline at end of file diff --git a/wrench/support.lua b/wrench/support.lua index 80df230..9be4c3e 100644 --- a/wrench/support.lua +++ b/wrench/support.lua @@ -23,7 +23,7 @@ local STRING, FLOAT = wrench.META_TYPE_FLOAT wrench.registered_nodes = { - [chest_ingrediant] = { + [chest_ingredient] = { lists = {"main"}, }, ["default:chest_locked"] = {