Skip to content

Commit

Permalink
Merge branch 'upstream-may' into upstream-may
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemirda authored Jun 5, 2024
2 parents 6ea8607 + ca1d946 commit edca093
Show file tree
Hide file tree
Showing 175 changed files with 110,929 additions and 118,392 deletions.
8 changes: 4 additions & 4 deletions Content.Client/Chat/UI/EmotesMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
MinSize="450 450">

<!-- Main -->
<ui:RadialContainer Name="Main" VerticalExpand="True" HorizontalExpand="True" Radius="64" ReserveSpaceForHiddenChildren="False">
<ui:RadialContainer Name="Main" VerticalExpand="True" HorizontalExpand="True" Radius="80" ReserveSpaceForHiddenChildren="False"> <!-- A-13 emo fix -->
<ui:RadialMenuTextureButton StyleClasses="RadialMenuButton" SetSize="64 64" ToolTip="{Loc 'emote-menu-category-general'}" TargetLayer="General" Visible="False">
<TextureRect VerticalAlignment="Center" HorizontalAlignment="Center" TextureScale="2 2" TexturePath="/Textures/Clothing/Head/Soft/mimesoft.rsi/icon.png"/>
</ui:RadialMenuTextureButton>
Expand All @@ -20,12 +20,12 @@
</ui:RadialContainer>

<!-- General -->
<ui:RadialContainer Name="General" VerticalExpand="True" HorizontalExpand="True" Radius="64"/>
<ui:RadialContainer Name="General" VerticalExpand="True" HorizontalExpand="True" Radius="80"/> <!-- A-13 emo fix -->

<!-- Vocal -->
<ui:RadialContainer Name="Vocal" VerticalExpand="True" HorizontalExpand="True" Radius="64"/>
<ui:RadialContainer Name="Vocal" VerticalExpand="True" HorizontalExpand="True" Radius="80"/> <!-- A-13 emo fix -->

<!-- Hands -->
<ui:RadialContainer Name="Hands" VerticalExpand="True" HorizontalExpand="True" Radius="64"/>
<ui:RadialContainer Name="Hands" VerticalExpand="True" HorizontalExpand="True" Radius="80"/> <!-- A-13 emo fix -->

</ui:RadialMenu>
2 changes: 2 additions & 0 deletions Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<ProjectReference Include="..\RobustToolbox\Robust.Shared\Robust.Shared.csproj" />
<ProjectReference Include="..\RobustToolbox\Robust.Client\Robust.Client.csproj" />
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
<ProjectReference Include="..\Corvax\Content.Corvax.Interfaces.Shared\Content.Corvax.Interfaces.Shared.csproj" />
<ProjectReference Include="..\Corvax\Content.Corvax.Interfaces.Client\Content.Corvax.Interfaces.Client.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Spawners\" />
Expand Down
26 changes: 0 additions & 26 deletions Content.Client/Corvax/JoinQueue/JoinQueueManager.cs

This file was deleted.

34 changes: 0 additions & 34 deletions Content.Client/Corvax/JoinQueue/QueueGui.xaml

This file was deleted.

41 changes: 0 additions & 41 deletions Content.Client/Corvax/JoinQueue/QueueGui.xaml.cs

This file was deleted.

54 changes: 0 additions & 54 deletions Content.Client/Corvax/JoinQueue/QueueState.cs

This file was deleted.

23 changes: 0 additions & 23 deletions Content.Client/Corvax/Sponsors/SponsorsManager.cs

This file was deleted.

36 changes: 10 additions & 26 deletions Content.Client/Corvax/TTS/HumanoidProfileEditor.TTS.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
using System.Linq;
using Content.Client.Corvax.Sponsors;
using Content.Client.Corvax.TTS;
using Content.Client.Lobby;
// using Content.Corvax.Interfaces.Shared; //A-13 disable
using Content.Corvax.Interfaces.Shared;
using Content.Shared.Corvax.TTS;
using Content.Shared.Preferences;
using Robust.Shared.Random;

namespace Content.Client.Lobby.UI;

