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