Fix statbar positions, carts warnings, birch textures
@ -1,10 +1,9 @@
|
||||
MultiCraft Game mod: carts
|
||||
MultiCraft Game mod: carts
|
||||
==========================
|
||||
Based on (and fully compatible with) the mod "carts" by PilzAdam
|
||||
and the one contained in the subgame "minetest_game".
|
||||
Target: Run smoothly as possible, even on laggy servers.
|
||||
|
||||
|
||||
Features
|
||||
----------
|
||||
- A fast cart for your railway or roller coaster
|
||||
@ -17,30 +16,17 @@ Target: Run smoothly as possible, even on laggy servers.
|
||||
- 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.
|
||||
|
||||
|
||||
Carts, based almost entirely on the mod boost_cart [1], which
|
||||
itself is based on (and fully compatible with) the carts mod [2].
|
||||
|
||||
The model was originally designed by stujones11 [3] (CC-0).
|
||||
|
||||
Cart textures are based on original work from PixelBOX by Gambit (permissive
|
||||
Rails textures are based on original work from PixelBOX by Gambit (permissive
|
||||
license).
|
||||
|
||||
Cart model changed specifically for MultiCraft (LGPLv3+).
|
||||
The Cart texture drawn specifically for MultiCraft (CC-BY-SA 4.0).
|
||||
|
||||
[1] https://github.com/SmallJoker/boost_cart/
|
||||
[2] https://github.com/PilzAdam/carts/
|
||||
[3] https://github.com/stujones11/railcart/
|
||||
|
@ -118,6 +118,7 @@ function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities,
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
||||
-- Player punches cart to alter velocity
|
||||
if puncher:get_player_name() == self.driver then
|
||||
if math.abs(vel.x + vel.z) > carts.punch_speed_max then
|
||||
@ -217,6 +218,7 @@ local function rail_on_step(self, dtime)
|
||||
end
|
||||
|
||||
local ctrl, player
|
||||
local distance = 1
|
||||
|
||||
-- Get player controls
|
||||
if self.driver then
|
||||
@ -231,7 +233,7 @@ local function rail_on_step(self, dtime)
|
||||
-- Detection for "skipping" nodes (perhaps use average dtime?)
|
||||
-- It's sophisticated enough to take the acceleration in account
|
||||
local acc = self.object:get_acceleration()
|
||||
local distance = dtime * (v3_len(vel) + 0.5 * dtime * v3_len(acc))
|
||||
distance = dtime * (v3_len(vel) + 0.5 * dtime * v3_len(acc))
|
||||
|
||||
local new_pos, new_dir = carts:pathfinder(
|
||||
pos, self.old_pos, self.old_dir, distance, ctrl,
|
||||
@ -311,14 +313,6 @@ local function rail_on_step(self, dtime)
|
||||
acc = speed_mod * 10
|
||||
end
|
||||
end
|
||||
if acc == nil and carts.mtg_compat then
|
||||
-- MTG Cart API adaption
|
||||
local rail_node = minetest.get_node(vector.round(pos))
|
||||
local railparam = carts.railparams[rail_node.name]
|
||||
if railparam and railparam.acceleration then
|
||||
acc = railparam.acceleration
|
||||
end
|
||||
end
|
||||
if acc ~= false then
|
||||
-- Handbrake
|
||||
if ctrl and ctrl.down then
|
||||
|
@ -2,7 +2,7 @@ carts = {}
|
||||
carts.modpath = minetest.get_modpath("carts")
|
||||
|
||||
-- Maximal speed of the cart in m/s
|
||||
carts.speed_max = 12
|
||||
carts.speed_max = 12
|
||||
-- Set to -1 to disable punching the cart from inside
|
||||
carts.punch_speed_max = 8
|
||||
-- Maximal distance for the path correction (for dtime peaks)
|
||||
|
@ -7,7 +7,7 @@ carts:register_rail("carts:rail", {
|
||||
"carts_rail_t_junction.png", "carts_rail_crossing.png"
|
||||
},
|
||||
groups = carts:get_rail_groups(),
|
||||
}, {})
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "carts:rail 16",
|
||||
|
@ -1,6 +0,0 @@
|
||||
# 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
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 783 B |
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 496 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |