From 834ebac0c2d7354c6626c4e0b2bfbe975aced8ad Mon Sep 17 00:00:00 2001 From: Aleksandr Avdeev Date: Sun, 5 Jan 2025 13:46:31 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=93=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.lua | 18 ++++++++++++++++-- locale/towns.ru.tr | 7 +++++-- mod.conf | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 8cfa35b..ee3b2e5 100644 --- a/init.lua +++ b/init.lua @@ -5,10 +5,24 @@ local towns_list = {} local central_spawn = { x = 206.7,y = 6,z = -84.2 } local city_pos = { x = -12003, y = 22, z = -7498 } -table.insert(towns_list, S("The city built by the player H743")..S(" | command - ").."/city") +local new_city_pos = { x = 22985, y = 26, z = -24836 } +table.insert(towns_list, S("The City built by the player H743")..S(" | command - ").."/city") +table.insert(towns_list, S("The NewCity built by the player H743 and another")..S(" | command - ").."/newcity") + +minetest.register_chatcommand("newcity", { + description = S("Go to the NewCity built by the player H743 and another"), + privs = { home = true }, + func = function(name) + local player = minetest.get_player_by_name(name) + if (player) then + player:setpos(new_city_pos) + minetest.chat_send_player(name,minetest.colorize("cyan", S("Welcome to the NewCity!"))) + end + end, +}) minetest.register_chatcommand("city", { - description = S("Go to the city built by the player H743"), + description = S("Go to the City built by the player H743"), privs = { home = true }, func = function(name) local player = minetest.get_player_by_name(name) diff --git a/locale/towns.ru.tr b/locale/towns.ru.tr index 3fb568d..9f9b28b 100644 --- a/locale/towns.ru.tr +++ b/locale/towns.ru.tr @@ -1,9 +1,12 @@ # textdomain: towns -The city built by the player H743=Город, построенный игроком H743 +The City built by the player H743=Город, построенный игроком H743 +The NewCity built by the player H743 and another=Новый Город, построенный игроком H743 и другими | command - = | комманда - -Go to the city built by the player H743=Отправиться в город, построенный игроком H743 +Go to the City built by the player H743=Отправиться в город, построенный игроком H743 +Go to the NewCity built by the player H743 and another=Отправиться в новый город, построенный игроком H743 и другими Welcome to the City!=Добро пожаловать в City! +Welcome to the NewCity!=Добро пожаловать в NewCity! List of server towns=Список городов сервера Towns:=Города: Total number of towns:=Всего городов на сервере: diff --git a/mod.conf b/mod.conf index 7a7d076..1cb27f2 100644 --- a/mod.conf +++ b/mod.conf @@ -2,4 +2,4 @@ name = towns description = Add chat teleport command to different towns of minetestserver.ru depends = default min_minetest_version = 5.7 -title = MTSR towns \ No newline at end of file +title = LSR towns \ No newline at end of file