summaryrefslogtreecommitdiff
path: root/boost_cart
diff options
context:
space:
mode:
Diffstat (limited to 'boost_cart')
-rw-r--r--boost_cart/README.txt23
-rw-r--r--boost_cart/functions.lua4
-rw-r--r--boost_cart/init.lua7
3 files changed, 23 insertions, 11 deletions
diff --git a/boost_cart/README.txt b/boost_cart/README.txt
index 9442926..994a6ef 100644
--- a/boost_cart/README.txt
+++ b/boost_cart/README.txt
@@ -1,8 +1,8 @@
Minetest mod: boost_cart
==========================
Based on (and fully compatible with) the mod "carts" by PilzAdam
-Also compatible with the carts mod in the subgame "minetest_game".
-Target: Run smoothly as possible even on laggy server
+and the one contained in the subgame "minetest_game".
+Target: Run smoothly as possible, even on laggy servers.
Features
@@ -12,8 +12,25 @@ Target: Run smoothly as possible even on laggy server
- Boost and brake rails
- By mesecons controlled Start-Stop rails
- Detector rails that send a mesecons signal when the cart drives over them
-- Rail junction switching with the 'right-left' walking keys
+- Rail junction switching with the 'right/left' walking keys
- Handbrake with the 'back' key
+- Support for non-minetest_game subgames
+
+
+ Settings
+----------
+This mod can be adjusted to fit the conditions of a player or server.
+Use the Advanced Settings dialog in the main menu or tune your
+minetest.conf file manually:
+
+boost_cart.speed_max = 10
+ ^ Possible values: 1 ... 100
+ ^ Maximal speed of the cart in m/s
+
+boost_cart.punch_speed_max = 7
+ ^ Possible values: -1 ... 100
+ ^ Maximal speed to which the driving player can accelerate the cart
+ by punching from inside the cart. -1 will disable this feature.
License for everything
diff --git a/boost_cart/functions.lua b/boost_cart/functions.lua
index 1332578..86f8535 100644
--- a/boost_cart/functions.lua
+++ b/boost_cart/functions.lua
@@ -18,7 +18,9 @@ function boost_cart:manage_attachment(player, obj)
default.player_attached[player_name] = status
if status then
- player:set_attach(obj, "", {x=0, y=6, z=0}, {x=0, y=0, z=0})
+ -- player_api came after the new model. Check for it.
+ local y_pos = player_api and -4.5 or 6
+ player:set_attach(obj, "", {x=0, y=y_pos, z=0}, {x=0, y=0, z=0})
player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0})
else
player:set_detach()
diff --git a/boost_cart/init.lua b/boost_cart/init.lua
index b9e0c67..9bcd785 100644
--- a/boost_cart/init.lua
+++ b/boost_cart/init.lua
@@ -16,13 +16,6 @@ boost_cart.speed_max = tonumber(setting_getter("boost_cart.speed_max")) or 10
-- Set to -1 to disable punching the cart from inside
boost_cart.punch_speed_max = tonumber(setting_getter("boost_cart.punch_speed_max")) or 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
-
-- Support for non-default games
if not default.player_attached then
default.player_attached = {}