Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Upstream] Апстрим фич и фиксов с Einstein Engines. #39

Merged
merged 101 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
bde40c6
Remove the Stupid Station Records Check From News (#739)
Mnemotechnician Aug 18, 2024
3d2f48b
Morale System (Port From White Dream) (#620)
VMSolidus Aug 20, 2024
86af2ff
Automatic Changelog Update (#739)
SimpleStation14 Aug 18, 2024
218f66f
Automatic Changelog Update (#620)
SimpleStation14 Aug 20, 2024
78671a5
Psionic Refactor Version 2, Part 1 (#731)
VMSolidus Aug 20, 2024
4e15bf9
Automatic Changelog Update (#731)
SimpleStation14 Aug 20, 2024
a2b85e1
Fix Overlays (#756)
VMSolidus Aug 20, 2024
6d0deaa
Automatic Changelog Update (#756)
SimpleStation14 Aug 20, 2024
54c199d
Missing Psychic Trait Strings (#758)
VMSolidus Aug 20, 2024
fbb67ae
Action Blacklists (#760)
VMSolidus Aug 21, 2024
ea02dca
Automatic Changelog Update (#760)
SimpleStation14 Aug 21, 2024
1a31f4d
Psionic Powers Add Components With Arguments. (#763)
VMSolidus Aug 21, 2024
74a491c
Automatic Changelog Update (#763)
SimpleStation14 Aug 21, 2024
f4bcf05
DeltaV/DS14 IPC Port (#744)
Timemaster99 Aug 21, 2024
9d7f06e
Automatic Changelog Update (#744)
SimpleStation14 Aug 21, 2024
8bf3279
Update MoodSystem.cs (#761)
VMSolidus Aug 21, 2024
433073f
Traits Refactor (#765)
VMSolidus Aug 21, 2024
7b655ba
Automatic Changelog Update (#765)
SimpleStation14 Aug 21, 2024
1a7b3f7
Made Stamres Show in Resistances View Take 2 (#767)
whateverusername0 Aug 21, 2024
0c2023b
Minor Ifrit Health Rework (#762)
stellar-novas Aug 21, 2024
ba1142d
Automatic Changelog Update (#762)
SimpleStation14 Aug 21, 2024
a45a62a
Xenoglossy (#772)
Elijahrane Aug 22, 2024
0fd2173
Automatic Changelog Update (#772)
SimpleStation14 Aug 22, 2024
a868c61
Increase Trait Point Granularity (#775)
VMSolidus Aug 22, 2024
5b7135a
Automatic Changelog Update (#775)
SimpleStation14 Aug 22, 2024
e5f6f76
Fix Heisentests (#778)
VMSolidus Aug 22, 2024
3e690be
Fix RGB Moths (#777)
VMSolidus Aug 22, 2024
dbf750d
Automatic Changelog Update (#777)
SimpleStation14 Aug 22, 2024
873a17e
Remove DV AGPL License Headers (#781)
DEATHB4DEFEAT Aug 22, 2024
faa1381
Return Of The Cataloguer (#779)
VMSolidus Aug 22, 2024
815985a
Automatic Changelog Update (#779)
SimpleStation14 Aug 22, 2024
91c7719
Psionic Power Feedback Messages (#776)
VMSolidus Aug 22, 2024
6d766a9
Automatic Changelog Update (#776)
SimpleStation14 Aug 22, 2024
a3606b5
Allow Playing Multiple Announcement Sounds at Once (#740)
DEATHB4DEFEAT Aug 22, 2024
966c7cd
Automatic Changelog Update (#740)
SimpleStation14 Aug 22, 2024
e229383
Add Insulation to Robots (#773)
VMSolidus Aug 23, 2024
bdb0c59
Implement Mind Contests (#757)
VMSolidus Aug 23, 2024
649828e
Added Language and Healing Components to IPC Entities (#786)
v0idRift Aug 23, 2024
257ad20
Automatic Changelog Update (#786)
SimpleStation14 Aug 23, 2024
fd45f09
Fix supermatter.ftl (#790)
FoxxoTrystan Aug 24, 2024
873ac28
Automatic Changelog Update (#790)
SimpleStation14 Aug 24, 2024
929f054
Fix Door Access (#798)
Fansana Aug 25, 2024
872544b
Automatic Changelog Update (#798)
SimpleStation14 Aug 25, 2024
8ac78f9
Cherry-Pick PR #27113 (#803)
VMSolidus Aug 26, 2024
c2bdad8
Automatic Changelog Update (#803)
SimpleStation14 Aug 26, 2024
80ed9ec
Return Of The Pibble (#789)
VMSolidus Aug 27, 2024
ca42203
Automatic Changelog Update (#789)
SimpleStation14 Aug 27, 2024
aed1e52
Make IPC Sounds Great Again (#811)
BasedUser Aug 29, 2024
b006a11
Automatic Changelog Update (#811)
SimpleStation14 Aug 29, 2024
9a5135f
Add IPC's Missing Components (#793)
VMSolidus Aug 29, 2024
2737003
Automatic Changelog Update (#793)
SimpleStation14 Aug 29, 2024
f8665dc
Temporarily Disable Telegnosis (#795)
VMSolidus Aug 30, 2024
4e5b98e
Automatic Changelog Update (#795)
SimpleStation14 Aug 30, 2024
d905f36
IPC Missing Deathgasp (#800)
VMSolidus Aug 30, 2024
e2a92b5
Automatic Changelog Update (#800)
SimpleStation14 Aug 30, 2024
d98a8e4
Make Shoving and Stamina Great Again (#809)
Mnemotechnician Aug 30, 2024
e849782
Automatic Changelog Update (#809)
SimpleStation14 Aug 30, 2024
6873ecb
Thieves Outside of Traitor (#799)
ShatteredSwords Aug 30, 2024
f3ff0c4
Automatic Changelog Update (#799)
SimpleStation14 Aug 30, 2024
c2d14e6
Telepathy (Minor)Refactor (#819)
VMSolidus Aug 30, 2024
12daf99
Automatic Changelog Update (#819)
SimpleStation14 Aug 30, 2024
7391d37
Psionic Insulation Trait (#820)
VMSolidus Aug 30, 2024
ff7472a
Automatic Changelog Update (#820)
SimpleStation14 Aug 30, 2024
0a2db6d
New Interaction System (#733)
Mnemotechnician Aug 30, 2024
2e185bc
Automatic Changelog Update (#733)
SimpleStation14 Aug 30, 2024
71c52cf
feat: translation for new interaction system
Remuchi Sep 2, 2024
2503dce
fix: fix interaction system changing state action to ours
Remuchi Sep 2, 2024
5c1bda8
Glacier Real (#1169) (#728)
VMSolidus Aug 30, 2024
339147a
Automatic Changelog Update (#728)
SimpleStation14 Aug 30, 2024
3dc4c44
Rebase Saltern (#804)
VMSolidus Aug 30, 2024
9fb0495
Automatic Changelog Update (#804)
SimpleStation14 Aug 30, 2024
7ada0e0
Core Supermatter (#792)
VMSolidus Aug 30, 2024
ed87ba0
Automatic Changelog Update (#792)
SimpleStation14 Aug 30, 2024
954ae63
Fix InnatePsionicPowers For Mapped Entities (#824)
VMSolidus Aug 31, 2024
ef64efa
Automatic Changelog Update (#824)
SimpleStation14 Aug 31, 2024
e280dcd
Update Credits (#837)
github-actions[bot] Sep 1, 2024
2987adf
Disable Mood In Debug (#806)
VMSolidus Sep 1, 2024
b04b2e8
Diagonal Window Smoothing (#805)
VMSolidus Sep 1, 2024
0250eab
Automatic Changelog Update (#805)
SimpleStation14 Sep 1, 2024
139d319
Maximize Default Description Limits (#788)
VMSolidus Sep 1, 2024
663cdab
Automatic Changelog Update (#788)
SimpleStation14 Sep 1, 2024
7811ee2
Bot for Changelog (#833)
Evgencheg Sep 1, 2024
49973ce
Update actions_changelogs_since_last_run.py (#841)
DEATHB4DEFEAT Sep 1, 2024
012721d
Added Jukebox (#26736) (#802)
DJB1gYAPPA Sep 2, 2024
c0d7282
Automatic Changelog Update (#802)
SimpleStation14 Sep 2, 2024
787ec49
remove: wrong changelog
Remuchi Sep 2, 2024
cd565bd
remove: wrong changelog
Remuchi Sep 2, 2024
2b913e2
fix: a few more incorrect translations
Remuchi Sep 2, 2024
4823ec3
Psionic Extraplanar Creatures (#829)
VMSolidus Sep 2, 2024
a26e93a
Automatic Changelog Update (#829)
SimpleStation14 Sep 2, 2024
61916fe
Cloning Refactor (#735)
VMSolidus Sep 2, 2024
c6b1fca
Automatic Changelog Update (#735)
SimpleStation14 Sep 2, 2024
6770dac
Delete All Then Ghost Fault Tolerance (#787)
VMSolidus Sep 2, 2024
5ac9e5f
Update Issue Templates (#797)
stellar-novas Sep 2, 2024
5536684
Add PR URL to Changelogs and Make Author a Header (#843)
DEATHB4DEFEAT Sep 2, 2024
0b9a63d
Automatic Changelog Update (#843)
SimpleStation14 Sep 2, 2024
616d0e4
Update actions_changelogs_since_last_run.py (#846)
DEATHB4DEFEAT Sep 2, 2024
9d82540
Psychognomy (#808)
Elijahrane Sep 3, 2024
612abe2
Automatic Changelog Update (#808)
SimpleStation14 Sep 3, 2024
8e9ecf7
Merge remote-tracking branch 'origin/master' into upstream
Remuchi Sep 5, 2024
094a2f4
Merge remote-tracking branch 'origin/master' into upstream
Remuchi Sep 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -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: ''

---
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/issue_report.md
Original file line number Diff line number Diff line change
@@ -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: ''

---
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
CHANGELOG_DIR: ${{ vars.CHANGELOG_DIR }}
PR_NUMBER: ${{ github.event.number }}
CHANGELOG_WEBHOOK: ${{ secrets.CHANGELOG_WEBHOOK }}

jobs:
changelog:
Expand Down Expand Up @@ -54,3 +55,7 @@ jobs:
git push
shell: bash
continue-on-error: true

- name: Publish changelog
run: Tools/actions_changelogs_since_last_run.py
continue-on-error: true
1 change: 1 addition & 0 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private void OnEntityTargetHandleState(EntityUid uid, EntityTargetActionComponen
return;

component.Whitelist = state.Whitelist;
component.Blacklist = state.Blacklist;
component.CanTargetSelf = state.CanTargetSelf;
BaseHandleState<EntityTargetActionComponent>(uid, component, state);
}
Expand Down
53 changes: 42 additions & 11 deletions Content.Client/Announcements/Systems/AnnouncerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Linq;
using Content.Client.Audio;
using Content.Shared.Announcements.Events;
using Content.Shared.Announcements.Systems;
Expand All @@ -18,8 +19,8 @@ public sealed class AnnouncerSystem : SharedAnnouncerSystem
[Dependency] private readonly IResourceCache _cache = default!;
[Dependency] private readonly IAudioManager _audioManager = default!;

private IAudioSource? AnnouncerSource { get; set; }
private float AnnouncerVolume { get; set; }
public List<IAudioSource> AnnouncerSources { get; } = new();
public float AnnouncerVolume { get; private set; }


public override void Initialize()
Expand All @@ -28,26 +29,42 @@ public override void Initialize()

AnnouncerVolume = _config.GetCVar(CCVars.AnnouncerVolume) * 100f / ContentAudioSystem.AnnouncerMultiplier;

SubscribeNetworkEvent<AnnouncementSendEvent>(OnAnnouncementReceived);
_config.OnValueChanged(CCVars.AnnouncerVolume, OnAnnouncerVolumeChanged);
_config.OnValueChanged(CCVars.AnnouncerDisableMultipleSounds, OnAnnouncerDisableMultipleSounds);

SubscribeNetworkEvent<AnnouncementSendEvent>(OnAnnouncementReceived);
}

public override void Shutdown()
{
base.Shutdown();

_config.UnsubValueChanged(CCVars.AnnouncerVolume, OnAnnouncerVolumeChanged);
_config.UnsubValueChanged(CCVars.AnnouncerDisableMultipleSounds, OnAnnouncerDisableMultipleSounds);
}


private void OnAnnouncerVolumeChanged(float value)
{
AnnouncerVolume = value;

if (AnnouncerSource != null)
AnnouncerSource.Gain = AnnouncerVolume;
foreach (var source in AnnouncerSources)
source.Gain = AnnouncerVolume;
}

private void OnAnnouncerDisableMultipleSounds(bool value)
{
if (!value)
return;

foreach (var audioSource in AnnouncerSources.ToList())
{
audioSource.Dispose();
AnnouncerSources.Remove(audioSource);
}
}


private void OnAnnouncementReceived(AnnouncementSendEvent ev)
{
if (!ev.Recipients.Contains(_player.LocalSession!.UserId)
Expand All @@ -56,14 +73,28 @@ private void OnAnnouncementReceived(AnnouncementSendEvent ev)
return;

var source = _audioManager.CreateAudioSource(resource);
if (source != null)
if (source == null)
return;

source.Gain = AnnouncerVolume * SharedAudioSystem.VolumeToGain(ev.AudioParams.Volume);
source.Global = true;

if (_config.GetCVar(CCVars.AnnouncerDisableMultipleSounds))
{
foreach (var audioSource in AnnouncerSources.ToList())
{
audioSource.Dispose();
AnnouncerSources.Remove(audioSource);
}
}

foreach (var audioSource in AnnouncerSources.ToList().Where(audioSource => !audioSource.Playing))
{
source.Gain = AnnouncerVolume * SharedAudioSystem.VolumeToGain(ev.AudioParams.Volume);
source.Global = true;
audioSource.Dispose();
AnnouncerSources.Remove(audioSource);
}

AnnouncerSource?.Dispose();
AnnouncerSource = source;
AnnouncerSource?.StartPlaying();
AnnouncerSources.Add(source);
source.StartPlaying();
}
}
119 changes: 119 additions & 0 deletions Content.Client/Audio/Jukebox/JukeboxBoundUserInterface.cs
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;
}
}

18 changes: 18 additions & 0 deletions Content.Client/Audio/Jukebox/JukeboxMenu.xaml
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>
Loading
Loading