Extra tools/ru: Difference between revisions

Created page with "Если между картами нет разницы, возвращается 0; в противном случае возвращается 1."
Created page with "Обратите внимание, что название оптимизированных встроенных изображений изменено с <code>"originalname"</code> на <code>"originalname"_cut_"newSHA256"</code> (где <code>"newSHA256"</code> - это новый sha256 встроенного оптимизированного изображения). Он переименован для того, чтобы было ясно, что он был о..."
 
(5 intermediate revisions by the same user not shown)
Line 96: Line 96:
  map_optimize ''Исходный_путь_к_файлу_карты'' [''место_назначение_файла_карты'']
  map_optimize ''Исходный_путь_к_файлу_карты'' [''место_назначение_файла_карты'']


<div lang="en" dir="ltr" class="mw-content-ltr">
Оптимизирует файл карты в указанном <code>"source_map_file path"</code> (см. [https://github.com/ddnet/ddnet/pull/3201 как это работает]) и сохраняет выходные данные в заданном <code>"dest_map_filepath"</code>; если <code>"dest_map_filepath"</code> не задан, вывод путь по умолчанию равен <code>out/"source_map_filename".map</code>, удаляя путь и расширение исходного файла.
Optimizes the map file in the <code>''source_map_filepath''</code> given (see [https://github.com/ddnet/ddnet/pull/3201 how it works]) and stores the output in the given <code>''dest_map_filepath''</code>; if <code>''dest_map_filepath''</code> is unset, output path defaults to <code>out/''source_map_filename''.map</code>, stripping the path and the extension of the source file.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Обратите внимание, что название оптимизированных встроенных изображений изменено с <code>"originalname"</code> на <code>"originalname"_cut_"newSHA256"</code> (где <code>"newSHA256"</code> - это новый sha256 встроенного оптимизированного изображения). Он переименован для того, чтобы было ясно, что он был оптимизирован, потому что этот инструмент "будет" вносить изменения в карты, используемые файлом карты.
Note the name of the embedded images optimized is changed from <code>''originalname''</code> to <code>''originalname''_cut_''newSHA256''</code> (where <code>''newSHA256''</code> is the new sha256 of the embedded optimized image). It is renamed is to make clear it was optimized because this tool '''will''' make changes in the mapres used by the map file.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Если не удалось открыть исходный или целевой файл, возвращается -1.
If failed to open source or target file, returns -1.
</div>


''Доступно с версии: DDNet 15.5.4''
''Доступно с версии: DDNet 15.5.4''
Line 114: Line 108:
  map_replace_image ''файл_карты1'' ''файл_карты2'' ''имя_изображения'' ''файл_изображения''
  map_replace_image ''файл_карты1'' ''файл_карты2'' ''имя_изображения'' ''файл_изображения''


<div lang="en" dir="ltr" class="mw-content-ltr">
Заменяет изображение ''imagename'', находящееся в файле карты с именем ''map_file1'', на изображение с файловым путем ''image_file'' и сохраняет в файл карты с именем ''map_file2.map''.
Replaces the image ''imagename'' currently inside the map filename ''map_file1'' with the image filepath ''image_file'', and save into the map filename ''map_file2.map''.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Обратите внимание:
Please note:
* Имена файлов обеих карт должны быть относительно папки DDNet по умолчанию пользователя.
* Both map filenames must be relative to user default DDNet folder
* Путь к файлу нового изображения может быть абсолютным или относительным к текущему каталогу.
* New image filepath can be absolute, or relative to the current directory
</div>


=== map_resave ===
=== map_resave ===
Line 128: Line 118:
  map_resave ''файл_карты'' ''файл_изображения''
  map_resave ''файл_карты'' ''файл_изображения''


<div lang="en" dir="ltr" class="mw-content-ltr">
Обновляет файл карты ''map_file.map'' с помощью предоставленного файла ''image_file''.
Updates the map file ''map_file.map'' with the provided file ''image_file''.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Статус ошибки 255 возвращается, если 1) предоставлено число аргументов, отличное от 2, 2) если файл ''map_file.map'' недопустим, или 3) если файл ''image_file'' не является допустимым файлом изображения (например, это текстовый файл); в противном случае возвращается 0.
The error status 255 is returned if 1) a number of arguments different from 2 is provided, 2) if the ''map_file.map'' is not valid, or 3) if ''image_file'' is not a valid image file (e.g. it is a text file); otherwise, return 0.
</div>


=== packetgen ===
=== packetgen ===
Line 140: Line 126:
  packetgen
  packetgen


<div lang="en" dir="ltr" class="mw-content-ltr">
Генерирует и отправляет сетевые пакеты на 127.0.0.1:8303 (localhost, порт сервера по умолчанию) для проверки связи с локальным экземпляром сервера.
Generates and sends network packets to 127.0.0.1:8303 (localhost, in default server port) to test communication with a local server instance.
</div>


=== unicode_confusables ===
=== unicode_confusables ===
Line 148: Line 132:
  unicode_confusables ''строка1'' ''строка2''
  unicode_confusables ''строка1'' ''строка2''


<div lang="en" dir="ltr" class="mw-content-ltr">
Сравнивает ''string1'' со ''string2'' и сообщает, являются ли они "путаемыми", т.е. если символы "одинаковы" и могут вызвать путаницу. Чтобы это сработало, символы с акцентами или другими элементами вокруг них считаются "перепутанными" с базовым символом. Таким образом, ''aa'' и ''aá'' можно спутать ("á" считался как "a"), а ''aa'' и ''ab'' - нет.
Compares ''string1'' with ''string2'' and report if they are "confusable", i.e. if the characters are "equal" and could cause confusion. For this to work, the characters with accents or other things around them are considered the "confusable" with the base character. Therefore, ''aa'' and ''aá'' are confusable (''á'' was considered as ''a''), while ''aa'' and ''ab'' are not.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Если они перепутаны, возвращается <code>not_confusable=0</code>, в противном случае возвращается <code>not_confusable=1</code>.
If they are confusable, it returns <code>not_confusable=0</code>, otherwise, returns <code>not_confusable=1</code>.
</div>


''Доступно с версии: DDNet 10.3.5''
''Доступно с версии: DDNet 10.3.5''


<div lang="en" dir="ltr" class="mw-content-ltr">
'''Новое в DDNet версии 12.9:''' Поддержка Unicode 12.0 и название инструмента было переименовано из ''confusables'' в ''unicode_confusables''.
''New in DDNet version 12.9:'' Unicode 12.0 support and the tool name was renamed from ''confusables'' to ''unicode_confusables''.
</div>


=== uuid ===
=== uuid ===
Line 166: Line 144:
  uuid ''имя''
  uuid ''имя''


<div lang="en" dir="ltr" class="mw-content-ltr">
Выводит uuid для указанного ''имя''.
Prints uuid for the provided ''name''.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Система uuid была реализована таким образом, чтобы ее могли легко расширять независимые авторы без коллизий, чего не позволяла старая система - с возрастающими целыми числами. Это работает для сообщений движка и игры, предметов и событий снапшотов.
The uuid system was implemented to be easily extended by independent authors without collisions, something that the old system – with increasing integers – did not allow. This works for engine and game messages, snapshot items and events.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Выходит со статусом ошибки 255, если не указано ''name''.
Exits with error status 255 if ''name'' is not provided.
</div>


''Доступно с версии: DDNet 10.6.1''
''Доступно с версии: DDNet 10.6.1''