Change the chat message when you're trying to sit while moving and add ability to translate it
This commit is contained in:
parent
b2e1eea202
commit
2111b67106
4
api.lua
4
api.lua
|
@ -1,11 +1,13 @@
|
||||||
-- mcl_decor/api.lua
|
-- 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/
|
-- 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)
|
mcl_decor.sit = function(pos, _, player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if not mcl_player.player_attached[name] then
|
if not mcl_player.player_attached[name] then
|
||||||
if vector.length(player:get_player_velocity()) > 0 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
|
return
|
||||||
end
|
end
|
||||||
player:move_to(pos)
|
player:move_to(pos)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# textdomain: mcl_decor
|
# textdomain: mcl_decor
|
||||||
|
You have to stop moving before sitting down!=Вам нужно перестать двигаться, чтобы сесть!
|
||||||
Coalquartz Tile=Уголекварцевая плитка
|
Coalquartz Tile=Уголекварцевая плитка
|
||||||
Gravel Path=Дорожка из гравия
|
Gravel Path=Дорожка из гравия
|
||||||
Rainbow Block=Радужный блок
|
Rainbow Block=Радужный блок
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# textdomain: mcl_decor
|
# textdomain: mcl_decor
|
||||||
|
You have to stop moving before sitting down!=
|
||||||
Coalquartz Tile=
|
Coalquartz Tile=
|
||||||
Gravel Path=
|
Gravel Path=
|
||||||
Rainbow Block=
|
Rainbow Block=
|
||||||
|
|
Reference in New Issue