diff --git a/README.txt b/README.txt index b67ba19..4807105 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,6 @@ Minetest mod: boost_cart ======================= -Based on the mod "carts" by PilzAdam +Based on (and fully compatible with) the mod "carts" by PilzAdam Target: Run smoothly and do not use too much CPU License of source code: diff --git a/depends.txt b/depends.txt index 20aa884..bfb43df 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,3 @@ default -mesecons? \ No newline at end of file +mesecons? +moreores? \ No newline at end of file diff --git a/rails.lua b/rails.lua index 20a8cea..9f6a742 100644 --- a/rails.lua +++ b/rails.lua @@ -15,32 +15,36 @@ minetest.register_node(":default:rail", { groups = {dig_immediate = 2, attached_node = 1, rail = 1, connect_to_raillike = 1}, }) --- Copper rail -minetest.register_node(":carts:copperrail", { - description = "Copper rail", - drawtype = "raillike", - tiles = {"carts_rail_cp.png", "carts_rail_curved_cp.png", "carts_rail_t_junction_cp.png", "carts_rail_crossing_cp.png"}, - inventory_image = "carts_rail_cp.png", - wield_image = "carts_rail_cp.png", - paramtype = "light", - is_ground_content = true, - walkable = false, - selection_box = { - type = "fixed", - -- but how to specify the dimensions for curved and sideways rails? - fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, - }, - groups = {dig_immediate = 2, attached_node = 1, rail = 1, connect_to_raillike = 1}, -}) +if minetest.get_modpath("moreores") then + -- Moreores' copper rail + minetest.register_alias("carts:copperrail", "moreores:copper_rail") +else + minetest.register_node(":carts:copperrail", { + description = "Copper rail", + drawtype = "raillike", + tiles = {"carts_rail_cp.png", "carts_rail_curved_cp.png", "carts_rail_t_junction_cp.png", "carts_rail_crossing_cp.png"}, + inventory_image = "carts_rail_cp.png", + wield_image = "carts_rail_cp.png", + paramtype = "light", + is_ground_content = true, + walkable = false, + selection_box = { + type = "fixed", + -- but how to specify the dimensions for curved and sideways rails? + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + groups = {dig_immediate = 2, attached_node = 1, rail = 1, connect_to_raillike = 1}, + }) -minetest.register_craft({ - output = "carts:copperrail 12", - recipe = { - {"default:copper_ingot", "group:stick", "default:copper_ingot"}, - {"default:copper_ingot", "group:stick", "default:copper_ingot"}, - {"default:copper_ingot", "group:stick", "default:copper_ingot"}, - } -}) + minetest.register_craft({ + output = "carts:copperrail 12", + recipe = { + {"default:copper_ingot", "group:stick", "default:copper_ingot"}, + {"default:copper_ingot", "group:stick", "default:copper_ingot"}, + {"default:copper_ingot", "group:stick", "default:copper_ingot"}, + } + }) +end -- Speed up