acfd58cdeb
As part of making vertical travel easier to reduce reliance on sneak ladders. Calculate using cubic pixels of steel. A steelblock is 16^3 = 4096 cubic pixels steel. 6 ingots is 6/9 steelblocks. A rail is a 2*2*16 pixel length of steel, 64 cubic pixels steel. 6 ingots produces 2*21 rails = 21 rail nodes. Choose 18 for an even number that is a multiple of ingot number. Replace the stick with 2 wood in the recipe to be closer to the amount of wood that would be needed for 20*4 sleepers. Replace 2 mese crystal fragments with 1 mese crystal to compensate for the larger number of nodes returned. The result is the recipe is much more generous with steel usage but slightly less generous with mese usage, keeping power rail cost reasonably high. Replace 2 coal lumps with 1 for a similar recipe to power rails.
60 lines
1.7 KiB
Lua
60 lines
1.7 KiB
Lua
carts:register_rail("carts:rail", {
|
|
description = "Rail",
|
|
tiles = {
|
|
"carts_rail_straight.png", "carts_rail_curved.png",
|
|
"carts_rail_t_junction.png", "carts_rail_crossing.png"
|
|
},
|
|
inventory_image = "carts_rail_straight.png",
|
|
wield_image = "carts_rail_straight.png",
|
|
groups = carts:get_rail_groups(),
|
|
}, {})
|
|
|
|
minetest.register_craft({
|
|
output = "carts:rail 18",
|
|
recipe = {
|
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
|
{"default:steel_ingot", "", "default:steel_ingot"},
|
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
|
}
|
|
})
|
|
|
|
minetest.register_alias("default:rail", "carts:rail")
|
|
|
|
|
|
carts:register_rail("carts:powerrail", {
|
|
description = "Powered rail",
|
|
tiles = {
|
|
"carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
|
|
"carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
|
|
},
|
|
groups = carts:get_rail_groups(),
|
|
}, {acceleration = 5})
|
|
|
|
minetest.register_craft({
|
|
output = "carts:powerrail 18",
|
|
recipe = {
|
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
|
{"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"},
|
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
|
}
|
|
})
|
|
|
|
|
|
carts:register_rail("carts:brakerail", {
|
|
description = "Brake rail",
|
|
tiles = {
|
|
"carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
|
|
"carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"
|
|
},
|
|
groups = carts:get_rail_groups(),
|
|
}, {acceleration = -3})
|
|
|
|
minetest.register_craft({
|
|
output = "carts:brakerail 18",
|
|
recipe = {
|
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
|
{"default:steel_ingot", "default:coal_lump", "default:steel_ingot"},
|
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
|
}
|
|
})
|