Major refactor, put compat ingredients in namespace tables

This commit is contained in:
James David Clarke
2023-12-27 17:11:42 +00:00
parent 26a8ab3dd0
commit 58df66b7bc
46 changed files with 276 additions and 309 deletions

View File

@ -4,9 +4,9 @@
minetest.register_craft({
output = 'technic:lv_alloy_furnace',
recipe = {
{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},
{technic.compat.brick_block_ingredient, technic.compat.brick_block_ingredient, technic.compat.brick_block_ingredient},
{technic.compat.brick_block_ingredient, 'technic:machine_casing', technic.compat.brick_block_ingredient},
{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({
output = 'technic:lv_cable 6',
recipe = {
{paper_ingredient, paper_ingredient, paper_ingredient},
{copper_ingredient, copper_ingredient, copper_ingredient},
{paper_ingredient, paper_ingredient, paper_ingredient},
{technic.compat.paper_ingredient, technic.compat.paper_ingredient, technic.compat.paper_ingredient},
{technic.compat.copper_ingredient, technic.compat.copper_ingredient, technic.compat.copper_ingredient},
{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({
output = 'technic:lv_compressor',
recipe = {
{stone_ingredient, 'basic_materials:motor', stone_ingredient},
{technic.compat.stone_ingredient, 'basic_materials:motor', technic.compat.stone_ingredient},
{'mesecons:piston', 'technic:machine_casing', 'mesecons:piston'},
{'basic_materials:silver_wire', 'technic:lv_cable', 'basic_materials:silver_wire'},
},

View File

@ -5,9 +5,9 @@
minetest.register_craft({
output = 'technic:electric_furnace',
recipe = {
{cobble_ingredient, cobble_ingredient, cobble_ingredient},
{cobble_ingredient, 'technic:machine_casing', cobble_ingredient},
{cobble_ingredient, 'technic:lv_cable', cobble_ingredient},
{technic.compat.cobble_ingredient, technic.compat.cobble_ingredient, technic.compat.cobble_ingredient},
{technic.compat.cobble_ingredient, 'technic:machine_casing', technic.compat.cobble_ingredient},
{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({
output = 'technic:lv_generator',
recipe = {
{stone_ingredient, furnace_ingredient, stone_ingredient},
{stone_ingredient, 'technic:machine_casing', stone_ingredient},
{stone_ingredient, 'technic:lv_cable', stone_ingredient},
{technic.compat.stone_ingredient, technic.compat.furnace_ingredient, technic.compat.stone_ingredient},
{technic.compat.stone_ingredient, 'technic:machine_casing', technic.compat.stone_ingredient},
{technic.compat.stone_ingredient, 'technic:lv_cable', technic.compat.stone_ingredient},
}
})

View File

@ -10,9 +10,9 @@ local S = technic.getter
minetest.register_craft({
output = 'technic:geothermal',
recipe = {
{granite_ingredient, diamond_ingredient, granite_ingredient},
{technic.compat.granite_ingredient, technic.compat.diamond_ingredient, technic.compat.granite_ingredient},
{'basic_materials:copper_wire', 'technic:machine_casing', 'basic_materials:copper_wire'},
{granite_ingredient, 'technic:lv_cable', granite_ingredient},
{technic.compat.granite_ingredient, 'technic:lv_cable', technic.compat.granite_ingredient},
},
replacements = {
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
@ -90,7 +90,7 @@ minetest.register_node("technic:geothermal", {
technic_machine=1, technic_lv=1},
paramtype2 = "facedir",
legacy_facedir_simple = true,
sounds = wood_sounds,
sounds = technic.compat.wood_sounds,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Geothermal %s Generator"):format("LV"))
@ -107,7 +107,7 @@ minetest.register_node("technic:geothermal_active", {
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, not_in_creative_inventory=1},
legacy_facedir_simple = true,
sounds = wood_sounds,
sounds = technic.compat.wood_sounds,
drop = "technic:geothermal",
technic_run = run,
})

View File

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

View File

@ -149,7 +149,7 @@ technic.register_machine("LV", "technic:lv_lamp_active", technic.receiver)
minetest.register_craft({
output = "technic:lv_lamp",
recipe = {
{glass_ingredient, glass_ingredient, glass_ingredient},
{technic.compat.glass_ingredient, technic.compat.glass_ingredient, technic.compat.glass_ingredient},
{"technic:lv_led", "technic:lv_led", "technic:lv_led"},
{"mesecons_materials:glue", "technic:lv_cable", "mesecons_materials:glue"},
}

View File

@ -7,9 +7,9 @@ minetest.register_alias("music_player", "technic:music_player")
minetest.register_craft({
output = 'technic:music_player',
recipe = {
{'technic:chromium_ingot', diamond_ingredient, 'technic:chromium_ingot'},
{diamond_ingredient, 'technic:machine_casing', diamond_ingredient},
{mossy_cobble_ingredient, 'technic:lv_cable', mossy_cobble_ingredient},
{'technic:chromium_ingot', technic.compat.diamond_ingredient, 'technic:chromium_ingot'},
{technic.compat.diamond_ingredient, 'technic:machine_casing', technic.compat.diamond_ingredient},
{technic.compat.mossy_cobble_ingredient, 'technic:lv_cable', technic.compat.mossy_cobble_ingredient},
}
})
@ -96,7 +96,7 @@ minetest.register_node("technic:music_player", {
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1},
connect_sides = {"bottom"},
sounds = wood_sounds,
sounds = technic.compat.wood_sounds,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("%s Music Player"):format("LV"))

View File

@ -50,7 +50,7 @@ minetest.register_node("technic:solar_panel", {
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1},
connect_sides = {"bottom"},
sounds = wood_sounds,
sounds = technic.compat.wood_sounds,
description = S("Small Solar %s Generator"):format("LV"),
active = false,
drawtype = "nodebox",

View File

@ -11,7 +11,7 @@ minetest.register_alias("water_mill", "technic:water_mill")
minetest.register_craft({
output = 'technic:water_mill',
recipe = {
{'technic:marble', diamond_ingredient, 'technic:marble'},
{'technic:marble', technic.compat.diamond_ingredient, 'technic:marble'},
{'group:wood', 'technic:machine_casing', 'group:wood'},
{'technic:marble', 'technic:lv_cable', 'technic:marble'},
}
@ -80,7 +80,7 @@ minetest.register_node("technic:water_mill", {
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1},
legacy_facedir_simple = true,
sounds = wood_sounds,
sounds = technic.compat.wood_sounds,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Hydro %s Generator"):format("LV"))
@ -98,7 +98,7 @@ minetest.register_node("technic:water_mill_active", {
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1, not_in_creative_inventory=1},
legacy_facedir_simple = true,
sounds = wood_sounds,
sounds = technic.compat.wood_sounds,
drop = "technic:water_mill",
technic_run = run,
technic_disabled_machine_name = "technic:water_mill",