diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 7ff9017cb0d..00000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -contact_links: - - name: Report a Security Vulnerability - url: https://github.com/space-wizards/space-station-14/blob/master/SECURITY.md - about: Please report security vulnerabilities to the Space Wizards privately so they can fix them before they are publicly disclosed. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index aba549332f5..51f9de8baf5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,8 +1,8 @@ --- -name: Request a Feature -about: "Template for noting future planned features. Please ask for approval in the Discord if you aren't an organization Member before posting a feature request" +name: Request a feature +about: "Please outline your request in Discord first if you aren't a maintainer." title: '' -labels: '' +labels: ["Type: Feature"] assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/issue_report.md b/.github/ISSUE_TEMPLATE/issue_report.md index ab821811973..c74f24554ad 100644 --- a/.github/ISSUE_TEMPLATE/issue_report.md +++ b/.github/ISSUE_TEMPLATE/issue_report.md @@ -1,8 +1,8 @@ --- -name: Report an Issue -about: "Any general issues you have during play or with the codebase" +name: Report an issue +about: "Any issues found in gameplay or the codebase" title: '' -labels: '' +labels: 'Type: Bug' assignees: '' --- diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 877273d7645..79cfdd83cde 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -16,41 +16,40 @@ jobs: permissions: contents: write steps: - - name: Checkout Master - uses: actions/checkout@v3 - with: - token: ${{ secrets.BOT_TOKEN }} - ref: "${{ vars.CHANGELOG_BRANCH }}" + - name: Checkout Master + uses: actions/checkout@v3 + with: + token: ${{ secrets.BOT_TOKEN }} + ref: ${{ vars.CHANGELOG_BRANCH }} - - name: Setup Git - run: | - git config --global user.name "${{ vars.CHANGELOG_USER }}" - git config --global user.email "${{ vars.CHANGELOG_EMAIL }}" - shell: bash + - name: Setup Git + run: | + git config --global user.name "${{ vars.CHANGELOG_USER }}" + git config --global user.email "${{ vars.CHANGELOG_EMAIL }}" + shell: bash - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: 18.x + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18.x - - name: Install Dependencies - run: | - cd "Tools/changelogs" - npm install - shell: bash - continue-on-error: true + - name: Install Dependencies + run: | + cd "Tools/changelogs" + npm install + shell: bash - - name: Generate Changelog - run: | - cd "Tools/changelogs" - node changelog.js - shell: bash - continue-on-error: true + - name: Generate Changelog + run: | + cd "Tools/changelogs" + node changelog.js + shell: bash - - name: Commit Changelog - run: | - git add *.yml - git commit -m "${{ vars.CHANGELOG_MESSAGE }} (#${{ env.PR_NUMBER }})" - git push - shell: bash - continue-on-error: true + - name: Commit Changelog + run: | + git pull origin master + git add *.yml + git commit -m "${{ vars.CHANGELOG_MESSAGE }} (#${{ env.PR_NUMBER }})" + git push + shell: bash + continue-on-error: true diff --git a/.github/workflows/discord-changelog.yml b/.github/workflows/discord-changelog.yml new file mode 100644 index 00000000000..74be4154320 --- /dev/null +++ b/.github/workflows/discord-changelog.yml @@ -0,0 +1,24 @@ +name: Discord Changelog + +on: + workflow_dispatch: + schedule: + - cron: '0 6 * * *' + +jobs: + publish_changelog: + runs-on: ubuntu-latest + steps: + + - name: checkout + uses: actions/checkout@v3 + with: + ref: master + + - name: Publish changelog + run: Tools/actions_changelogs_since_last_run.py + env: + CHANGELOG_DIR: ${{ vars.CHANGELOG_DIR }} + CHANGELOG_WEBHOOK: ${{ secrets.CHANGELOG_WEBHOOK }} + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + continue-on-error: true diff --git a/Content.Client/Administration/UI/AdminUIHelpers.cs b/Content.Client/Administration/UI/AdminUIHelpers.cs index 89ab33e931d..7fa81728910 100644 --- a/Content.Client/Administration/UI/AdminUIHelpers.cs +++ b/Content.Client/Administration/UI/AdminUIHelpers.cs @@ -50,7 +50,7 @@ public static bool TryConfirm(Button button, Dictionary + { + if (args) + { + SendMessage(new JukeboxPlayingMessage()); + } + else + { + SendMessage(new JukeboxPauseMessage()); + } + }; + + _menu.OnStopPressed += () => + { + SendMessage(new JukeboxStopMessage()); + }; + + _menu.OnSongSelected += SelectSong; + + _menu.SetTime += SetTime; + PopulateMusic(); + Reload(); + } + + /// + /// Reloads the attached menu if it exists. + /// + public void Reload() + { + if (_menu == null || !EntMan.TryGetComponent(Owner, out JukeboxComponent? jukebox)) + return; + + _menu.SetAudioStream(jukebox.AudioStream); + + if (_protoManager.TryIndex(jukebox.SelectedSongId, out var songProto)) + { + var length = EntMan.System().GetAudioLength(songProto.Path.Path.ToString()); + _menu.SetSelectedSong(songProto.Name, (float) length.TotalSeconds); + } + else + { + _menu.SetSelectedSong(string.Empty, 0f); + } + } + + public void PopulateMusic() + { + _menu?.Populate(_protoManager.EnumeratePrototypes()); + } + + public void SelectSong(ProtoId songid) + { + SendMessage(new JukeboxSelectedMessage(songid)); + } + + public void SetTime(float time) + { + var sentTime = time; + + // You may be wondering, what the fuck is this + // Well we want to be able to predict the playback slider change, of which there are many ways to do it + // We can't just use SendPredictedMessage because it will reset every tick and audio updates every frame + // so it will go BRRRRT + // Using ping gets us close enough that it SHOULD, MOST OF THE TIME, fall within the 0.1 second tolerance + // that's still on engine so our playback position never gets corrected. + if (EntMan.TryGetComponent(Owner, out JukeboxComponent? jukebox) && + EntMan.TryGetComponent(jukebox.AudioStream, out AudioComponent? audioComp)) + { + audioComp.PlaybackPosition = time; + } + + SendMessage(new JukeboxSetTimeMessage(sentTime)); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + if (_menu == null) + return; + + _menu.OnClose -= Close; + _menu.Dispose(); + _menu = null; + } +} + diff --git a/Content.Client/Audio/Jukebox/JukeboxMenu.xaml b/Content.Client/Audio/Jukebox/JukeboxMenu.xaml new file mode 100644 index 00000000000..e8d39a9b119 --- /dev/null +++ b/Content.Client/Audio/Jukebox/JukeboxMenu.xaml @@ -0,0 +1,18 @@ + + + + + + +