diff --git a/.luacheckrc b/.luacheckrc index 8f13b09..78b2c17 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,7 +1,7 @@ globals = { - "minetest", "basic_materials", + "minetest", "basic_materials", "bm", } read_globals = { - "default", -} \ No newline at end of file + "default", "bm", "ks_sounds","mcl_sounds","nodes_nature","fl_topsoil","fl_stone","fl_trees", +} diff --git a/crafts.lua b/crafts.lua index f486936..f85b1ca 100644 --- a/crafts.lua +++ b/crafts.lua @@ -106,18 +106,18 @@ minetest.register_craft({ minetest.register_craft({ output = "basic_materials:concrete_block 6", recipe = { - {"group:sand", "basic_materials:wet_cement", gameconfig_gravel}, + {"group:sand", "basic_materials:wet_cement", bm.gameconfig_gravel}, {"basic_materials:steel_bar", "basic_materials:wet_cement", "basic_materials:steel_bar"}, - {gameconfig_gravel, "basic_materials:wet_cement", "group:sand"}, + {bm.gameconfig_gravel, "basic_materials:wet_cement", "group:sand"}, } }) minetest.register_craft( { output = "basic_materials:motor 2", recipe = { - { gameconfig_mese_crystal_fragment, "basic_materials:copper_wire", "basic_materials:plastic_sheet" }, - { gameconfig_copper_ingot, gameconfig_steel_ingot, gameconfig_steel_ingot }, - { gameconfig_mese_crystal_fragment, "basic_materials:copper_wire", "basic_materials:plastic_sheet" } + { bm.gameconfig_mese_crystal_fragment, "basic_materials:copper_wire", "basic_materials:plastic_sheet" }, + { bm.gameconfig_copper_ingot, bm.gameconfig_steel_ingot, bm.gameconfig_steel_ingot }, + { bm.gameconfig_mese_crystal_fragment, "basic_materials:copper_wire", "basic_materials:plastic_sheet" } }, replacements = { { "basic_materials:copper_wire", "basic_materials:empty_spool" }, @@ -128,7 +128,7 @@ minetest.register_craft({ minetest.register_craft( { output = "basic_materials:heating_element 2", recipe = { - { gameconfig_copper_ingot, gameconfig_mese_crystal_fragment, gameconfig_copper_ingot } + { bm.gameconfig_copper_ingot, bm.gameconfig_mese_crystal_fragment, bm.gameconfig_copper_ingot } }, }) @@ -136,8 +136,8 @@ minetest.register_craft({ --type = "shapeless", output = "basic_materials:energy_crystal_simple 2", recipe = { - { gameconfig_mese_crystal_fragment, gameconfig_torch, gameconfig_mese_crystal_fragment }, - { gameconfig_diamond, gameconfig_gold_ingot, gameconfig_diamond } + { bm.gameconfig_mese_crystal_fragment, bm.gameconfig_torch, bm.gameconfig_mese_crystal_fragment }, + { bm.gameconfig_diamond, bm.gameconfig_gold_ingot, bm.gameconfig_diamond } }, }) @@ -145,7 +145,7 @@ minetest.register_craft({ output = "basic_materials:copper_wire 2", type = "shapeless", recipe = { - gameconfig_copper_ingot, + bm.gameconfig_copper_ingot, "basic_materials:empty_spool", "basic_materials:empty_spool", }, @@ -155,7 +155,7 @@ minetest.register_craft({ output = "basic_materials:gold_wire 2", type = "shapeless", recipe = { - gameconfig_gold_ingot, + bm.gameconfig_gold_ingot, "basic_materials:empty_spool", "basic_materials:empty_spool", }, @@ -165,7 +165,7 @@ minetest.register_craft({ output = "basic_materials:steel_wire 2", type = "shapeless", recipe = { - gameconfig_steel_ingot, + bm.gameconfig_steel_ingot, "basic_materials:empty_spool", "basic_materials:empty_spool", }, @@ -174,25 +174,25 @@ minetest.register_craft({ minetest.register_craft( { output = "basic_materials:steel_strip 12", recipe = { - { "", gameconfig_steel_ingot, "" }, - { gameconfig_steel_ingot, "", "" }, + { "", bm.gameconfig_steel_ingot, "" }, + { bm.gameconfig_steel_ingot, "", "" }, }, }) minetest.register_craft( { output = "basic_materials:copper_strip 12", recipe = { - { "", gameconfig_copper_ingot, "" }, - { gameconfig_copper_ingot, "", "" }, + { "", bm.gameconfig_copper_ingot, "" }, + { bm.gameconfig_copper_ingot, "", "" }, }, }) minetest.register_craft( { output = "basic_materials:steel_bar 6", recipe = { - { "", "", gameconfig_steel_ingot }, - { "", gameconfig_steel_ingot, "" }, - { gameconfig_steel_ingot, "", "" }, + { "", "", bm.gameconfig_steel_ingot }, + { "", bm.gameconfig_steel_ingot, "" }, + { bm.gameconfig_steel_ingot, "", "" }, }, }) @@ -200,26 +200,26 @@ minetest.register_craft({ output = "basic_materials:padlock 2", recipe = { { "basic_materials:steel_bar" }, - { gameconfig_steel_ingot }, - { gameconfig_steel_ingot }, + { bm.gameconfig_steel_ingot }, + { bm.gameconfig_steel_ingot }, }, }) minetest.register_craft({ output = "basic_materials:chainlink_steel 12", recipe = { - {"", gameconfig_steel_ingot, gameconfig_steel_ingot}, - { gameconfig_steel_ingot, "", gameconfig_steel_ingot }, - { gameconfig_steel_ingot, gameconfig_steel_ingot, "" }, + {"", bm.gameconfig_steel_ingot, bm.gameconfig_steel_ingot}, + { bm.gameconfig_steel_ingot, "", bm.gameconfig_steel_ingot }, + { bm.gameconfig_steel_ingot, bm.gameconfig_steel_ingot, "" }, }, }) minetest.register_craft( { output = "basic_materials:gear_steel 6", recipe = { - { "", gameconfig_steel_ingot, "" }, - { gameconfig_steel_ingot,"basic_materials:chainlink_steel", gameconfig_steel_ingot }, - { "", gameconfig_steel_ingot, "" } + { "", bm.gameconfig_steel_ingot, "" }, + { bm.gameconfig_steel_ingot,"basic_materials:chainlink_steel", bm.gameconfig_steel_ingot }, + { "", bm.gameconfig_steel_ingot, "" } }, }) @@ -228,11 +228,11 @@ minetest.register_craft({ type = "shapeless", output = "basic_materials:terracotta_base 8", recipe = { - gameconfig_water_bucket, - gameconfig_clay_lump, - gameconfig_gravel, + bm.gameconfig_water_bucket, + bm.gameconfig_clay_lump, + bm.gameconfig_gravel, }, - replacements = { {gameconfig_water_bucket, gameconfig_empty_bucket}, }, + replacements = { {bm.gameconfig_water_bucket, bm.gameconfig_empty_bucket}, }, }) @@ -240,21 +240,21 @@ minetest.register_craft({ type = "shapeless", output = "basic_materials:wet_cement 3", recipe = { - gameconfig_dirt, - gameconfig_dye_dark_grey, - gameconfig_dye_dark_grey, - gameconfig_dye_dark_grey, - gameconfig_water_bucket + bm.gameconfig_dirt, + bm.gameconfig_dye_dark_grey, + bm.gameconfig_dye_dark_grey, + bm.gameconfig_dye_dark_grey, + bm.gameconfig_water_bucket }, - replacements = {{gameconfig_water_bucket, gameconfig_empty_bucket},}, + replacements = {{bm.gameconfig_water_bucket, bm.gameconfig_empty_bucket},}, }) minetest.register_craft( { output = "basic_materials:silicon 4", recipe = { - { gameconfig_sand, gameconfig_sand }, - { gameconfig_sand, gameconfig_steel_ingot }, + { bm.gameconfig_sand, bm.gameconfig_sand }, + { bm.gameconfig_sand, bm.gameconfig_steel_ingot }, }, }) @@ -262,7 +262,7 @@ minetest.register_craft({ output = "basic_materials:ic 4", recipe = { { "basic_materials:silicon", "basic_materials:silicon" }, - { "basic_materials:silicon", gameconfig_copper_ingot }, + { "basic_materials:silicon", bm.gameconfig_copper_ingot }, }, }) @@ -272,9 +272,9 @@ minetest.register_craft({ minetest.register_craft( { output = "basic_materials:brass_ingot 9", recipe = { - {gameconfig_copper_ingot, gameconfig_tin_ingot, gameconfig_copper_ingot}, - {gameconfig_gold_ingot, gameconfig_copper_ingot, gameconfig_gold_ingot}, - {gameconfig_copper_ingot, gameconfig_tin_ingot, gameconfig_copper_ingot}, + {bm.gameconfig_copper_ingot, bm.gameconfig_tin_ingot, bm.gameconfig_copper_ingot}, + {bm.gameconfig_gold_ingot, bm.gameconfig_copper_ingot, bm.gameconfig_gold_ingot}, + {bm.gameconfig_copper_ingot, bm.gameconfig_tin_ingot, bm.gameconfig_copper_ingot}, }, }) @@ -282,7 +282,7 @@ minetest.register_craft({ output = "basic_materials:silver_wire 2", type = "shapeless", recipe = { - gameconfig_silver_ingot, + bm.gameconfig_silver_ingot, "basic_materials:empty_spool", "basic_materials:empty_spool", }, @@ -292,10 +292,11 @@ minetest.register_craft({ type = "shapeless", output = "basic_materials:brass_ingot 3", recipe = { - gameconfig_copper_ingot, - gameconfig_copper_ingot, + bm.gameconfig_copper_ingot, + bm.gameconfig_copper_ingot, "moreores:silver_ingot", }, }) end + diff --git a/gameconfig.lua b/gameconfig.lua index 1f078f0..50d37d0 100644 --- a/gameconfig.lua +++ b/gameconfig.lua @@ -1,67 +1,46 @@ -- Craft ingredients +bm = {} -- MineClone2 support local mod_mcl_core = minetest.get_modpath("mcl_core") ~= nil if mod_mcl_core then - gameconfig_dirt = "mcl_core:dirt" - gameconfig_sand = "mcl_core:sand" - gameconfig_gravel = "mcl_core:gravel" - gameconfig_steel_ingot = "mcl_core:iron_ingot" - gameconfig_gold_ingot = "mcl_core:gold_ingot" - gameconfig_mese_crystal_fragment = "mesecons:redstone" - gameconfig_torch = "mcl_torches:torch" - gameconfig_diamond = "mcl_core:diamond" - gameconfig_clay_lump = "mcl_core:clay_lump" - gameconfig_water_bucket = "mcl_buckets:bucket_water" - gameconfig_empty_bucket = "mcl_buckets:bucket_empty" - gameconfig_dye_dark_grey = "mcl_dye:dark_grey" + bm.gameconfig_dirt = "mcl_core:dirt" + bm.gameconfig_sand = "mcl_core:sand" + bm.gameconfig_gravel = "mcl_core:gravel" + bm.gameconfig_steel_ingot = "mcl_core:iron_ingot" + bm.gameconfig_gold_ingot = "mcl_core:gold_ingot" + bm.gameconfig_mese_crystal_fragment = "mesecons:redstone" + bm.gameconfig_torch = "mcl_torches:torch" + bm.gameconfig_diamond = "mcl_core:diamond" + bm.gameconfig_clay_lump = "mcl_core:clay_lump" + bm.gameconfig_water_bucket = "mcl_buckets:bucket_water" + bm.gameconfig_empty_bucket = "mcl_buckets:bucket_empty" + bm.gameconfig_dye_dark_grey = "mcl_dye:dark_grey" -- No current equivalent so default to iron ingot instead. - gameconfig_copper_ingot = "mcl_core:iron_ingot" - gameconfig_tin_ingot = "mcl_core:iron_ingot" - gameconfig_silver_ingot = "mcl_core:iron_ingot" ---[[ -elseif - gameconfig_dirt = - gameconfig_sand = - gameconfig_gravel = - gameconfig_copper_ingot = - gameconfig_steel_ingot = - gameconfig_silver_ingot = - gameconfig_gold_ingot = - gameconfig_tin_ingot = - gameconfig_mese_crystal_fragment = - gameconfig_torch = - gameconfig_diamond = - gameconfig_clay_lump = - gameconfig_water_bucket = - gameconfig_empty_bucket = - gameconfig_dye_dark_grey = ---]] + bm.gameconfig_copper_ingot = "mcl_core:iron_ingot" + bm.gameconfig_tin_ingot = "mcl_core:iron_ingot" + bm.gameconfig_silver_ingot = "mcl_core:iron_ingot" else --fallback to Minetest Game's items. - gameconfig_dirt = "default:dirt" - gameconfig_sand = "default:sand" - gameconfig_gravel = "default:gravel" - gameconfig_copper_ingot = "default:copper_ingot" - gameconfig_steel_ingot = "default:steel_ingot" - gameconfig_gold_ingot = "default:gold_ingot" - gameconfig_tin_ingot = "default:tin_ingot" - gameconfig_mese_crystal_fragment = "default:mese_crystal_fragment" - gameconfig_torch = "default:torch" - gameconfig_diamond = "default:diamond" - gameconfig_clay_lump = "default:clay_lump" - gameconfig_water_bucket = "bucket:bucket_water" - gameconfig_empty_bucket = "bucket:bucket_empty" - gameconfig_dye_dark_grey = "dye:dark_grey" + bm.gameconfig_dirt = "default:dirt" + bm.gameconfig_sand = "default:sand" + bm.gameconfig_gravel = "default:gravel" + bm.gameconfig_copper_ingot = "default:copper_ingot" + bm.gameconfig_steel_ingot = "default:steel_ingot" + bm.gameconfig_gold_ingot = "default:gold_ingot" + bm.gameconfig_tin_ingot = "default:tin_ingot" + bm.gameconfig_mese_crystal_fragment = "default:mese_crystal_fragment" + bm.gameconfig_torch = "default:torch" + bm.gameconfig_diamond = "default:diamond" + bm.gameconfig_clay_lump = "default:clay_lump" + bm.gameconfig_water_bucket = "bucket:bucket_water" + bm.gameconfig_empty_bucket = "bucket:bucket_empty" + bm.gameconfig_dye_dark_grey = "dye:dark_grey" -- No current equivalent so default to copper ingot instead. - gameconfig_silver_ingot = "default:copper_ingot" + bm.gameconfig_silver_ingot = "default:copper_ingot" end - - - - -- Sounds -- Integrate wsor4035's MIT licensed sound_api --[[