public sealed partial class HumanoidProfileEditor
{
private IRobustRandom _random = default!;
private TTSSystem _ttsSys = default!;
private List<TTSVoicePrototype> _voiceList = default!;
private readonly List<string> _sampleText = new()
{
"Съешь же ещё этих мягких французских булок, да выпей чаю.",
"Клоун, прекрати разбрасывать банановые кожурки офицерам под ноги!",
"Капитан, вы уверены что хотите назначить клоуна на должность главы персонала?",
"Эс Бэ! Тут человек в сером костюме, с тулбоксом и в маске! Помогите!!",
"Учёные, тут странная аномалия в баре! Она уже съела мима!",
"Я надеюсь что инженеры внимательно следят за сингулярностью...",
"Вы слышали эти странные крики в техах? Мне кажется туда ходить небезопасно.",
"Вы не видели Гамлета? Мне кажется он забегал к вам на кухню.",
"Здесь есть доктор? Человек умирает от отравленного пончика! Нужна помощь!",
"Вам нужно согласие и печать квартирмейстера, если вы хотите сделать заказ на партию дробовиков.",
"Возле эвакуационного шаттла разгерметизация! Инженеры, нам срочно нужна ваша помощь!",
"Бармен, налей мне самого крепкого вина, которое есть в твоих запасах!"
};
private ISharedSponsorsManager? _sponsorsMgr;
private List<TTSVoicePrototype> _voiceList = new();

private void InitializeVoice()
{
Expand All @@ -44,8 +26,9 @@ private void InitializeVoice()
SetVoice(_voiceList[args.Id].ID);
};

// _voicePlayButton.OnPressed += _ => { PlayTTS(); }; //A-13 disable
//IoCManager.Instance!.TryResolveType(out _sponsorsMgr);
//VoicePlayButton.OnPressed += _ => PlayPreviewTTS(); // A-13 disable

IoCManager.Instance!.TryResolveType(out _sponsorsMgr);
}

private void UpdateTTSVoicesControls()
Expand All @@ -68,9 +51,10 @@ private void UpdateTTSVoicesControls()
if (firstVoiceChoiceId == 1)
firstVoiceChoiceId = i;

if (voice.SponsorOnly &&
IoCManager.Resolve<SponsorsManager>().TryGetInfo(out var sponsor) &&
!sponsor.AllowedMarkings.Contains(voice.ID))
if (_sponsorsMgr is null)
continue;
if (voice.SponsorOnly && _sponsorsMgr != null &&
!_sponsorsMgr.GetClientPrototypes().Contains(voice.ID))
{
VoiceButton.SetItemDisabled(VoiceButton.GetIdx(i), true);
}
Expand Down
7 changes: 0 additions & 7 deletions Content.Client/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Content.Client.Administration.Managers;
using Content.Client.Changelog;
using Content.Client.Chat.Managers;
using Content.Client.Corvax.JoinQueue;
using Content.Client.Corvax.Sponsors;
using Content.Client.Corvax.TTS;
using Content.Client.Options;
using Content.Client.Eui;
Expand Down Expand Up @@ -70,8 +68,6 @@ public sealed class EntryPoint : GameClient
[Dependency] private readonly ExtendedDisconnectInformationManager _extendedDisconnectInformation = default!;
[Dependency] private readonly JobRequirementsManager _jobRequirements = default!;
[Dependency] private readonly ContentLocalizationManager _contentLoc = default!;
[Dependency] private readonly SponsorsManager _sponsorsManager = default!; // Corvax-Sponsors
[Dependency] private readonly JoinQueueManager _queueManager = default!; // Corvax-Queue
[Dependency] private readonly ContentReplayPlaybackManager _playbackMan = default!;
[Dependency] private readonly IResourceManager _resourceManager = default!;
[Dependency] private readonly IReplayLoadManager _replayLoad = default!;
Expand Down Expand Up @@ -126,7 +122,6 @@ public override void Init()
_prototypeManager.RegisterIgnore("nukeopsRole");
_prototypeManager.RegisterIgnore("stationGoal"); // Corvax-StationGoal
_prototypeManager.RegisterIgnore("ghostRoleRaffleDecider");
_prototypeManager.RegisterIgnore("loadout"); // Corvax-Loadout

