Skip to content

Commit

Permalink
Как говорится, Fix shit
Browse files Browse the repository at this point in the history
  • Loading branch information
FaDeOkno committed Aug 2, 2024
1 parent 3ab787e commit ac2f511
Show file tree
Hide file tree
Showing 30 changed files with 111 additions and 90 deletions.
4 changes: 3 additions & 1 deletion Content.Client/ADT/Language/LanguageSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Content.Shared.Language;
using Content.Shared.ADT.Language;

namespace Content.Client.ADT.Language;

public sealed partial class LanguageSystem : SharedLanguageSystem
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/ADT/Language/TranslatorImplantSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Shared.Implants;

namespace Content.Client.Implants;
namespace Content.Client.ADT.Implants;

public sealed class TranslatorImplantSystem : SharedTranslatorImplantSystem
{
Expand Down
4 changes: 1 addition & 3 deletions Content.Client/ADT/Language/UI/LanguageMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Shared.Language;
using Content.Shared.ADT.Language;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
Expand All @@ -12,9 +12,7 @@ namespace Content.Client.ADT.Language.UI;
[GenerateTypedNameReferences]
public sealed partial class LanguageMenuWindow : DefaultWindow
{
[Dependency] private readonly IConsoleHost _consoleHost = default!;
[Dependency] private readonly EntityManager _entManager = default!;
[Dependency] private readonly IEntityManager _iEntManager = default!;

[Dependency] private readonly ISharedPlayerManager _playerManager = default!;

Expand Down
4 changes: 3 additions & 1 deletion Content.Client/Corvax/TTS/TTSSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Robust.Shared.Configuration;
using Robust.Shared.ContentPack;
using Robust.Shared.Utility;
using Content.Shared.Language;
using Content.Shared.ADT.Language;
using Robust.Shared.Player;

namespace Content.Client.Corvax.TTS;
Expand Down Expand Up @@ -73,6 +73,7 @@ private void OnPlayTTS(PlayTTSEvent ev)

var filePath = new ResPath($"{_fileIdx++}.ogg");

// Languages TTS support start
var player = _playerManager.LocalSession?.AttachedEntity;
if (player != null)
{
Expand All @@ -83,6 +84,7 @@ private void OnPlayTTS(PlayTTSEvent ev)
}
else
_contentRoot.AddOrUpdateFile(filePath, ev.Data);
// Languages TTS support end

var audioResource = new AudioResource();
audioResource.Load(IoCManager.Instance!, Prefix / filePath);
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Input/ContentContexts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void SetupContexts(IInputContextContainer contexts)
human.AddFunction(ContentKeyFunctions.AltUseItemInHand);
human.AddFunction(ContentKeyFunctions.OpenCharacterMenu);
human.AddFunction(ContentKeyFunctions.OpenEmotesMenu);
human.AddFunction(ContentKeyFunctions.OpenLanguagesMenu);
human.AddFunction(ContentKeyFunctions.OpenLanguagesMenu); // ADT Languages
human.AddFunction(ContentKeyFunctions.ActivateItemInWorld);
human.AddFunction(ContentKeyFunctions.ThrowItemInHand);
human.AddFunction(ContentKeyFunctions.AltActivateItemInWorld);
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void AddCheckBox(string checkBoxName, bool currentState, Action<BaseButton.Butto
AddButton(ContentKeyFunctions.OpenAHelp);
AddButton(ContentKeyFunctions.OpenActionsMenu);
AddButton(ContentKeyFunctions.OpenEmotesMenu);
AddButton(ContentKeyFunctions.OpenLanguagesMenu); // Lang affected
AddButton(ContentKeyFunctions.OpenLanguagesMenu); // ADT Languages
AddButton(ContentKeyFunctions.ToggleRoundEndSummaryWindow);
AddButton(ContentKeyFunctions.OpenEntitySpawnWindow);
AddButton(ContentKeyFunctions.OpenSandboxWindow);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Content.Client.Gameplay;
using Content.Shared.Language;
using Content.Shared.ADT.Language;
using Robust.Client.UserInterface.Controllers;
using Robust.Client.UserInterface.Controls;
using Content.Client.Chat.UI;
Expand All @@ -11,7 +11,7 @@
using Content.Client.ADT.Language.UI;
using Robust.Shared.Input.Binding;

namespace Content.Client.UserInterface.Systems.Language;
namespace Content.Client.UserInterface.Systems.Language; // ADT Languages

public sealed class LanguageMenuUIController : UIController, IOnStateEntered<GameplayState>, IOnStateExited<GameplayState>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Content.Client.UserInterface.Systems.Guidebook;
using Content.Client.UserInterface.Systems.MenuBar.Widgets;
using Content.Client.UserInterface.Systems.Sandbox;
using Content.Client.UserInterface.Systems.Language; // Lang affected
using Content.Client.UserInterface.Systems.Language; // ADT Languages
using Robust.Client.UserInterface.Controllers;

namespace Content.Client.UserInterface.Systems.MenuBar;
Expand All @@ -25,7 +25,7 @@ public sealed class GameTopMenuBarUIController : UIController
[Dependency] private readonly SandboxUIController _sandbox = default!;
[Dependency] private readonly GuidebookUIController _guidebook = default!;
[Dependency] private readonly EmotesUIController _emotes = default!;
[Dependency] private readonly LanguageMenuUIController _language = default!; // Lang affected
[Dependency] private readonly LanguageMenuUIController _language = default!; // ADT Languages

private GameTopMenuBar? GameTopMenuBar => UIManager.GetActiveUIWidgetOrNull<GameTopMenuBar>();

Expand All @@ -49,7 +49,7 @@ public void UnloadButtons()
_action.UnloadButton();
_sandbox.UnloadButton();
_emotes.UnloadButton();
_language.UnloadButton(); // Lang affected
_language.UnloadButton(); // ADT Languages
}

public void LoadButtons()
Expand All @@ -63,6 +63,6 @@ public void LoadButtons()
_action.LoadButton();
_sandbox.LoadButton();
_emotes.LoadButton();
_language.LoadButton(); // Lang affected
_language.LoadButton(); // ADT Languages
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
/>
<!--ADT Languages start-->
<ui:MenuButton
Name="LanguagesButton"
Access="Internal"
Expand All @@ -63,6 +64,7 @@
HorizontalExpand="True"
AppendStyleClass="{x:Static style:StyleBase.ButtonSquare}"
/>
<!--ADT Languages end-->
<ui:MenuButton
Name="CraftingButton"
Access="Internal"
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/ADT/Language/LanguageSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using System.Text;
using Content.Shared.GameTicking;
using Content.Shared.Language;
using Content.Shared.ADT.Language;
//using Content.Shared.Language.Systems;
using Robust.Shared.Random;
using Robust.Shared.Player;
Expand All @@ -12,7 +12,7 @@
using Content.Server.GameTicking.Events;
using Content.Server.Chat.Systems;

namespace Content.Server.Language;
namespace Content.Server.ADT.Language;

public sealed partial class LanguageSystem : SharedLanguageSystem
{
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/ADT/Language/TranslatorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Content.Server.Popups;
using Content.Server.PowerCell;
using Content.Shared.Interaction;
using Content.Shared.Language;
using Content.Shared.ADT.Language;
using Content.Shared.PowerCell;

namespace Content.Server.Language;
namespace Content.Server.ADT.Language;

public sealed class TranslatorSystem : SharedTranslatorSystem
{
Expand Down
Loading

0 comments on commit ac2f511

Please sign in to comment.