diff options
author | Maverick2797 <git.maverick2797@gmail.com> | 2021-02-24 20:16:55 +0800 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-03-06 21:00:35 +0100 |
commit | e38f215faa95ad7fc2fb8c473f830aa689c468d2 (patch) | |
tree | 75808b3e1b823119930e9965e7e2118e243714fd /advtrains_interlocking | |
parent | 6135f8a23b4f507870dab481f4db466e6be0ac7d (diff) | |
download | advtrains-e38f215faa95ad7fc2fb8c473f830aa689c468d2.tar.gz advtrains-e38f215faa95ad7fc2fb8c473f830aa689c468d2.tar.bz2 advtrains-e38f215faa95ad7fc2fb8c473f830aa689c468d2.zip |
Added alternative recipes, falling back on the default: items as they seem to be in the rest of the mod.
May need rebalancing though.
Diffstat (limited to 'advtrains_interlocking')
-rwxr-xr-x[-rw-r--r--] | advtrains_interlocking/tcb_ts_ui.lua | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua index 38d4453..34fbf7f 100644..100755 --- a/advtrains_interlocking/tcb_ts_ui.lua +++ b/advtrains_interlocking/tcb_ts_ui.lua @@ -120,13 +120,41 @@ minetest.register_node("advtrains_interlocking:tcb_node", { -- Crafting + +-- set some fallbacks +local tcb_core = "default:mese_crystal" +local tcb_secondary = "default:mese_crystal_fragment" + +--alternative recipe items +--core +if minetest.get_modpath("basic_materials") then + tcb_core = "basic_materials:ic" +elseif minetest.get_modpath("technic") then + tcb_core = "technic:control_logic_unit" +end +--print("TCB Core: "..tcb_core) +--secondary +if minetest.get_modpath("mesecons") then + tcb_secondary = 'mesecons:wire_00000000_off' +end +--print("TCB Secondary: "..tcb_secondary) + minetest.register_craft({ output = 'advtrains_interlocking:tcb_node 4', recipe = { - {'mesecons:wire_00000000_off', 'basic_materials:ic', 'mesecons:wire_00000000_off'}, + {tcb_secondary,tcb_core,tcb_secondary}, + {'advtrains:dtrack_placer','','advtrains:dtrack_placer'} }, + --actually use track in the tcb recipe + replacements = { + {"advtrains:dtrack_placer","advtrains:dtrack_placer"}, + {"advtrains:dtrack_placer","advtrains:dtrack_placer"}, + } }) +--nil the temp crafting variables +tcb_core= nil +tcb_secondary = nil minetest.register_on_punchnode(function(pos, node, player, pointed_thing) local pname = player:get_player_name() |