diff --git a/public/scripts/extensions/expressions/settings.html b/public/scripts/extensions/expressions/settings.html index 700b8b2c7..06e407d7d 100644 --- a/public/scripts/extensions/expressions/settings.html +++ b/public/scripts/extensions/expressions/settings.html @@ -75,9 +75,20 @@ Remove all image overrides -

Hint: Create new folder in the /characters/ folder of your user data directory and name it as the name of the character. - Put images with expressions there. File names should follow the pattern: [expression_label].[image_format]

- In case of multiple files per expression, file names can contain a suffix, either separated by a dot or a dash. Examples: joy.png, joy-1.png, joy.expressive.png, 美しい-17.png +

+ Hint: + + Create new folder in the /characters/ folder of your user data directory and name it as the name of the character. + Put images with expressions there. File names should follow the pattern: [expression_label].[image_format] + +

+

+ + In case of multiple files per expression, file names can contain a suffix, either separated by a dot or a + dash. + Examples: joy.png, joy-1.png, joy.expressive.png + +

Sprite set: 

diff --git a/public/scripts/extensions/expressions/templates/upload-expression.html b/public/scripts/extensions/expressions/templates/upload-expression.html index a7901ae7f..a80ff6b90 100644 --- a/public/scripts/extensions/expressions/templates/upload-expression.html +++ b/public/scripts/extensions/expressions/templates/upload-expression.html @@ -5,7 +5,7 @@
For multiple expressions, the name must follow the expression name and a valid suffix. Allowed separators are '-' or dot '.'.
-Examples: {{expression}}.png, {{expression}}-1.png, {{expression}}.expressive.png, 美しい-17.png +Examples: {{expression}}.png, {{expression}}-1.png, {{expression}}.expressive.png {{#if clickedFileName}}
Click 'Replace' to replace the existing expression:
{{clickedFileName}} diff --git a/src/endpoints/sprites.js b/src/endpoints/sprites.js index ac6790982..0677ddb32 100644 --- a/src/endpoints/sprites.js +++ b/src/endpoints/sprites.js @@ -128,7 +128,7 @@ router.get('/get', jsonParser, function (request, response) { const fileName = path.parse(pathToSprite).name.toLowerCase(); // Extract the label from the filename via regex, which can be suffixed with a sub-name, either connected with a dash or a dot. - // Examples: joy.png, joy-1.png, joy.expressive.png, 美しい-17.png + // Examples: joy.png, joy-1.png, joy.expressive.png const label = fileName.match(/^(.+?)(?:[-\\.].*?)?$/)?.[1] ?? fileName; return {