forked from mtcontrib/boost_cart
Make the maximal speed configurable using minetest.conf
This commit is contained in:
parent
08918701b0
commit
b80d3aed4c
|
@ -7,7 +7,8 @@ Target: Run smoothly as possible even on laggy server
|
|||
|
||||
Features
|
||||
----------
|
||||
- A fast cart for your railway or roller coaster (up to 10 m/s!)
|
||||
- A fast cart for your railway or roller coaster
|
||||
- Easily configurable cart speed using the Advanced Settings
|
||||
- Boost and brake rails
|
||||
- By mesecons controlled Start-Stop rails
|
||||
- Detector rails that send a mesecons signal when the cart drives over them
|
||||
|
|
13
init.lua
13
init.lua
|
@ -2,10 +2,19 @@
|
|||
boost_cart = {}
|
||||
boost_cart.modpath = minetest.get_modpath("boost_cart")
|
||||
|
||||
|
||||
-- Settings glue for <= 0.4.15
|
||||
local setting_getter = minetest.setting_get
|
||||
if minetest.settings then
|
||||
setting_getter = function (key)
|
||||
return minetest.settings:get(key)
|
||||
end
|
||||
end
|
||||
|
||||
-- Maximal speed of the cart in m/s
|
||||
boost_cart.speed_max = 10
|
||||
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 = 7
|
||||
boost_cart.punch_speed_max = tonumber(setting_getter("boost_cart.punch_speed_max")) or 7
|
||||
|
||||
|
||||
if not boost_cart.modpath then
|
||||
|
|
6
settingtypes.txt
Normal file
6
settingtypes.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Maximal speed of the cart in m/s (min=1, max=100)
|
||||
boost_cart.speed_max (Maximal speed) int 10 1 100
|
||||
|
||||
# Maximal speed to which the driving player can accelerate the cart by punching
|
||||
# from inside the cart. -1 will disable this feature. (min=-1, max=100)
|
||||
boost_cart.punch_speed_max (Maximal punch speed) int 7 -1 100
|
Loading…
Reference in New Issue
Block a user