Added alternative recipes, falling back on the default: items as they seem to be in the rest of the mod.
May need rebalancing though.
This commit is contained in:
parent
6135f8a23b
commit
e38f215faa
30
advtrains_interlocking/tcb_ts_ui.lua
Normal file → Executable file
30
advtrains_interlocking/tcb_ts_ui.lua
Normal file → Executable file
@ -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()
|
||||
|
9
advtrains_signals_ks/init.lua
Normal file → Executable file
9
advtrains_signals_ks/init.lua
Normal file → Executable file
@ -270,11 +270,18 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
local sign_material = "default:sign_wall_steel" --fallback
|
||||
if minetest.get_modpath("basic_materials") then
|
||||
sign_material = "basic_materials:plastic_sheet"
|
||||
end
|
||||
--print("Sign Material: "..sign_material)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "advtrains_signals_ks:sign_8_0 2",
|
||||
recipe = {
|
||||
{'basic_materials:plastic_sheet', 'dye:black'},
|
||||
{sign_material, 'dye:black'},
|
||||
{'default:stick', ''},
|
||||
{'default:stick', ''},
|
||||
},
|
||||
})
|
||||
sign_material = nil
|
||||
|
14
advtrains_train_track/init.lua
Normal file → Executable file
14
advtrains_train_track/init.lua
Normal file → Executable file
@ -298,15 +298,27 @@ advtrains.register_tracks("default", {
|
||||
end
|
||||
}, advtrains.trackpresets.t_30deg_straightonly)
|
||||
|
||||
-- mod-dependent crafts
|
||||
local loader_core = "default:mese_crystal" --fallback
|
||||
if minetest.get_modpath("basic_materials") then
|
||||
loader_core = "basic_materials:ic"
|
||||
elseif minetest.get_modpath("technic") then
|
||||
loader_core = "technic:control_logic_unit"
|
||||
end
|
||||
--print("Loader Core: "..loader_core)
|
||||
|
||||
minetest.register_craft({
|
||||
type="shapeless",
|
||||
output = 'advtrains:dtrack_load_placer',
|
||||
recipe = {
|
||||
"advtrains:dtrack_placer",
|
||||
"basic_materials:ic",
|
||||
loader_core,
|
||||
"default:chest"
|
||||
},
|
||||
})
|
||||
loader_core = nil --nil the crafting variable
|
||||
|
||||
--craft between load/unload tracks
|
||||
minetest.register_craft({
|
||||
type="shapeless",
|
||||
output = 'advtrains:dtrack_unload_placer',
|
||||
|
Loading…
x
Reference in New Issue
Block a user