Skip to content

Commit

Permalink
Merge pull request Rxup#694 from Rxup/upstream-sync
Browse files Browse the repository at this point in the history
Upstream sync
  • Loading branch information
Rxup authored Jul 18, 2024
2 parents 19f0fea + 3596758 commit 26d9830
Show file tree
Hide file tree
Showing 257 changed files with 22,182 additions and 22,397 deletions.
9 changes: 8 additions & 1 deletion Content.Client/Access/UI/AccessLevelControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ namespace Content.Client.Access.UI;
[GenerateTypedNameReferences]
public sealed partial class AccessLevelControl : GridContainer
{
[Dependency] private readonly ILogManager _logManager = default!;

private ISawmill _sawmill = default!;

public readonly Dictionary<ProtoId<AccessLevelPrototype>, Button> ButtonsList = new();

public AccessLevelControl()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);

_sawmill = _logManager.GetSawmill("accesslevelcontrol");
}

public void Populate(List<ProtoId<AccessLevelPrototype>> accessLevels, IPrototypeManager prototypeManager)
Expand All @@ -25,7 +32,7 @@ public void Populate(List<ProtoId<AccessLevelPrototype>> accessLevels, IPrototyp
{
if (!prototypeManager.TryIndex(access, out var accessLevel))
{
Logger.Error($"Unable to find accesslevel for {access}");
_sawmill.Error($"Unable to find accesslevel for {access}");
continue;
}

Expand Down
12 changes: 10 additions & 2 deletions Content.Client/Audio/AudioUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private void SetClickSound(string value)
{
if (!string.IsNullOrEmpty(value))
{
var resource = _cache.GetResource<AudioResource>(value);
var resource = GetSoundOrFallback(value, CCVars.UIClickSound.DefaultValue);
var source =
_audioManager.CreateAudioSource(resource);

Expand All @@ -77,7 +77,7 @@ private void SetHoverSound(string value)
{
if (!string.IsNullOrEmpty(value))
{
var hoverResource = _cache.GetResource<AudioResource>(value);
var hoverResource = GetSoundOrFallback(value, CCVars.UIHoverSound.DefaultValue);
var hoverSource =
_audioManager.CreateAudioSource(hoverResource);

Expand All @@ -95,4 +95,12 @@ private void SetHoverSound(string value)
UIManager.SetHoverSound(null);
}
}

private AudioResource GetSoundOrFallback(string path, string fallback)
{
if (!_cache.TryGetResource(path, out AudioResource? resource))
return _cache.GetResource<AudioResource>(fallback);

return resource;
}
}
1 change: 1 addition & 0 deletions Content.Client/Audio/ContentAudioSystem.AmbientMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Content.Shared.CCVar;
using Content.Shared.GameTicking;
using Content.Shared.Random;
using Content.Shared.Random.Rules;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Client.ResourceManagement;
Expand Down
113 changes: 0 additions & 113 deletions Content.Client/Backmen/Ghost/Roles/GhostRoleRollerSystem.cs

This file was deleted.

18 changes: 0 additions & 18 deletions Content.Client/Backmen/Ghost/Roles/UI/RollerPopup.xaml

This file was deleted.

104 changes: 0 additions & 104 deletions Content.Client/Backmen/Ghost/Roles/UI/RollerPopup.xaml.cs

This file was deleted.

17 changes: 0 additions & 17 deletions Content.Client/Backmen/Ghost/Roles/UI/RollerRow.cs

This file was deleted.

18 changes: 0 additions & 18 deletions Content.Client/Backmen/Ghost/Roles/UI/RollerRow.xaml

This file was deleted.

3 changes: 0 additions & 3 deletions Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<Compile Update="Backmen\Economy\WageConsole\UI\BonusWageWindow.cs">
<DependentUpon>BonusWageWindow.xaml</DependentUpon>
</Compile>
<Compile Update="Backmen\Ghost\Roles\UI\RollerRow.cs">
<DependentUpon>RollerRow.xaml</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<Import Project="..\RobustToolbox\MSBuild\XamlIL.targets" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Content.Shared.Research;
using Content.Shared.Research.Components;
using Robust.Client.GameObjects;

namespace Content.Client.Research.UI
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Content.Shared.Research.Components;
using Robust.Client.GameObjects;

namespace Content.Client.Research.UI
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Content.Shared.Research.Components;
using JetBrains.Annotations;
using Robust.Client.GameObjects;

namespace Content.Client.Research.UI;

Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Research/UI/ResearchConsoleMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void UpdatePanels(ResearchConsoleBoundInterfaceState state)
public void UpdateInformationPanel(ResearchConsoleBoundInterfaceState state)
{
var amountMsg = new FormattedMessage();
amountMsg.AddMarkup(Loc.GetString("research-console-menu-research-points-text",
amountMsg.AddMarkupOrThrow(Loc.GetString("research-console-menu-research-points-text",
("points", state.Points)));
ResearchAmountLabel.SetMessage(amountMsg);

Expand All @@ -98,7 +98,7 @@ public void UpdateInformationPanel(ResearchConsoleBoundInterfaceState state)
}

var msg = new FormattedMessage();
msg.AddMarkup(Loc.GetString("research-console-menu-main-discipline",
msg.AddMarkupOrThrow(Loc.GetString("research-console-menu-main-discipline",
("name", disciplineText), ("color", disciplineColor)));
MainDisciplineLabel.SetMessage(msg);

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Research/UI/TechnologyCardControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public TechnologyCardControl(TechnologyPrototype technology, IPrototypeManager p
DisciplineTexture.Texture = spriteSys.Frame0(discipline.Icon);
TechnologyNameLabel.Text = Loc.GetString(technology.Name);
var message = new FormattedMessage();
message.AddMarkup(Loc.GetString("research-console-tier-discipline-info",
message.AddMarkupOrThrow(Loc.GetString("research-console-tier-discipline-info",
("tier", technology.Tier), ("color", discipline.Color), ("discipline", Loc.GetString(discipline.Name))));
TierLabel.SetMessage(message);
UnlocksLabel.SetMessage(description);
Expand Down
Loading

0 comments on commit 26d9830

Please sign in to comment.