From 7a4f3dc7a5ce20739d473427c40fc18d298f8978 Mon Sep 17 00:00:00 2001 From: shiroyashik Date: Sat, 12 Oct 2024 21:10:50 +0300 Subject: [PATCH] Added README in Russian + Prepare for v0.4.0 version --- .github/workflows/release.yml | 8 +-- Config.example.toml | 11 +++-- README.md | 42 ++++++++++------ README.ru.md | 93 +++++++++++++++++++++++++++++++++++ src/state/config.rs | 2 +- 5 files changed, 132 insertions(+), 24 deletions(-) create mode 100644 README.ru.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf3997a..0c64c73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,18 +38,18 @@ jobs: run: CROSS_NO_WARNINGS=0 cross build --target ${{ matrix.target }} --release # Create necessary files and directories - - name: Create necessary files and directories + - name: Create necessary files run: | - mkdir -p target/output/avatars cp Config.example.toml target/output/Config.toml - # Compress the output + # Compress the output | Windows - name: Compress | windows if: matrix.target == 'x86_64-pc-windows-gnu' run: | cp target/${{ matrix.target }}/release/sculptor.exe target/output (cd target/output; zip "../../sculptor_${{ matrix.output_name }}" ./*) - # Compress the output + + # Compress the output | Linux - name: Compress | linux if: matrix.target != 'x86_64-pc-windows-gnu' run: | diff --git a/Config.example.toml b/Config.example.toml index 49b1d3e..352c1f9 100644 --- a/Config.example.toml +++ b/Config.example.toml @@ -15,7 +15,11 @@ listen = "0.0.0.0:6665" # { name = "ElyBy", url = "http://minecraft.ely.by/session/hasJoined" }, # ] -# FIXME: in dev +## Enabling Asset Updater. +## If false, Sculptor will still respond to assets. Sculptor will handle any installed assets. +## (The path must be ./data/assets unless overridden!) +## This allows you to modify or create your own assets from scratch. X> +## Default value = false assetsUpdaterEnabled = true ## Message of The Day @@ -63,10 +67,11 @@ customText = """ ] """ -### Full update of these parameters occurs only after restarting the Sculptor!!! +## Full update of these parameters occurs only after restarting the Sculptor!!! [limitations] maxAvatarSize = 100 # KB -maxAvatars = 10 +maxAvatars = 10 # It doesn't look like Figura has any actions implemented with this? +# P.S. And it doesn't look like the current API allows anything like that... Unless you store them directly in one file... [advancedUsers.66004548-4de5-49de-bade-9c3933d8eb97] username = "Shiroyashik" diff --git a/README.md b/README.md index ff4662a..55391bc 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,33 @@ + - English + - [Русский](README.ru.md) + # The Sculptor [![Push Dev](https://github.com/shiroyashik/sculptor/actions/workflows/dev-release.yml/badge.svg?branch=dev)](https://github.com/shiroyashik/sculptor/actions/workflows/dev-release.yml) -Unofficial backend V2 for the Minecraft mod [Figura](https://github.com/FiguraMC/Figura). +Unofficial backend for the Minecraft mod [Figura](https://github.com/FiguraMC/Figura). Is a worthy replacement for the official version. Realized all the functionality that can be used during the game. And also a distinctive feature is the possibility of player identification through third-party authentication providers (such as [Ely.By](https://ely.by/)) +## Public server + +[![Server status](https://up.shsr.ru/api/badge/1/status?upLabel=Online&downLabel=Offline&label=Server+status)](https://up.shsr.ru/status/pub) + +I'm keeping the public server running at the moment! + +You can use it if running your own Sculptor instance is difficult for you. + +To connect, simply change **IP Server** in Figura settings to the address below: + +> figura.shsr.ru + +Authentication is enabled on the server via: Mojang and [Ely.By](https://ely.by/) + +For reasons beyond my control, the server is not available in some countries. + + ## Launch To run it you will need a configured reverse proxy server. @@ -48,25 +68,15 @@ cp Config.example.toml Config.toml nano Config.toml # Build it in release mode for better performance cargo build --release +# or run from cargo +cargo run --release ``` -## Public server - -[![Server status](https://up.shsr.ru/api/badge/1/status?upLabel=Online&downLabel=Offline&label=Server+status)](https://up.shsr.ru/status/pub) - -I'm keeping the public server running at the moment! - -You can use it if running your own Sculptor instance is difficult for you. - -> figura.shsr.ru - -For reasons beyond my control, the server is not available in some countries. - ## Contributing If you have ideas for new features, have found a bug, or want to suggest improvements, please create an [issue](https://github.com/shiroyashik/sculptor/issues) -or contact me directly via Discord (@shiroyashik). +or contact me directly via Discord/Telegram (@shiroyashik). If you are a Rust developer, you can modify the code yourself and request a Pull Request: @@ -74,11 +84,11 @@ If you are a Rust developer, you can modify the code yourself and request a Pull 2. Create a new branch for your features or fixes. 3. Submit a PR. -Glad for any help from ideas to PRs. +Glad for any help from ideas to PRs. ❤ #### P.S. -The [“master”](https://github.com/shiroyashik/sculptor/tree/master) branch contains the source code of the latest release. A [“dev”](https://github.com/shiroyashik/sculptor/tree/dev) branch is used for development. +The [“master”](https://github.com/shiroyashik/sculptor/tree/master) branch contains the source code of the latest release. [“dev”](https://github.com/shiroyashik/sculptor/tree/dev) branch is used for development. ## License diff --git a/README.ru.md b/README.ru.md new file mode 100644 index 0000000..f14b00e --- /dev/null +++ b/README.ru.md @@ -0,0 +1,93 @@ + * [English](README.md) + * Русский + +# The Sculptor +[![Push Dev](https://github.com/shiroyashik/sculptor/actions/workflows/dev-release.yml/badge.svg?branch=dev)](https://github.com/shiroyashik/sculptor/actions/workflows/dev-release.yml) + +Неофициальный бэкенд для Minecraft мода [Figura](https://github.com/FiguraMC/Figura). + +Это полноценная замена официальной версии. Реализован весь функционал который вы можете использовать во время игры. + +А также отличительной особенностью является возможность игры с сторонними провайдерерами аутентификации (таких как [Ely.By](https://ely.by/)) + +## Публичный сервер + +[![Статус сервера](https://up.shsr.ru/api/badge/1/status?upLabel=Online&downLabel=Offline&label=Server+status)](https://up.shsr.ru/status/pub) + +Я держу запущенным публичный сервер! + +Вы можете использовать его если запуск собственного сервера затруднителен для вас. + +Для подключения достаточно сменить **Сервер IP** в настройках Figura на адрес ниже: + +> figura.shsr.ru + +На сервере включена аутентификация через: Mojang и [Ely.By](https://ely.by/) + +По неконтролируемым мною причинам, сервер не доступен в некоторых странах + +## Запуск + +Для его запуска вам понадобится настроенный обратный прокси-сервер. + +Убедитесь, что используемый вами обратный прокси-сервер поддерживает WebSocket, а для HTTPS-соединений используются действительные сертификаты. + +> [!IMPORTANT] +> NGINX требует дополнительной настройки для работы с websocket! + +### Docker + +Как шаблон для начала можете использовать [docker-compose.example.yml](docker-compose.example.yml) + +Предполагается, что вы будете использовать Traefik в качестве обратного прокси, если это так, раскомментируйте строки и добавьте Sculptor в сеть с Traefik. + +Скопируйте [Config.example.toml](Config.example.toml) переименуйте в Config.toml и настройте по своему желанию. + +Запустите! `docker compose up -d` + +### Исполняемые файлы + +Смотрите [прикреплённые архивы к релизам](https://github.com/shiroyashik/sculptor/releases/latest) + +### Собираем из исходников + +Для сборки потребуется предустановленный Rust + +```sh +# Клонируем последний релиз +git clone https://github.com/shiroyashik/sculptor.git +# или из dev ветки +git clone --branch dev https://github.com/shiroyashik/sculptor.git +# Переходим в репу +cd sculptor +# Меняем имя конфиг файлу +cp Config.example.toml Config.toml +# Изменяем настройки (по желанию) +nano Config.toml +# Собираем с Release профилем для большей производительности +cargo build --release +# или запускаем прям из под cargo +cargo run --release +``` + +## Вклад в развитие + +Если у вас есть идем, нашли баг или хотите предложить улучшения +создавайте [issue](https://github.com/shiroyashik/sculptor/issues) +или свяжитесь со мной напрямую через Discord/Telegram (@shiroyashik). + +Если вы Rust разработчик, буду рад вашим Pull Request'ам: + +1. Форкните репу +2. Создайте новую репу для вашего гения +3. Создайте PR! + +Буду рад любой вашей помощи! ❤ + +#### Постскриптум + +Ветка [“master”](https://github.com/shiroyashik/sculptor/tree/master) содержит код последнего релиза. А [“dev”](https://github.com/shiroyashik/sculptor/tree/dev) ветка дря разработки. + +## License + +The Sculptor is licensed under [GPL-3.0](LICENSE) diff --git a/src/state/config.rs b/src/state/config.rs index 1344c41..24984c5 100644 --- a/src/state/config.rs +++ b/src/state/config.rs @@ -11,7 +11,7 @@ use crate::auth::{default_authproviders, AuthProviders, Userinfo}; pub struct Config { pub listen: String, pub token: Option, - pub assets_updater_enabled: bool, // FIXME: IN DEV BRANCH ONLY + pub assets_updater_enabled: bool, pub motd: CMotd, #[serde(default = "default_authproviders")] pub auth_providers: AuthProviders,