summaryrefslogtreecommitdiff
path: root/boost_cart
diff options
context:
space:
mode:
Diffstat (limited to 'boost_cart')
-rw-r--r--boost_cart/cart_entity.lua2
-rw-r--r--boost_cart/init.lua1
-rw-r--r--boost_cart/mod.conf1
-rw-r--r--boost_cart/rails.lua10
4 files changed, 12 insertions, 2 deletions
diff --git a/boost_cart/cart_entity.lua b/boost_cart/cart_entity.lua
index 1633758..4147c09 100644
--- a/boost_cart/cart_entity.lua
+++ b/boost_cart/cart_entity.lua
@@ -231,7 +231,7 @@ function cart_entity:on_step(dtime)
local acc = nil
local acc_meta = minetest.get_meta(pos):get_string("cart_acceleration")
- if acc_meta == "halt" then
+ if acc_meta == "halt" and not self.punched then
-- Stop rail
vel = {x=0, y=0, z=0}
acc = false
diff --git a/boost_cart/init.lua b/boost_cart/init.lua
index 7dd5c44..bfae5d9 100644
--- a/boost_cart/init.lua
+++ b/boost_cart/init.lua
@@ -9,6 +9,7 @@ boost_cart.punch_speed_max = 7
if not boost_cart.modpath then
+ -- For Minetest 0.4.12 and older that don't look at the "mod.conf" file
error("\nWrong mod directory name! Please change it to 'boost_cart'.\n" ..
"See also: http://dev.minetest.net/Installing_Mods")
end
diff --git a/boost_cart/mod.conf b/boost_cart/mod.conf
new file mode 100644
index 0000000..7da19df
--- /dev/null
+++ b/boost_cart/mod.conf
@@ -0,0 +1 @@
+name = boost_cart \ No newline at end of file
diff --git a/boost_cart/rails.lua b/boost_cart/rails.lua
index c2a58cd..a03961b 100644
--- a/boost_cart/rails.lua
+++ b/boost_cart/rails.lua
@@ -1,4 +1,12 @@
-boost_cart:register_rail(":default:rail", {
+-- Common rail registrations
+
+local regular_rail_itemname = "default:rail"
+if minetest.registered_nodes["carts:rail"] then
+ -- MTG Compatibility
+ regular_rail_itemname = "carts:rail"
+end
+
+boost_cart:register_rail(":"..regular_rail_itemname, {
description = "Rail",
tiles = {
"carts_rail_straight.png", "carts_rail_curved.png",