mirror of
https://github.com/minetest-mods/technic.git
synced 2025-06-30 07:10:56 +02:00
Major refactor, put compat ingredients in namespace tables
This commit is contained in:
@ -19,9 +19,9 @@ if technic_cnc.use_technic then
|
||||
minetest.register_craft({
|
||||
output = 'technic:cnc',
|
||||
recipe = {
|
||||
{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'},
|
||||
{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:carbon_steel_ingot', 'technic:lv_cable', 'technic:carbon_steel_ingot'},
|
||||
},
|
||||
})
|
||||
|
||||
@ -34,9 +34,9 @@ else
|
||||
minetest.register_craft({
|
||||
output = 'technic:cnc',
|
||||
recipe = {
|
||||
{glass_ingredient, diamond_ingredient, glass_ingredient},
|
||||
{'basic_materials:ic', 'default:steelblock', 'basic_materials:motor'},
|
||||
{'default:steel_ingot', mese_block_ingredient, 'default:steel_ingot'},
|
||||
{technic_cnc.compat.glass_ingredient, technic_cnc.compat.diamond_ingredient, technic_cnc.compat.glass_ingredient},
|
||||
{'basic_materials:ic', 'default:steelblock', 'basic_materials:motor'},
|
||||
{'default:steel_ingot', technic_cnc.compat.mese_block_ingredient, 'default:steel_ingot'},
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -7,6 +7,14 @@ technic_cnc.technic_modpath = minetest.get_modpath("technic")
|
||||
technic_cnc.use_technic = technic_cnc.technic_modpath
|
||||
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
|
||||
technic_cnc.getter = intllib.Getter()
|
||||
else
|
||||
|
Reference in New Issue
Block a user