Drop falling node, drop 1 item by default, hud item name delay, fix translations

This commit is contained in:
MoNTE48 2019-06-29 01:36:19 +02:00
parent 61a97204fe
commit 8d23c2530e
41 changed files with 60 additions and 45 deletions

View File

@ -19,6 +19,7 @@ core.register_entity(":__builtin:falling_node", {
node = {},
meta = {},
timer = 0,
set_node = function(self, node, meta)
self.node = node
@ -125,6 +126,12 @@ core.register_entity(":__builtin:falling_node", {
local npos = self.object:get_pos()
self.object:set_pos(vector.round(npos))
end
-- Drop node if does not fall within 5 seconds
self.timer = self.timer + dtime
if self.timer > 5 then
core.add_item(pos, self.node)
self.object:remove()
end
end
})

View File

@ -530,7 +530,7 @@ function core.item_drop(itemstack, dropper, pos)
end
if dropper_is_player then
p.y = p.y + 1.2
if dropper:get_player_control().sneak then
if not dropper:get_player_control().sneak then
cnt = 1
end
end

View File

@ -185,7 +185,13 @@ core.register_on_joinplayer(function(player)
initialize_builtin_statbars(player)
end)
local time = 0
local update_time = 0.5
core.register_globalstep(function(dtime)
time = time + dtime
if time > update_time then
local players = core.get_connected_players()
for i = 1, #players do
local player = players[i]
@ -218,4 +224,6 @@ core.register_globalstep(function(dtime)
hud.change_item(player, "itemname", {text = description})
end
end
time = 0
end
end)

View File

@ -198,7 +198,7 @@ end
--------------------------------------------------------------------------------
return {
name = "local",
caption = fgettext("Single Player"),
caption = fgettext("Singleplayer"),
cbf_formspec = get_formspec,
cbf_button_handler = main_button_handler,
on_change = on_change

View File

@ -37,7 +37,7 @@ local function get_formspec(tabview, name, tabdata)
"image_button[5.52,-0.13;0.83,0.83;" .. core.formspec_escape(defaulttexturedir .. "search.png")
.. ";btn_mp_search;" .. "]" ..
"image_button[6.26,-0.13;0.83,0.83;" .. core.formspec_escape(defaulttexturedir .. "refresh.png")
.. ";btn_mp_refresh;" .. "]" ..
.. ";btn_mp_refresh;;;true]" ..
-- Address / Port
"label[7.1,-0.3;" .. fgettext("Address:") .. "]" ..
@ -63,7 +63,7 @@ local function get_formspec(tabview, name, tabdata)
if tabdata.fav_selected and fav_selected then
if gamedata.fav then
retval = retval .. "image_button[7.1,4.91;0.83,0.83;" .. core.formspec_escape(defaulttexturedir .. "trash.png")
.. ";btn_delete_favorite;" .. "]"
.. ";btn_delete_favorite;;;true]"
end
if fav_selected.description then
retval = retval .. "textarea[7.5,2.3;4.8,2.9;;" ..
@ -368,7 +368,7 @@ end
--------------------------------------------------------------------------------
return {
name = "online",
caption = fgettext("Play Online"),
caption = fgettext("Multiplayer"),
cbf_formspec = get_formspec,
cbf_button_handler = main_button_handler,
on_change = on_change

View File

@ -514,7 +514,7 @@ msgid "PvP enabled"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_settings.lua

View File

@ -514,7 +514,7 @@ msgid "Ping"
msgstr "Пінг"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "Граць анлайн"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -529,7 +529,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -525,7 +525,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Jméno hráče"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -528,7 +528,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Spillerens navn"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -523,7 +523,7 @@ msgid "Ping"
msgstr "Latenz"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "Online spielen"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -515,7 +515,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -536,7 +536,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Ludanta nomo trolongas."
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -533,7 +533,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Nombre del jugador"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -522,7 +522,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -521,7 +521,7 @@ msgid "Ping"
msgstr "Ping"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "Jouer en ligne"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -513,7 +513,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -524,7 +524,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Játékos neve"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -516,7 +516,7 @@ msgid "Ping"
msgstr "Ping"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "Main Daring"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -528,7 +528,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Nome del giocatore"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -510,7 +510,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "オンラインプレイ"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -519,7 +519,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -519,7 +519,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "플레이어 이름"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -529,7 +529,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -526,7 +526,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -515,7 +515,7 @@ msgid "Ping"
msgstr "Ping"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "Main Dalam Talian"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -519,7 +519,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -532,7 +532,7 @@ msgstr "Ping"
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Online Spelen"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -528,7 +528,7 @@ msgstr "Ping"
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Gra przez sieć"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -526,7 +526,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -530,7 +530,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Nome do Jogador"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -532,7 +532,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -419,8 +419,8 @@ msgid "Host Server"
msgstr "Запустить сервер"
#: builtin/mainmenu/tab_local.lua
msgid "Single Player"
msgstr "Одиночная"
msgid "Singleplayer"
msgstr "Одиночная игра"
#: builtin/mainmenu/tab_local.lua
msgid "Name/Password"
@ -515,8 +515,8 @@ msgid "Ping"
msgstr "Пинг"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgstr "Играть онлайн"
msgid "Multiplayer"
msgstr "Мультиплеер"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "PvP enabled"

View File

@ -519,7 +519,7 @@ msgid "PvP enabled"
msgstr "PvP omogočeno"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "Igraj preko spleta"
#: builtin/mainmenu/tab_settings.lua

View File

@ -524,7 +524,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr ""
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -520,7 +520,7 @@ msgid "Ping"
msgstr ""
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "Spela online"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -515,7 +515,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "Jina la mchezaji"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -514,7 +514,7 @@ msgid "Ping"
msgstr "Ping"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgid "Multiplayer"
msgstr "Çevrim İçi Oyna"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -518,8 +518,8 @@ msgid "Ping"
msgstr "Пінг"
#: builtin/mainmenu/tab_online.lua
msgid "Play Online"
msgstr "Мережа"
msgid "Multiplayer"
msgstr "Мультиплеєр"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua
msgid "PvP enabled"

View File

@ -518,7 +518,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "玩家名称"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua

View File

@ -521,7 +521,7 @@ msgstr ""
#: builtin/mainmenu/tab_online.lua
#, fuzzy
msgid "Play Online"
msgid "Multiplayer"
msgstr "玩家名稱"
#: builtin/mainmenu/tab_online.lua builtin/mainmenu/tab_simple_main.lua