_componentFactory.GenerateNetIds();
_adminManager.Initialize();
Expand Down Expand Up @@ -168,8 +163,6 @@ public override void PostInit()
_voteManager.Initialize();
_userInterfaceManager.SetDefaultTheme("SS14DefaultTheme");
_userInterfaceManager.SetActiveTheme(_configManager.GetCVar(CVars.InterfaceTheme));
_sponsorsManager.Initialize(); // Corvax-Sponsors
_queueManager.Initialize(); // Corvax-Queue
_documentParsingManager.Initialize();

_baseClient.RunLevelChanged += (_, args) =>
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Humanoid/MarkingPicker.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public MarkingPicker()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
IoCManager.Instance!.TryResolveType(out _sponsorsManager); // Corvax-Sponsors

CMarkingCategoryButton.OnItemSelected += OnCategoryChange;
CMarkingsUnused.OnItemSelected += item =>
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Humanoid/SingleMarkingPicker.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public SingleMarkingPicker()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
IoCManager.Instance!.TryResolveType(out _sponsorsManager); // Corvax-Sponsors

MarkingList.OnItemSelected += SelectMarking;
AddButton.OnPressed += _ =>
Expand Down
6 changes: 1 addition & 5 deletions Content.Client/IoC/ClientContentIoC.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using Content.Client.Administration.Managers;
using Content.Client.Administration.Managers;
using Content.Client.Changelog;
using Content.Client.Chat.Managers;
using Content.Client.Clickable;
using Content.Client.Corvax.JoinQueue;
using Content.Client.Corvax.Sponsors;
using Content.Client.Corvax.TTS;
using Content.Client.Eui;
using Content.Client.GhostKick;
Expand Down Expand Up @@ -53,8 +51,6 @@ public static void Register()
collection.Register<DocumentParsingManager>();
collection.Register<ContentReplayPlaybackManager, ContentReplayPlaybackManager>();
collection.Register<ISharedPlaytimeManager, JobRequirementsManager>();
collection.Register<SponsorsManager>(); // Corvax-Sponsors
collection.Register<JoinQueueManager>(); // Corvax-Queue
}
}
}
23 changes: 21 additions & 2 deletions Content.Packaging/ClientPackaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static async Task WriteResources(
var inputPass = graph.Input;

// Corvax-Secrets-Start: Add Corvax interfaces to Magic ACZ
var assemblies = new List<string> { "Content.Client", "Content.Shared", "Content.Shared.Database" };
var assemblies = new List<string> { "Content.Client", "Content.Shared", "Content.Shared.Database", "Content.Corvax.Interfaces.Client", "Content.Corvax.Interfaces.Shared" };
if (UseSecrets)
assemblies.AddRange(new[] { "Content.Corvax.Shared", "Content.Corvax.Client" });
// Corvax-Secrets-End
Expand All @@ -97,8 +97,27 @@ await RobustSharedPackaging.WriteContentAssemblies(
assemblies, // Corvax-Secrets
cancel: cancel);

await RobustClientPackaging.WriteClientResources(contentDir, pass, cancel);
await WriteClientResources(contentDir, pass, cancel); // Corvax-Secrets: Support content resource ignore to ignore server-only prototypes

inputPass.InjectFinished();
}

// Corvax-Secrets-Start
public static IReadOnlySet<string> ContentClientIgnoredResources { get; } = new HashSet<string>
{
"CorvaxSecretsServer"
};

private static async Task WriteClientResources(
string contentDir,
AssetPass pass,
CancellationToken cancel = default)
{
var ignoreSet = RobustClientPackaging.ClientIgnoredResources
.Union(RobustSharedPackaging.SharedIgnoredResources)
.Union(ContentClientIgnoredResources).ToHashSet();

await RobustSharedPackaging.DoResourceCopy(Path.Combine(contentDir, "Resources"), pass, ignoreSet, cancel: cancel);
}
// Corvax-Secrets-End
}
Loading

0 comments on commit edca093

Please sign in to comment.