-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:SpicyDarkFox/LPP_verse
- Loading branch information
Showing
639 changed files
with
2,345 additions
and
5,661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
contact_links: | ||
- name: Report a Security Vulnerability | ||
- name: Сообщить об уязвимости | ||
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. | ||
about: Пожалуйста, сообщайте о серьезных эксплойтах и уязвимостях безопасности. | ||
- name: Предложение | ||
url: https://discord.gg/v5mGmMzAdB | ||
about: Свои предложения можете оставлять в соответствующем канале Discord. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,40 @@ | ||
**Описание обновления:** | ||
<!-- ЭТО ШАБЛОН ВАШЕГО PULL REQUEST. Текст между стрелками - это комментарии - они не будут видны в PR. --> | ||
# VIVA LA LOST PARADISE! | ||
![image](https://i.imgur.com/hLEDvQY.png) | ||
|
||
## Описание обновления: | ||
<!-- Например. | ||
Я изменил все текстуры дверей на новые кроме, дверей ЦК и Адвоката. | ||
Добавил возможность развести костёр кликая заженной спичкой по бревну.--> | ||
|
||
**Медиа** | ||
<!-- Если приемлемо, добавьте скриншоты для демонстрации вашего PR. Если ваш PR представляет собой визуальное изменение, добавьте | ||
скриншоты, иначе он может быть закрыт. --> | ||
|
||
**Причина/Для чего** | ||
<!-- Описывайте здесь зачем и по какой причине сделано данное обновление --> | ||
**Проверки** | ||
<!-- Выполнение всех следующих действий, если это приемлемо для вида изменений сильно ускорит разбор вашего PR --> | ||
- [ ] PR завершён и мне не нужна помощь чтобы его закончить. | ||
- [ ] Я внимательно просмотрел все свои изменения и багов в них не нашёл. | ||
- [ ] Я запускал локальный сервер со своими изменениями и всё протестировал. | ||
- [ ] Я добавил скриншот/видео демонстрации PR в игре, **или** этот PR этого не требует. | ||
- [ ] Я не добавлял контент нарушающий чужие авторские права. | ||
|
||
**Изменения** | ||
|
||
<!-- | ||
:cl: *Ваше имя. Можно и на русском* | ||
- add: Добавлено *Что конкретно*. | ||
- remove: Убрано *Что конкретно*. | ||
- tweak: Изменено *Что конкретно*. | ||
- fix: Исправлено *Что конкретно*. | ||
Здесь вы можете написать список изменений, который будет автоматически добавлен в игру, когда ваш PR будет принят. | ||
В журнал изменений следует помещать только то, что действительно важно игрокам. | ||
В списке изменений тип значка не является часть предложения, поэтому явно указывайте - Добавлен, Удалён, Изменён. | ||
плохо: - add: Новый инструмент для инженеров | ||
хорошо: - add: Добавлен новый инструмент для инженеров | ||
Вы можете указать своё имя после символа :cl: именно оно будет отображаться в журнале изменений (иначе будет использоваться ваше имя на GitHub) | ||
Например: :cl: Клоун | ||
--> | ||
|
||
**Медиа** | ||
<!-- Скрины или видео после этого пункта. Под ними ничего не дополнять!--> | ||
:cl: Клоун | ||
- add: Добавлено веселье! | ||
- remove: Убрано веселье! | ||
- tweak: Изменено веселье! | ||
- fix: Исправлено веселье! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
name: Check Merge Conflicts | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request_target: | ||
|
||
jobs: | ||
Label: | ||
if: github.actor != 'PJBot' && github.actor != 'DeltaV-Bot' && github.actor != 'SimpleStation14' | ||
if: github.actor != 'PJBot' && github.actor != 'DeltaV-Bot' && github.actor != 'SimpleStation14' != 'Lost-Paradise-Bot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for Merge Conflicts | ||
uses: ike709/actions-label-merge-conflict@9eefdd17e10566023c46d2dc6dc04fcb8ec76142 | ||
with: | ||
dirtyLabel: "Status: Merge Conflict" | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request." | ||
dirtyLabel: "Статус: Конфликт" | ||
repoToken: "${{ secrets.BOT_TOKEN }}" | ||
commentOnDirty: "В этом ПР'е есть конфликты, пожалуйста, устраните их, прежде чем мы сможем оценить ваш ПР." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
name: "Labels: Review" | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request_target: | ||
types: [review_requested] | ||
|
||
jobs: | ||
add_label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
with: | ||
labels: "Status: Needs Review" | ||
labels: "Статус: Требуется одобрение" | ||
repo-token: "${{ secrets.BOT_TOKEN }}" | ||
- uses: actions-ecosystem/action-remove-labels@v1 | ||
with: | ||
labels: "Status: Awaiting Changes" | ||
labels: "Статус: Ожидание изменений" | ||
repo-token: "${{ secrets.BOT_TOKEN }}" |
119 changes: 119 additions & 0 deletions
119
Content.Client/Audio/Jukebox/JukeboxBoundUserInterface.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
using Content.Shared.Audio.Jukebox; | ||
using Robust.Client.Audio; | ||
using Robust.Client.Player; | ||
using Robust.Shared.Audio.Components; | ||
using Robust.Shared.Player; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Client.Audio.Jukebox; | ||
|
||
public sealed class JukeboxBoundUserInterface : BoundUserInterface | ||
{ | ||
[Dependency] private readonly IPlayerManager _player = default!; | ||
[Dependency] private readonly IPrototypeManager _protoManager = default!; | ||
|
||
[ViewVariables] | ||
private JukeboxMenu? _menu; | ||
|
||
public JukeboxBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) | ||
{ | ||
IoCManager.InjectDependencies(this); | ||
} | ||
|
||
protected override void Open() | ||
{ | ||
base.Open(); | ||
|
||
_menu = new JukeboxMenu(); | ||
_menu.OnClose += Close; | ||
_menu.OpenCentered(); | ||
|
||
_menu.OnPlayPressed += args => | ||
{ | ||
if (args) | ||
{ | ||
SendMessage(new JukeboxPlayingMessage()); | ||
} | ||
else | ||
{ | ||
SendMessage(new JukeboxPauseMessage()); | ||
} | ||
}; | ||
|
||
_menu.OnStopPressed += () => | ||
{ | ||
SendMessage(new JukeboxStopMessage()); | ||
}; | ||
|
||
_menu.OnSongSelected += SelectSong; | ||
|
||
_menu.SetTime += SetTime; | ||
PopulateMusic(); | ||
Reload(); | ||
} | ||
|
||
/// <summary> | ||
/// Reloads the attached menu if it exists. | ||
/// </summary> | ||
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<AudioSystem>().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<JukeboxPrototype>()); | ||
} | ||
|
||
public void SelectSong(ProtoId<JukeboxPrototype> 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; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<ui:FancyWindow xmlns="https://spacestation14.io" xmlns:ui="clr-namespace:Content.Client.UserInterface.Controls" | ||
SetSize="400 500" Title="{Loc 'jukebox-menu-title'}"> | ||
<BoxContainer Margin="4 0" Orientation="Vertical"> | ||
<ItemList Name="MusicList" SelectMode="Button" Margin="3 3 3 3" | ||
HorizontalExpand="True" VerticalExpand="True" SizeFlagsStretchRatio="8"/> | ||
<BoxContainer Orientation="Vertical"> | ||
<Label Name="SongSelected" Text="{Loc 'jukebox-menu-selectedsong'}" /> | ||
<Label Name="SongName" Text="---" /> | ||
<Slider Name="PlaybackSlider" HorizontalExpand="True" /> | ||
</BoxContainer> | ||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True" | ||
VerticalExpand="False" SizeFlagsStretchRatio="1"> | ||
<Button Name="PlayButton" Text="{Loc 'jukebox-menu-buttonplay'}" /> | ||
<Button Name="StopButton" Text="{Loc 'jukebox-menu-buttonstop'}" /> | ||
<Label Name="DurationLabel" Text="00:00 / 00:00" HorizontalAlignment="Right" HorizontalExpand="True"/> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</ui:FancyWindow> |
Oops, something went wrong.