From b049378d991c7d488dba94f9c41e109bf215e734 Mon Sep 17 00:00:00 2001 From: CrimeMoot Date: Wed, 17 Jul 2024 13:55:12 +0500 Subject: [PATCH 001/166] remove .github/workflows/update-wiki.yml --- .github/workflows/update-wiki.yml | 92 ------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 .github/workflows/update-wiki.yml diff --git a/.github/workflows/update-wiki.yml b/.github/workflows/update-wiki.yml deleted file mode 100644 index 2cd13b0d2dc..00000000000 --- a/.github/workflows/update-wiki.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: Update Wiki - -on: - workflow_dispatch: - push: - branches: [ master, jsondump ] - paths: - - '.github/workflows/update-wiki.yml' - - 'Content.Shared/Chemistry/**.cs' - - 'Content.Server/Chemistry/**.cs' - - 'Content.Server/GuideGenerator/**.cs' - - 'Content.Server/Corvax/GuideGenerator/**.cs' - - 'Resources/Prototypes/Reagents/**.yml' - - 'Resources/Prototypes/Chemistry/**.yml' - - 'Resources/Prototypes/Recipes/Reactions/**.yml' - - 'RobustToolbox/' - -jobs: - update-wiki: - name: Build and Publish JSON blobs to wiki - runs-on: ubuntu-latest - - steps: - - name: Checkout Master - uses: actions/checkout@v3.6.0 - - - name: Setup Submodule - run: | - git submodule update --init --recursive - - - name: Pull Engine Updates - uses: space-wizards/submodule-dependency@v0.1.5 - - - name: Update Engine Submodules - run: | - cd RobustToolbox/ - git submodule update --init --recursive - - - name: Setup .NET Core - uses: actions/setup-dotnet@v3.2.0 - with: - dotnet-version: 7.0.x - - - name: Install Dependencies - run: dotnet restore - - - name: Build Project - run: dotnet build --configuration Release --no-restore /p:WarningsAsErrors=nullable /m - - - name: Generate JSON blobs for prototypes - run: dotnet ./bin/Content.Server/Content.Server.dll --cvar autogen.destination_file=prototypes.json - continue-on-error: true - - - name: Upload chem_prototypes.json to wiki - uses: jtmullen/mediawiki-edit-action@v0.1.1 - with: - wiki_text_file: ./bin/Content.Server/data/chem_prototypes.json - edit_summary: Update chem_prototypes.json via GitHub Actions - page_name: "${{ secrets.WIKI_PAGE_ROOT }}/chem_prototypes.json" - api_url: ${{ secrets.WIKI_ROOT_URL }}/api.php - username: ${{ secrets.WIKI_BOT_USER }} - password: ${{ secrets.WIKI_BOT_PASS }} - - - name: Upload react_prototypes.json to wiki - uses: jtmullen/mediawiki-edit-action@v0.1.1 - with: - wiki_text_file: ./bin/Content.Server/data/react_prototypes.json - edit_summary: Update react_prototypes.json via GitHub Actions - page_name: "${{ secrets.WIKI_PAGE_ROOT }}/react_prototypes.json" - api_url: ${{ secrets.WIKI_ROOT_URL }}/api.php - username: ${{ secrets.WIKI_BOT_USER }} - password: ${{ secrets.WIKI_BOT_PASS }} - - - name: Upload entity_prototypes.json to wiki - uses: jtmullen/mediawiki-edit-action@v0.1.1 - with: - wiki_text_file: ./bin/Content.Server/data/entity_prototypes.json - edit_summary: Update entity_prototypes.json via GitHub Actions - page_name: "${{ secrets.WIKI_PAGE_ROOT }}/entity_prototypes.json" - api_url: ${{ secrets.WIKI_ROOT_URL }}/api.php - username: ${{ secrets.WIKI_BOT_USER }} - password: ${{ secrets.WIKI_BOT_PASS }} - - - name: Upload mealrecipes_prototypes.json to wiki - uses: jtmullen/mediawiki-edit-action@v0.1.1 - with: - wiki_text_file: ./bin/Content.Server/data/mealrecipes_prototypes.json - edit_summary: Update mealrecipes_prototypes.json via GitHub Actions - page_name: "${{ secrets.WIKI_PAGE_ROOT }}/mealrecipes_prototypes.json" - api_url: ${{ secrets.WIKI_ROOT_URL }}/api.php - username: ${{ secrets.WIKI_BOT_USER }} - password: ${{ secrets.WIKI_BOT_PASS }} From 79d9fc1666256b5cb90767a43eb4942e69e86a53 Mon Sep 17 00:00:00 2001 From: CrimeMoot Date: Wed, 17 Jul 2024 17:02:08 +0500 Subject: [PATCH 002/166] Update build-test-debug.yml --- .github/workflows/build-test-debug.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test-debug.yml b/.github/workflows/build-test-debug.yml index a746ca6a7cb..282e38ed590 100644 --- a/.github/workflows/build-test-debug.yml +++ b/.github/workflows/build-test-debug.yml @@ -22,8 +22,7 @@ jobs: uses: actions/checkout@v3.6.0 - name: Setup Submodule - run: | - git submodule update --init --recursive + run: git submodule update --init --recursive - name: Pull engine updates uses: space-wizards/submodule-dependency@v0.1.5 @@ -41,21 +40,18 @@ jobs: - name: Install dependencies run: dotnet restore -# - name: skip locale check -# run: | -# sed -i 's/_logSawmill.Error(sbErr.ToString());/_logSawmill.Warning(sbErr.ToString());/g' RobustToolbox/Robust.Shared/Localization/LocalizationManager.cs - - name: Build Project run: dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m - name: Run Content.Tests - run: dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 + run: dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 --logger "trx;LogFileName=content_tests_results.trx" --blame --timeout 3000000 - name: Run Content.IntegrationTests shell: pwsh run: | $env:DOTNET_gcServer=1 - dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed + dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 --logger "trx;LogFileName=integration_tests_results.trx" --blame --timeout 3000000 + ci-success: name: Build & Test Debug needs: From f53b68b0b514bfadbfd3eea4de158992b23e0e94 Mon Sep 17 00:00:00 2001 From: CrimeMoot Date: Wed, 17 Jul 2024 17:48:02 +0500 Subject: [PATCH 003/166] Edited ban messages --- Content.Server/Database/ServerBanDef.cs | 1 + Resources/Locale/en-US/connection-messages.ftl | 3 ++- Resources/Locale/ru-RU/connection-messages.ftl | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Server/Database/ServerBanDef.cs b/Content.Server/Database/ServerBanDef.cs index 9d67537bd22..5b68c310437 100644 --- a/Content.Server/Database/ServerBanDef.cs +++ b/Content.Server/Database/ServerBanDef.cs @@ -86,6 +86,7 @@ public string FormatBanMessage(IConfigurationManager cfg, ILocalizationManager l {loc.GetString("ban-banned-2", ("reason", Reason))} {expires} {loc.GetString("ban-banned-3")} + {loc.GetString("ban-banned-4")} """; } } diff --git a/Resources/Locale/en-US/connection-messages.ftl b/Resources/Locale/en-US/connection-messages.ftl index f1596d90152..0feb7b5d019 100644 --- a/Resources/Locale/en-US/connection-messages.ftl +++ b/Resources/Locale/en-US/connection-messages.ftl @@ -32,7 +32,8 @@ ban-banned-permanent-appeal = This ban will only be removed via appeal. You can ban-expires = This ban is for {$duration} minutes and will expire at {$time} UTC. ban-banned-1 = You, or another user of this computer or connection, are banned from playing here. ban-banned-2 = The ban reason is: "{$reason}" -ban-banned-3 = Attempts to circumvent this ban such as creating a new account will be logged. +ban-banned-3 = If you don't agree with the sanction, you can apeal it in our Discord: https://discord.gg/vYFHfrdQQC | SpaceCats +ban-banned-4 = Attempts to circumvent this ban such as creating a new account will be logged. soft-player-cap-full = The server is full! panic-bunker-account-denied = This server is in panic bunker mode, often enabled as a precaution against raids. New connections by accounts not meeting certain requirements are temporarily not accepted. Try again later diff --git a/Resources/Locale/ru-RU/connection-messages.ftl b/Resources/Locale/ru-RU/connection-messages.ftl index 251571cfdfc..d3df44ad11c 100644 --- a/Resources/Locale/ru-RU/connection-messages.ftl +++ b/Resources/Locale/ru-RU/connection-messages.ftl @@ -29,7 +29,8 @@ ban-banned-permanent-appeal = Этот бан можно только обжал ban-expires = Вы получили бан на { $duration } минут, и он истечёт { $time } по UTC (для московского времени добавьте 3 часа). ban-banned-1 = Вам, или другому пользователю этого компьютера или соединения, запрещено здесь играть. ban-banned-2 = Причина бана: "{ $reason }" -ban-banned-3 = Попытки обойти этот бан, например, путём создания нового аккаунта, будут фиксироваться. +ban-banned-3 = Если вы не согласны с выданным наказанием, посетите наш Discord: https://discord.gg/vYFHfrdQQC | SpaceCats +ban-banned-4 = Попытки обойти этот бан, например, путём создания нового аккаунта, будут фиксироваться. soft-player-cap-full = Сервер заполнен! panic-bunker-account-denied = Этот сервер находится в режиме "Бункер", часто используемом в качестве меры предосторожности против рейдов. Новые подключения от аккаунтов, не соответствующих определённым требованиям, временно не принимаются. Повторите попытку позже panic-bunker-account-denied-reason = Этот сервер находится в режиме "Бункер", часто используемом в качестве меры предосторожности против рейдов. Новые подключения от аккаунтов, не соответствующих определённым требованиям, временно не принимаются. Повторите попытку позже Причина: "{ $reason }" From e3e5423c56272f2e18e0f03b8debfded973a3d3e Mon Sep 17 00:00:00 2001 From: CrimeMoot Date: Wed, 17 Jul 2024 18:46:40 +0500 Subject: [PATCH 004/166] fix workflows --- .github/workflows/build-test-debug.yml | 14 ++-- .github/workflows/update-wiki.yml | 92 ++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/update-wiki.yml diff --git a/.github/workflows/build-test-debug.yml b/.github/workflows/build-test-debug.yml index 282e38ed590..5d3bf553359 100644 --- a/.github/workflows/build-test-debug.yml +++ b/.github/workflows/build-test-debug.yml @@ -22,7 +22,8 @@ jobs: uses: actions/checkout@v3.6.0 - name: Setup Submodule - run: git submodule update --init --recursive + run: | + git submodule update --init --recursive - name: Pull engine updates uses: space-wizards/submodule-dependency@v0.1.5 @@ -40,18 +41,21 @@ jobs: - name: Install dependencies run: dotnet restore +# - name: skip locale check +# run: | +# sed -i 's/_logSawmill.Error(sbErr.ToString());/_logSawmill.Warning(sbErr.ToString());/g' RobustToolbox/Robust.Shared/Localization/LocalizationManager.cs + - name: Build Project run: dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m - name: Run Content.Tests - run: dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 --logger "trx;LogFileName=content_tests_results.trx" --blame --timeout 3000000 + run: dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 - name: Run Content.IntegrationTests shell: pwsh run: | $env:DOTNET_gcServer=1 - dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 --logger "trx;LogFileName=integration_tests_results.trx" --blame --timeout 3000000 - + dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed ci-success: name: Build & Test Debug needs: @@ -59,4 +63,4 @@ jobs: runs-on: ubuntu-latest steps: - name: CI succeeded - run: exit 0 + run: exit 0 \ No newline at end of file diff --git a/.github/workflows/update-wiki.yml b/.github/workflows/update-wiki.yml new file mode 100644 index 00000000000..2cd13b0d2dc --- /dev/null +++ b/.github/workflows/update-wiki.yml @@ -0,0 +1,92 @@ +name: Update Wiki + +on: + workflow_dispatch: + push: + branches: [ master, jsondump ] + paths: + - '.github/workflows/update-wiki.yml' + - 'Content.Shared/Chemistry/**.cs' + - 'Content.Server/Chemistry/**.cs' + - 'Content.Server/GuideGenerator/**.cs' + - 'Content.Server/Corvax/GuideGenerator/**.cs' + - 'Resources/Prototypes/Reagents/**.yml' + - 'Resources/Prototypes/Chemistry/**.yml' + - 'Resources/Prototypes/Recipes/Reactions/**.yml' + - 'RobustToolbox/' + +jobs: + update-wiki: + name: Build and Publish JSON blobs to wiki + runs-on: ubuntu-latest + + steps: + - name: Checkout Master + uses: actions/checkout@v3.6.0 + + - name: Setup Submodule + run: | + git submodule update --init --recursive + + - name: Pull Engine Updates + uses: space-wizards/submodule-dependency@v0.1.5 + + - name: Update Engine Submodules + run: | + cd RobustToolbox/ + git submodule update --init --recursive + + - name: Setup .NET Core + uses: actions/setup-dotnet@v3.2.0 + with: + dotnet-version: 7.0.x + + - name: Install Dependencies + run: dotnet restore + + - name: Build Project + run: dotnet build --configuration Release --no-restore /p:WarningsAsErrors=nullable /m + + - name: Generate JSON blobs for prototypes + run: dotnet ./bin/Content.Server/Content.Server.dll --cvar autogen.destination_file=prototypes.json + continue-on-error: true + + - name: Upload chem_prototypes.json to wiki + uses: jtmullen/mediawiki-edit-action@v0.1.1 + with: + wiki_text_file: ./bin/Content.Server/data/chem_prototypes.json + edit_summary: Update chem_prototypes.json via GitHub Actions + page_name: "${{ secrets.WIKI_PAGE_ROOT }}/chem_prototypes.json" + api_url: ${{ secrets.WIKI_ROOT_URL }}/api.php + username: ${{ secrets.WIKI_BOT_USER }} + password: ${{ secrets.WIKI_BOT_PASS }} + + - name: Upload react_prototypes.json to wiki + uses: jtmullen/mediawiki-edit-action@v0.1.1 + with: + wiki_text_file: ./bin/Content.Server/data/react_prototypes.json + edit_summary: Update react_prototypes.json via GitHub Actions + page_name: "${{ secrets.WIKI_PAGE_ROOT }}/react_prototypes.json" + api_url: ${{ secrets.WIKI_ROOT_URL }}/api.php + username: ${{ secrets.WIKI_BOT_USER }} + password: ${{ secrets.WIKI_BOT_PASS }} + + - name: Upload entity_prototypes.json to wiki + uses: jtmullen/mediawiki-edit-action@v0.1.1 + with: + wiki_text_file: ./bin/Content.Server/data/entity_prototypes.json + edit_summary: Update entity_prototypes.json via GitHub Actions + page_name: "${{ secrets.WIKI_PAGE_ROOT }}/entity_prototypes.json" + api_url: ${{ secrets.WIKI_ROOT_URL }}/api.php + username: ${{ secrets.WIKI_BOT_USER }} + password: ${{ secrets.WIKI_BOT_PASS }} + + - name: Upload mealrecipes_prototypes.json to wiki + uses: jtmullen/mediawiki-edit-action@v0.1.1 + with: + wiki_text_file: ./bin/Content.Server/data/mealrecipes_prototypes.json + edit_summary: Update mealrecipes_prototypes.json via GitHub Actions + page_name: "${{ secrets.WIKI_PAGE_ROOT }}/mealrecipes_prototypes.json" + api_url: ${{ secrets.WIKI_ROOT_URL }}/api.php + username: ${{ secrets.WIKI_BOT_USER }} + password: ${{ secrets.WIKI_BOT_PASS }} From 030dc14257c31bfa884455942f24145514af3026 Mon Sep 17 00:00:00 2001 From: CrimeMoot Date: Wed, 17 Jul 2024 19:26:26 +0500 Subject: [PATCH 005/166] Admin log timer --- .../UI/Logs/AdminLogsControl.xaml | 40 ++- .../UI/Logs/AdminLogsControl.xaml.cs | 251 ++++++++++++++---- .../en-US/Cats/administration/ui/add-logs.ftl | 4 + .../ru-RU/Cats/administration/ui/add-logs.ftl | 4 + 4 files changed, 253 insertions(+), 46 deletions(-) create mode 100644 Resources/Locale/en-US/Cats/administration/ui/add-logs.ftl create mode 100644 Resources/Locale/ru-RU/Cats/administration/ui/add-logs.ftl diff --git a/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml b/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml index fc4d3ee3aca..e8c05a537c3 100644 --- a/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml +++ b/Content.Client/Administration/UI/Logs/AdminLogsControl.xaml @@ -1,4 +1,5 @@ - @@ -57,6 +58,43 @@