diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 383a75d5f71..ea103a45a39 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,14 +1,14 @@ - - + + ## Кратное описание - + ## По какой причине - + ## Медиа(Видео/Скриншоты) - @@ -20,19 +20,11 @@ **Changelog** +Если нужно чтобы игроки узнали об изменениях сделаных в данном PR укажите их используя шаблон вне коментария. Кратко и информативно. - diff --git a/.github/workflows/update_changelog.yml b/.github/workflows/update_changelog.yml new file mode 100644 index 00000000000..c46ef924b3a --- /dev/null +++ b/.github/workflows/update_changelog.yml @@ -0,0 +1,48 @@ +name: Update sunrise changelog + +on: + push: + branches: [master] + pull_request: + types: [closed] + branches: [master] + +jobs: + update_changelog: + if: github.event.pull_request.merged == true && github.event.commits[0].author.name != 'GitHubActions' + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + token: ${{ secrets.GH_TOKEN }} + + - name: Configure git + run: | + git config user.name "GitHubActions" + git config user.email "<>" + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install Dependencies + run: pip install pyyaml requests + + - name: Save PR Body to File + run: echo "${{ github.event.pull_request.body }}" > pr_body.txt + + - name: Extract Changelog from PR + env: + DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }} + run: | + python3 Tools/automatic_changelog.py "Resources/Changelog/ChangelogSunrise.yml" "$(cat pr_body.txt)" + + - name: Commit and Push Changes + run: | + git add Resources/Changelog/ChangelogSunrise.yml + git commit -m 'Update changelog from PR #${{ github.event.pull_request.number }}' + git push diff --git a/.github/workflows/validate-rsis.yml b/.github/workflows/validate-rsis.yml index b76df28e6af..6b7969d2f44 100644 --- a/.github/workflows/validate-rsis.yml +++ b/.github/workflows/validate-rsis.yml @@ -14,13 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.6.0 - - name: Setup Submodule - run: git submodule update --init - - name: Pull engine updates - uses: space-wizards/submodule-dependency@v0.1.5 - name: Install Python dependencies run: | pip3 install --ignore-installed --user pillow jsonschema - name: Validate RSIs run: | - python3 RobustToolbox/Schemas/validate_rsis.py Resources/ + python3 Tools/Schemas/validate_rsis.py Resources/ diff --git a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs index c8606ca80d5..866c4e788f7 100644 --- a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs @@ -1,6 +1,7 @@ using Content.Client.Station; using Content.Client.UserInterface.Controls; using Robust.Client.AutoGenerated; +using Robust.Client.Console; using Robust.Client.Graphics; using Robust.Client.UserInterface; using Robust.Client.UserInterface.XAML; @@ -14,6 +15,7 @@ public sealed partial class ObjectsTab : Control { [Dependency] private readonly IEntityManager _entityManager = default!; [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly IClientConsoleHost _console = default!; private readonly List _objects = new(); private readonly List _selections = new(); @@ -27,6 +29,9 @@ public sealed partial class ObjectsTab : Control private readonly TimeSpan _updateFrequency = TimeSpan.FromSeconds(2); private TimeSpan _nextUpdate; + private Action? TeleportToObjAction { get; set; } + private Action? DeleteObjAction { get; set; } + public ObjectsTab() { RobustXamlLoader.Load(this); @@ -57,6 +62,19 @@ public ObjectsTab() // Initialize the next update time _nextUpdate = TimeSpan.Zero; + + TeleportToObjAction += TeleportToObj; + DeleteObjAction += DeleteObj; + } + + private void TeleportToObj(NetEntity nent) + { + _console.ExecuteCommand($"tpto {nent}"); + } + + private void DeleteObj(NetEntity nent) + { + _console.ExecuteCommand($"delete {nent}"); } protected override void FrameUpdate(FrameEventArgs args) @@ -129,7 +147,7 @@ private void GenerateButton(ListData data, ListContainerButton button) if (data is not ObjectsListData { Info: var info, BackgroundColor: var backgroundColor }) return; - var entry = new ObjectsTabEntry(info.Name, info.Entity, new StyleBoxFlat { BackgroundColor = backgroundColor }); + var entry = new ObjectsTabEntry(info.Name, info.Entity, new StyleBoxFlat { BackgroundColor = backgroundColor }, TeleportToObjAction, DeleteObjAction); button.ToolTip = $"{info.Name}, {info.Entity}"; button.OnKeyBindDown += args => OnEntryKeyBindDown?.Invoke(args, data); diff --git a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml index 83c4cc5697f..8b7a2055c26 100644 --- a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml +++ b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTabEntry.xaml @@ -13,5 +13,17 @@ SizeFlagsStretchRatio="3" HorizontalExpand="True" ClipText="True"/> + +