Skip to content

Commit 54740da

Browse files
sfan5MoNTE48
authored andcommitted
Colorize command references in chat output
1 parent 7066735 commit 54740da

File tree

7 files changed

+24
-23
lines changed

7 files changed

+24
-23
lines changed

worldedit_brush/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ worldedit.register_command("brush", {
105105
else
106106
local cmddef = worldedit.registered_commands[cmd]
107107
if cmddef == nil or cmddef.require_pos ~= 1 then
108-
worldedit.player_notify(name, S("//@1 cannot be used with brushes", cmd))
108+
worldedit.player_notify(name, S("@1 cannot be used with brushes", minetest.colorize("#00ffff", "//"..cmd)))
109109
return
110110
end
111111

worldedit_commands/cuboid.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ worldedit.register_command("cubeapply", {
232232
end
233233
local cmddef = worldedit.registered_commands[cmd]
234234
if cmddef == nil or cmddef.require_pos ~= 2 then
235-
return false, S("invalid usage: //@1 cannot be used with cubeapply", cmd)
235+
return false, S("invalid usage: @1 cannot be used with cubeapply",
236+
minetest.colorize("#00ffff", "//"..cmd))
236237
end
237238
-- run parsing of target command
238239
local parsed = {cmddef.parse(args)}

worldedit_commands/init.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ worldedit.register_command("about", {
307307
description = S("Get information about the WorldEdit mod"),
308308
func = function(name)
309309
worldedit.player_notify(name, S("WorldEdit @1"..
310-
" is available on this server. Type //help to get a list of "..
311-
"commands, or get more information at @2",
312-
worldedit.version_string,
310+
" is available on this server. Type @2 to get a list of "..
311+
"commands, or find more information at @3",
312+
worldedit.version_string, minetest.colorize("#00ffff", "//help"),
313313
"https://github.com/Uberi/Minetest-WorldEdit"
314314
))
315315
end,
@@ -346,9 +346,11 @@ worldedit.register_command("help", {
346346
end
347347
end
348348
table.sort(cmds)
349+
local help = minetest.colorize("#00ffff", "//help")
349350
return true, S("Available commands: @1@n"
350-
.. "Use '//help <cmd>' to get more information,"
351-
.. " or '//help all' to list everything.", table.concat(cmds, " "))
351+
.. "Use '@2' to get more information,"
352+
.. " or '@3' to list everything.",
353+
table.concat(cmds, " "), help .. " <cmd>", help .. " all")
352354
elseif param == "all" then
353355
local cmds = {}
354356
for cmd, def in pairs(worldedit.registered_commands) do

worldedit_commands/locale/template.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Region expanded by @1 nodes=
1313
Contracts the selection in the selected absolute or relative axis=
1414
Region contracted by @1 nodes=
1515
Select a cube with side length <size> around position 1 and run <command> on region=
16-
invalid usage: //@1 cannot be used with cubeapply=
16+
invalid usage: @1 cannot be used with cubeapply=
1717
Missing privileges: @1=
1818
Can use WorldEdit commands=
1919
no region selected=
@@ -24,10 +24,10 @@ Could not open file "@1"=
2424
Invalid file format!=
2525
Schematic was created with a newer version of WorldEdit.=
2626
Get information about the WorldEdit mod=
27-
WorldEdit @1 is available on this server. Type //help to get a list of commands, or get more information at @2=
27+
WorldEdit @1 is available on this server. Type @2 to get a list of commands, or find more information at @3=
2828
Get help for WorldEdit commands=
2929
You are not allowed to use any WorldEdit commands.=
30-
Available commands: @1@nUse '//help <cmd>' to get more information, or '//help all' to list everything.=
30+
Available commands: @1@nUse '@2' to get more information, or '@3' to list everything.=
3131
Available commands:@n=
3232
Command not available: @1=
3333
Enable or disable node inspection=
@@ -143,8 +143,7 @@ currently set node probabilities:=
143143
invalid node probability given, not saved=
144144
Clears all objects within the WorldEdit region=
145145
@1 objects cleared=
146-
This operation would affect up to @1 nodes; you can only update @2 nodes at a time=
147-
WARNING: this operation could affect up to @1 nodes; type //y to continue or //n to cancel=
146+
WARNING: this operation could affect up to @1 nodes; type @2 to continue or @3 to cancel=
148147
Confirm a pending operation=
149148
no operation pending=
150149
Abort a pending operation=

worldedit_commands/locale/worldedit_commands.de.tr

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Region expanded by @1 nodes=Gebiet um @1 Blöcke erweitert
2424
Contracts the selection in the selected absolute or relative axis=Schrumpft das Gebiet in Richtung einer absoluten oder relativen Achse
2525
Region contracted by @1 nodes=Gebiet um @1 Blöcke geschrumpft
2626
Select a cube with side length <size> around position 1 and run <command> on region=Wähle einen Würfel mit Seitenlänge <size> um Position 1 und führe <command> auf diesem Gebiet aus
27-
invalid usage: //@1 cannot be used with cubeapply=Ungültige Verwendung: //@1 kann nicht mit cubeapply verwendet werden
27+
invalid usage: @1 cannot be used with cubeapply=Ungültige Verwendung: @1 kann nicht mit cubeapply verwendet werden
2828
Missing privileges: @1=Fehlende Privilegien: @1
2929
Can use WorldEdit commands=Kann WorldEdit-Befehle benutzen
3030
no region selected=Kein Gebiet ausgewählt
@@ -35,10 +35,10 @@ Could not open file "@1"=Konnte die Datei „@1“ nicht öffnen
3535
Invalid file format!=Ungültiges Dateiformat!
3636
Schematic was created with a newer version of WorldEdit.=Schematic wurde mit einer neueren Version von WorldEdit erstellt.
3737
Get information about the WorldEdit mod=Informationen über den WorldEdit-Mod erhalten.
38-
WorldEdit @1 is available on this server. Type //help to get a list of commands, or get more information at @2=WorldEdit @1 ist auf diesem Server verfügbar. Nutzen Sie //help, um eine Liste der Befehle zu erhalten, oder finden Sie weitere Informationen unter @2
38+
WorldEdit @1 is available on this server. Type @2 to get a list of commands, or find more information at @3=WorldEdit @1 ist auf diesem Server verfügbar. Nutzen Sie @2, um eine Liste der Befehle zu erhalten, oder finden Sie weitere Informationen unter @3
3939
Get help for WorldEdit commands=Hilfe für WorldEdit-Befehle erhalten
4040
You are not allowed to use any WorldEdit commands.=Ihnen ist nicht erlaubt WorldEdit-Befehle zu nutzen.
41-
Available commands: @1@nUse '//help <cmd>' to get more information, or '//help all' to list everything.=Verfügbare Befehle: @1@n„//help <Befehl>“ benutzen, um mehr Informationen zu erhalten, oder „//help all“, um alles aufzulisten.
41+
Available commands: @1@nUse '@2' to get more information, or '@3' to list everything.=Verfügbare Befehle: @1@n„@2“ benutzen, um mehr Informationen zu erhalten, oder „@3“, um alles aufzulisten.
4242
Available commands:@n=Verfügbare Befehle:@n
4343
Command not available: @1=Befehl nicht verfügbar: @1
4444
Enable or disable node inspection=Inspizieren von Blöcken ein- oder ausschalten
@@ -154,8 +154,7 @@ currently set node probabilities:=
154154
invalid node probability given, not saved=
155155
Clears all objects within the WorldEdit region=Löscht alle Objekte innerhalb des WorldEdit-Gebiets
156156
@1 objects cleared=@1 Objekte gelöscht
157-
This operation would affect up to @1 nodes; you can only update @2 nodes at a time=Dieser Vorgang würde bis zu @1 Knoten betreffen; Sie können nur @2 Knoten gleichzeitig aktualisieren
158-
WARNING: this operation could affect up to @1 nodes; type //y to continue or //n to cancel=WARNUNG: Dieser Vorgang könnte bis zu @1 Blöcke betreffen; //y zum Fortfahren oder //n zum Abbrechen
157+
WARNING: this operation could affect up to @1 nodes; type @2 to continue or @3 to cancel=WARNUNG: Dieser Vorgang könnte bis zu @1 Blöcke betreffen; @2 zum Fortfahren oder @3 zum Abbrechen
159158
Confirm a pending operation=Einen ausstehenden Vorgang bestätigen
160159
no operation pending=Kein Vorgang ausstehend
161160
Abort a pending operation=Einen ausstehenden Vorgang abbrechen

worldedit_commands/locale/worldedit_commands.ru.tr

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Invalid file format!=Не верный формат файла!
1111
Schematic was created with a newer version of WorldEdit.=Схема была создана с использованием более новой версии WorldEdit.
1212

1313
Get information about the WorldEdit mod=Вывести информацию о WorldEdit
14-
WorldEdit @1 is available on this server. Type //help to get a list of commands, or get more information at @2=WorldEdit @1 доступен на этом сервере. Наберите команду //help чтобы увидеть список команд, больше информации по ссылке @2
14+
WorldEdit @1 is available on this server. Type @2 to get a list of commands, or get more information at @3=WorldEdit @1 доступен на этом сервере. Наберите команду @2 чтобы увидеть список команд, больше информации по ссылке @3
1515
Get help for WorldEdit commands=Вывести информацию об использовании команд WorldEdit
1616
You are not allowed to use any WorldEdit commands.=У вас нет привилегий, чтобы использовать команды WorldEdit.
17-
Available commands: @1@nUse '//help <cmd>' to get more information, or '//help all' to list everything.=Доступные команды: @1@nИспользуйте '//help <cmd>' для получения информации по команде или '//help all' для вывода подсказок по всем командам.
17+
Available commands: @1@nUse '@2' to get more information, or '@3' to list everything.=Доступные команды: @1@nИспользуйте '@2' для получения информации по команде или '@3' для вывода подсказок по всем командам.
1818
Available commands:@n=Доступные команды:@n
1919
Command not available: @1=Команда не найдена: @1
2020
Enable or disable node inspection=Включить/отключить инспекцию блоков
@@ -132,8 +132,7 @@ Clears all objects within the WorldEdit region=Очистить все объе
132132
@1 objects cleared=очищено @1 объектов
133133

134134
### safe.lua ###
135-
This operation would affect up to @1 nodes; you can only update @2 nodes at a time=Эта операция затронет до @1 нод; за один раз можно обновить только @2 нод
136-
WARNING: this operation could affect up to @1 nodes; type //y to continue or //n to cancel=ПРЕДУПРЕЖДЕНИЕ: эта операция может затронуть до @1 нод; введите //y для продолжения или //n для отмены
135+
WARNING: this operation could affect up to @1 nodes; type @2 to continue or @3 to cancel=ПРЕДУПРЕЖДЕНИЕ: эта операция может затронуть до @1 нод; введите @2 для продолжения или @3 для отмены
137136
Confirm a pending operation=Подтвердить отложенную операцию
138137
no operation pending=нет ожидающей операции
139138
Abort a pending operation=Отклонить отложенную операцию
@@ -154,7 +153,7 @@ Region expanded by @1 nodes=Регион увеличен на @1 нод(у/ы)
154153
Contracts the selection in the selected absolute or relative axis=Уменьшить выделение региона по выбранной абсолютной или относительной оси
155154
Region contracted by @1 nodes=Регион уменьшен на @1 нод(у/ы)
156155
Select a cube with side length <size> around position 1 and run <command> on region=Выделить куб с длиной стороны <size> вокруг позиции 1 и запустите <команду> в области
157-
invalid usage: //@1 cannot be used with cubeapply=недопустимое использование: //@1 не может быть применено в cubeapply
156+
invalid usage: @1 cannot be used with cubeapply=недопустимое использование: @1 не может быть применено в cubeapply
158157
Missing privileges: @1=Отсутствуют привилегии: @1
159158

160159
### wand.lua ###

worldedit_commands/safe.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ local function safe_region(name, count, callback, strict)
4747
end
4848
end
4949

50-
worldedit.player_notify(name, S("WARNING: this operation could affect up to @1 nodes; type //y to continue or //n to cancel", count))
50+
worldedit.player_notify(name, S("WARNING: this operation could affect up to @1 nodes; type @2 to continue or @3 to cancel",
51+
count, minetest.colorize("#00ffff", "//y"), minetest.colorize("#00ffff", "//n")))
5152
end
5253

5354
local function reset_pending(name)

0 commit comments

Comments
 (0)