mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-07 07:39:32 +01:00
Implement gamerule:minecartMaxSpeed
This commit is contained in:
parent
427f2cf847
commit
b16607cffc
2 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
local modname = core.get_current_modname()
|
||||
local modpath = core.get_modpath(modname)
|
||||
local S = core.get_translator(modname)
|
||||
mcl_minecarts = {}
|
||||
local mod = mcl_minecarts
|
||||
mcl_minecarts.modpath = modpath
|
||||
|
@ -12,6 +13,13 @@ mod.MAX_TRAIN_LENGTH = 4
|
|||
mod.CART_BLOCK_SIZE = 64
|
||||
mod.PASSENGER_ATTACH_POSITION = vector.new(0, -1.75, 0)
|
||||
|
||||
vl_tuning.setting("gamerule:minecartMaxSpeed", "number", {
|
||||
set = function(value) mod.SPEED_MAX = value end,
|
||||
get = function() return mod.SPEED_MAX end,
|
||||
default = 10,
|
||||
description = S("The maximum speed a minecart may reach.")
|
||||
})
|
||||
|
||||
for _,filename in pairs({"storage","functions","rails","train","carts"}) do
|
||||
dofile(modpath.."/"..filename..".lua")
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# textdomain: mcl_minecarts
|
||||
##[ carts/minecart.lua ]##
|
||||
The maximum speed a minecart may reach.=
|
||||
Sneak to dismount=
|
||||
Minecart=
|
||||
Vehicle for fast travel on rails=
|
||||
|
|
Loading…
Reference in a new issue