Fix statbar positions, carts warnings, birch textures
@ -37,7 +37,7 @@ end
|
|||||||
|
|
||||||
local function quick_flow_logic(node, pos_testing, direction)
|
local function quick_flow_logic(node, pos_testing, direction)
|
||||||
local node_testing = core.get_node_or_nil(pos_testing)
|
local node_testing = core.get_node_or_nil(pos_testing)
|
||||||
if node_testing == nil then
|
if not node_testing then
|
||||||
node_testing = core.registered_nodes["default:dirt"]
|
node_testing = core.registered_nodes["default:dirt"]
|
||||||
end
|
end
|
||||||
if core.registered_nodes[node_testing.name].liquidtype ~= "flowing"
|
if core.registered_nodes[node_testing.name].liquidtype ~= "flowing"
|
||||||
|
@ -175,7 +175,7 @@ hud.register("itemname", {
|
|||||||
hud_elem_type = "text",
|
hud_elem_type = "text",
|
||||||
position = {x = 0.5, y = 1},
|
position = {x = 0.5, y = 1},
|
||||||
alignment = {x = 0, y = -10},
|
alignment = {x = 0, y = -10},
|
||||||
offset = {x = 0, y = -50},
|
offset = {x = 0, y = -25},
|
||||||
number = 0xFFFFFF,
|
number = 0xFFFFFF,
|
||||||
text = ""
|
text = ""
|
||||||
})
|
})
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
MultiCraft Game mod: carts
|
MultiCraft Game mod: carts
|
||||||
==========================
|
==========================
|
||||||
Based on (and fully compatible with) the mod "carts" by PilzAdam
|
Based on (and fully compatible with) the mod "carts" by PilzAdam
|
||||||
and the one contained in the subgame "minetest_game".
|
and the one contained in the subgame "minetest_game".
|
||||||
Target: Run smoothly as possible, even on laggy servers.
|
Target: Run smoothly as possible, even on laggy servers.
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
----------
|
----------
|
||||||
- A fast cart for your railway or roller coaster
|
- 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
|
- 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
|
Carts, based almost entirely on the mod boost_cart [1], which
|
||||||
itself is based on (and fully compatible with) the carts mod [2].
|
itself is based on (and fully compatible with) the carts mod [2].
|
||||||
|
|
||||||
The model was originally designed by stujones11 [3] (CC-0).
|
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).
|
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/
|
[1] https://github.com/SmallJoker/boost_cart/
|
||||||
[2] https://github.com/PilzAdam/carts/
|
[2] https://github.com/PilzAdam/carts/
|
||||||
[3] https://github.com/stujones11/railcart/
|
[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()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Player punches cart to alter velocity
|
-- Player punches cart to alter velocity
|
||||||
if puncher:get_player_name() == self.driver then
|
if puncher:get_player_name() == self.driver then
|
||||||
if math.abs(vel.x + vel.z) > carts.punch_speed_max 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
|
end
|
||||||
|
|
||||||
local ctrl, player
|
local ctrl, player
|
||||||
|
local distance = 1
|
||||||
|
|
||||||
-- Get player controls
|
-- Get player controls
|
||||||
if self.driver then
|
if self.driver then
|
||||||
@ -231,7 +233,7 @@ local function rail_on_step(self, dtime)
|
|||||||
-- Detection for "skipping" nodes (perhaps use average dtime?)
|
-- Detection for "skipping" nodes (perhaps use average dtime?)
|
||||||
-- It's sophisticated enough to take the acceleration in account
|
-- It's sophisticated enough to take the acceleration in account
|
||||||
local acc = self.object:get_acceleration()
|
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(
|
local new_pos, new_dir = carts:pathfinder(
|
||||||
pos, self.old_pos, self.old_dir, distance, ctrl,
|
pos, self.old_pos, self.old_dir, distance, ctrl,
|
||||||
@ -311,14 +313,6 @@ local function rail_on_step(self, dtime)
|
|||||||
acc = speed_mod * 10
|
acc = speed_mod * 10
|
||||||
end
|
end
|
||||||
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
|
if acc ~= false then
|
||||||
-- Handbrake
|
-- Handbrake
|
||||||
if ctrl and ctrl.down then
|
if ctrl and ctrl.down then
|
||||||
|
@ -2,7 +2,7 @@ carts = {}
|
|||||||
carts.modpath = minetest.get_modpath("carts")
|
carts.modpath = minetest.get_modpath("carts")
|
||||||
|
|
||||||
-- Maximal speed of the cart in m/s
|
-- 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
|
-- Set to -1 to disable punching the cart from inside
|
||||||
carts.punch_speed_max = 8
|
carts.punch_speed_max = 8
|
||||||
-- Maximal distance for the path correction (for dtime peaks)
|
-- 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"
|
"carts_rail_t_junction.png", "carts_rail_crossing.png"
|
||||||
},
|
},
|
||||||
groups = carts:get_rail_groups(),
|
groups = carts:get_rail_groups(),
|
||||||
}, {})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "carts:rail 16",
|
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 |
@ -48,30 +48,30 @@ hud.register("xp_bar", {
|
|||||||
max = MAX_HUD_XP,
|
max = MAX_HUD_XP,
|
||||||
})
|
})
|
||||||
|
|
||||||
hud.register("zlvl", {
|
-- level number
|
||||||
|
hud.register("lvl", {
|
||||||
hud_elem_type = "text",
|
hud_elem_type = "text",
|
||||||
position = {x = 0.5, y = 0.966},
|
position = {x = 0.5, y = 0.966},
|
||||||
alignment = {x = 0, y = -1},
|
alignment = {x = 0, y = -1},
|
||||||
offset = {x = 0, y = -50},
|
offset = {x = 0, y = -15},
|
||||||
number = 0x3cff00,
|
number = 0x3cff00,
|
||||||
text = "0",
|
text = "",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
--[[minetest.register_on_joinplayer(function(player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
init_data(player)
|
init_data(player)
|
||||||
|
|
||||||
_hud[name] = {}
|
_hud[name] = {}
|
||||||
-- level number
|
lvl = player:hud_add({
|
||||||
--[[ lvl = player:hud_add({
|
|
||||||
hud_elem_type = "text",
|
hud_elem_type = "text",
|
||||||
position = {x = 0.5, y = 0.91},
|
position = {x = 0.5, y = 0.91},
|
||||||
offset = {x = 0, y = -25},
|
offset = {x = 0, y = -25},
|
||||||
alignment = {x = 0, y = 0},
|
alignment = {x = 0, y = 0},
|
||||||
number = 0x3cff00,
|
number = 0x3cff00,
|
||||||
text = "",
|
text = "",
|
||||||
}) ]]
|
})
|
||||||
end)
|
end)]]
|
||||||
|
|
||||||
function experience.add_orb(amount, pos)
|
function experience.add_orb(amount, pos)
|
||||||
if amount == 0 then return end
|
if amount == 0 then return end
|
||||||
@ -99,6 +99,10 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
init_data(player)
|
||||||
|
end)
|
||||||
|
|
||||||
minetest.register_on_newplayer(function(player)
|
minetest.register_on_newplayer(function(player)
|
||||||
init_data(player)
|
init_data(player)
|
||||||
end)
|
end)
|
||||||
@ -157,7 +161,7 @@ minetest.register_playerstep(function(dtime, playernames)
|
|||||||
hud.change_item(player, "xp_bar", {number = xp[name].xp_bar})
|
hud.change_item(player, "xp_bar", {number = xp[name].xp_bar})
|
||||||
|
|
||||||
-- player:hud_change(_hud[name].lvl, "text", xp[name].level)
|
-- player:hud_change(_hud[name].lvl, "text", xp[name].level)
|
||||||
hud.change_item(player, "zlvl", {text = xp[name].level})
|
hud.change_item(player, "lvl", {text = xp[name].level})
|
||||||
-- player:hud_change(_hud[name].lvl, "offset",
|
-- player:hud_change(_hud[name].lvl, "offset",
|
||||||
-- {x = (xp[name].level >= 10 and 13 or 6), y = -202})
|
-- {x = (xp[name].level >= 10 and 13 or 6), y = -202})
|
||||||
end
|
end
|
||||||
|
@ -953,8 +953,8 @@ msgid "Shutting down..."
|
|||||||
msgstr "Завершение..."
|
msgstr "Завершение..."
|
||||||
|
|
||||||
#: src/game.cpp
|
#: src/game.cpp
|
||||||
msgid "Singleplayer"
|
#msgid "Singleplayer"
|
||||||
msgstr "Одиночная игра"
|
#msgstr "Одиночная игра"
|
||||||
|
|
||||||
#: src/game.cpp
|
#: src/game.cpp
|
||||||
msgid "Sound Volume"
|
msgid "Sound Volume"
|
||||||
|