mckaygerhard
2f97407591
* beds7b6fae96d5
* boats3832de08f7
* bucket1d9f32295a
* cartsdcbca916cf
* creativeca09e77370
* doorsa89ab0454d
* farming10de84d12d
* fire4e5f7ad553
* stairsc3a5af6c45
* tnt8195861f90
* woolde642a08e8
71 lines
2.1 KiB
Lua
71 lines
2.1 KiB
Lua
-- carts/rails.lua
|
|
|
|
-- support for MT game translation.
|
|
local S = carts.get_translator
|
|
|
|
carts:register_rail("carts:rail", {
|
|
description = S("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 = S("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 = S("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"},
|
|
}
|
|
})
|
|
|
|
-- add alias for boost_cart rails
|
|
minetest.register_alias("carts:copperrail", "default:rail")
|
|
minetest.register_alias("boost_cart:copperrail", "default:rail")
|
|
minetest.register_alias("boost_cart:powerrail", "carts:powerrail")
|
|
minetest.register_alias("boost_cart:brakerail", "carts:brakerail")
|