123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- if dlxtrains.crafting_enabled() then
- if dlxtrains.get_config_wagon_crafting_recipe_complexity() == 0 then
- if dlxtrains_industrial_wagons.max_wagon_length >= 8.5 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:container_type1",
- recipe = {
- {"", dlxtrains.materials.steel_ingot, ""},
- {dlxtrains.materials.chest, dlxtrains.materials.steel_ingot, dlxtrains.materials.chest},
- {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:container_type2",
- recipe = {
- {"", dlxtrains.materials.tin_ingot, ""},
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:covered_goods_type1",
- recipe = {
- {dlxtrains.materials.wood, dlxtrains.materials.steel_ingot, dlxtrains.materials.wood},
- {dlxtrains.materials.wood, "", dlxtrains.materials.wood},
- {"dlxtrains:blueprint", "dlxtrains_industrial_wagons:flat_type1", dlxtrains.materials.steel_ingot},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:covered_goods_type2",
- recipe = {
- {dlxtrains.materials.tin_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.tin_ingot},
- {dlxtrains.materials.tin_ingot, "", dlxtrains.materials.tin_ingot},
- {"dlxtrains:blueprint", "dlxtrains_industrial_wagons:flat_type1", dlxtrains.materials.steel_ingot},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 7 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:covered_goods_type3",
- recipe = {
- {dlxtrains.materials.wood, dlxtrains.materials.steel_ingot, dlxtrains.materials.wood},
- {dlxtrains.materials.tin_ingot, "", dlxtrains.materials.tin_ingot},
- {"", "dlxtrains_industrial_wagons:flat_type1", ""},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:flat_type1",
- recipe = {
- {dlxtrains.materials.wood, dlxtrains.materials.wood, dlxtrains.materials.wood},
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:flat_type2",
- recipe = {
- {dlxtrains.materials.wood, dlxtrains.materials.wood, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:hopper_type1",
- recipe = {
- {dlxtrains.materials.steelblock, "", dlxtrains.materials.steelblock},
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:hopper_type2",
- recipe = {
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
- {"", "dlxtrains_industrial_wagons:hopper_type1", ""},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:livestock_type1",
- recipe = {
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.wood, "", dlxtrains.materials.wood},
- {"", "dlxtrains_industrial_wagons:flat_type2", ""},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:open_type1",
- recipe = {
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.wood, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:stake_type1",
- recipe = {
- {dlxtrains.materials.steel_ingot, "", dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.steel_ingot, "", dlxtrains.materials.steel_ingot},
- {"", "dlxtrains_industrial_wagons:flat_type1", ""},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:tank_type1",
- recipe = {
- {dlxtrains.materials.wood, dlxtrains.materials.bucket_empty, dlxtrains.materials.ladder_steel},
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:tank_type2",
- recipe = {
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.bucket_empty, dlxtrains.materials.ladder_steel},
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
- {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:transition_type1",
- recipe = {
- {"dlxtrains:blueprint", "dlxtrains_industrial_wagons:flat_type1", dlxtrains.materials.steel_ingot},
- }
- })
- end
- elseif dlxtrains.get_config_wagon_crafting_recipe_complexity() == 1 then
- if dlxtrains_industrial_wagons.max_wagon_length >= 8.5 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:container_type1",
- recipe = {
- {"", "dlxtrains_industrial_wagons:container_body_type1", ""},
- {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
- {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:container_type2",
- recipe = {
- {"", "dlxtrains_industrial_wagons:container_body_type2", ""},
- {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
- {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:covered_goods_type1",
- recipe = {
- {"", "dlxtrains_industrial_wagons:covered_goods_body_type1", ""},
- {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
- {"dlxtrains:bogie", "", "dlxtrains:bogie"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:covered_goods_type2",
- recipe = {
- {"", "dlxtrains_industrial_wagons:covered_goods_body_type2", ""},
- {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
- {"dlxtrains:bogie", "", "dlxtrains:bogie"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 7 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:covered_goods_type3",
- recipe = {
- {"", "dlxtrains_industrial_wagons:covered_goods_body_type3", ""},
- {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
- {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:flat_type1",
- recipe = {
- {"", "dlxtrains_industrial_wagons:flat_body_type1", ""},
- {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
- {"dlxtrains:bogie", "", "dlxtrains:bogie"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:flat_type2",
- recipe = {
- {"", "dlxtrains_industrial_wagons:flat_body_type1", dlxtrains.materials.steel_ingot},
- {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
- {"dlxtrains:bogie", "", "dlxtrains:bogie"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:hopper_type1",
- recipe = {
- {"", "dlxtrains_industrial_wagons:hopper_body_type1", ""},
- {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
- {"dlxtrains:bogie", "", "dlxtrains:bogie"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:hopper_type2",
- recipe = {
- {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
- {"", "dlxtrains_industrial_wagons:hopper_type1", ""},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:livestock_type1",
- recipe = {
- {"", "dlxtrains_industrial_wagons:livestock_body_type1", ""},
- {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
- {"dlxtrains:bogie", "", "dlxtrains:bogie"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:open_type1",
- recipe = {
- {"", "dlxtrains_industrial_wagons:open_body_type1", ""},
- {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
- {"dlxtrains:bogie", "", "dlxtrains:bogie"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:stake_type1",
- recipe = {
- {"", "dlxtrains_industrial_wagons:stake_body_type1", ""},
- {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
- {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:tank_type1",
- recipe = {
- {"dlxtrains_industrial_wagons:brakemans_cabin", "dlxtrains_industrial_wagons:small_tank", dlxtrains.materials.ladder_steel},
- {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
- {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:tank_type2",
- recipe = {
- {dlxtrains.materials.steel_ingot, "dlxtrains_industrial_wagons:small_tank", dlxtrains.materials.ladder_steel},
- {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
- {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
- }
- })
- end
- if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
- minetest.register_craft({
- output = "dlxtrains_industrial_wagons:transition_type1",
- recipe = {
- {"", "dlxtrains_industrial_wagons:flat_body_type1", ""},
- {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
- {"dlxtrains:bogie", "", "dlxtrains:bogie"},
- }
- })
- end
- end
- end
|