Change the chat message when you're trying to sit while moving and add ability to translate it

This commit is contained in:
Mikita Wiśniewski 2022-02-25 17:47:42 +07:00
parent b2e1eea202
commit 2111b67106
3 changed files with 5 additions and 1 deletions

View File

@ -1,11 +1,13 @@
-- mcl_decor/api.lua
local S = minetest.get_translator(minetest.get_current_modname())
-- originally from the ts_furniture mod (which is from cozy) by Thomas--S // https://github.com/minetest-mods/ts_furniture/
mcl_decor.sit = function(pos, _, player)
local name = player:get_player_name()
if not mcl_player.player_attached[name] then
if vector.length(player:get_player_velocity()) > 0 then
minetest.chat_send_player(player:get_player_name(), 'You can only sit down when you are not moving.')
minetest.chat_send_player(player:get_player_name(), S("You have to stop moving before sitting down!"))
return
end
player:move_to(pos)

View File

@ -1,4 +1,5 @@
# textdomain: mcl_decor
You have to stop moving before sitting down!=Вам нужно перестать двигаться, чтобы сесть!
Coalquartz Tile=Уголекварцевая плитка
Gravel Path=Дорожка из гравия
Rainbow Block=Радужный блок

View File

@ -1,4 +1,5 @@
# textdomain: mcl_decor
You have to stop moving before sitting down!=
Coalquartz Tile=
Gravel Path=
Rainbow Block=