diff --git a/.github/labeler.yml b/.github/labeler.yml index e9267cbbc0..e4f7b60418 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -5,9 +5,9 @@ "Changes: Map": - changed-files: - any-glob-to-any-file: - - 'Resources/Maps/*.yml' - - 'Resources/Prototypes/Maps/*.yml' - - 'Resources/Prototypes/Corvax/Maps/*.yml' + - 'Resources/Maps/**/*.yml' + - 'Resources/Prototypes/Maps/**/*.yml' + - 'Resources/Prototypes/Corvax/Maps/**/*.yml' "Changes: UI": - changed-files: diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 0e0d3ae890..0000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "omnisharp.analyzeOpenDocumentsOnly": true, - "dotnet.defaultSolution": "SpaceStation14.sln" -} diff --git a/Content.Client/Administration/UI/AdminMenuWindow.xaml b/Content.Client/Administration/UI/AdminMenuWindow.xaml index d3d3df02d9..311d67b826 100644 --- a/Content.Client/Administration/UI/AdminMenuWindow.xaml +++ b/Content.Client/Administration/UI/AdminMenuWindow.xaml @@ -6,8 +6,7 @@ xmlns:tabs="clr-namespace:Content.Client.Administration.UI.Tabs" xmlns:playerTab="clr-namespace:Content.Client.Administration.UI.Tabs.PlayerTab" xmlns:objectsTab="clr-namespace:Content.Client.Administration.UI.Tabs.ObjectsTab" - xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab" - xmlns:baby="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab"> + xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab"> @@ -15,7 +14,6 @@ - diff --git a/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs b/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs index d5c43e2a50..51330a547e 100644 --- a/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs +++ b/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs @@ -15,18 +15,14 @@ public AdminMenuWindow() MinSize = new Vector2(650, 250); Title = Loc.GetString("admin-menu-title"); RobustXamlLoader.Load(this); - MasterTabContainer.SetTabTitle((int) TabIndex.Admin, Loc.GetString("admin-menu-admin-tab")); - MasterTabContainer.SetTabTitle((int) TabIndex.Adminbus, Loc.GetString("admin-menu-adminbus-tab")); - MasterTabContainer.SetTabTitle((int) TabIndex.Atmos, Loc.GetString("admin-menu-atmos-tab")); - MasterTabContainer.SetTabTitle((int) TabIndex.Round, Loc.GetString("admin-menu-round-tab")); - MasterTabContainer.SetTabTitle((int) TabIndex.Server, Loc.GetString("admin-menu-server-tab")); - MasterTabContainer.SetTabTitle((int) TabIndex.PanicBunker, Loc.GetString("admin-menu-panic-bunker-tab")); - /* - * TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. - */ - MasterTabContainer.SetTabTitle((int) TabIndex.BabyJail, Loc.GetString("admin-menu-baby-jail-tab")); - MasterTabContainer.SetTabTitle((int) TabIndex.Players, Loc.GetString("admin-menu-players-tab")); - MasterTabContainer.SetTabTitle((int) TabIndex.Objects, Loc.GetString("admin-menu-objects-tab")); + MasterTabContainer.SetTabTitle(0, Loc.GetString("admin-menu-admin-tab")); + MasterTabContainer.SetTabTitle(1, Loc.GetString("admin-menu-adminbus-tab")); + MasterTabContainer.SetTabTitle(2, Loc.GetString("admin-menu-atmos-tab")); + MasterTabContainer.SetTabTitle(3, Loc.GetString("admin-menu-round-tab")); + MasterTabContainer.SetTabTitle(4, Loc.GetString("admin-menu-server-tab")); + MasterTabContainer.SetTabTitle(5, Loc.GetString("admin-menu-panic-bunker-tab")); + MasterTabContainer.SetTabTitle(6, Loc.GetString("admin-menu-players-tab")); + MasterTabContainer.SetTabTitle(7, Loc.GetString("admin-menu-objects-tab")); MasterTabContainer.OnTabChanged += OnTabChanged; } diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml deleted file mode 100644 index b8034faf52..0000000000 --- a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs deleted file mode 100644 index 9e1d53818f..0000000000 --- a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Content.Client.Message; -using Content.Client.UserInterface.Controls; -using Robust.Client.AutoGenerated; -using Robust.Client.UserInterface.CustomControls; -using Robust.Client.UserInterface.XAML; - -namespace Content.Client.Administration.UI.Tabs.BabyJailTab; - -/* - * TODO: Remove me once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. - */ - -[GenerateTypedNameReferences] -public sealed partial class BabyJailStatusWindow : FancyWindow -{ - public BabyJailStatusWindow() - { - RobustXamlLoader.Load(this); - MessageLabel.SetMarkup(Loc.GetString("admin-ui-baby-jail-is-enabled")); - } -} diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml deleted file mode 100644 index dd770c2be5..0000000000 --- a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml.cs b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml.cs deleted file mode 100644 index aa9d6ced95..0000000000 --- a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Content.Shared.Administration.Events; -using Robust.Client.AutoGenerated; -using Robust.Client.UserInterface; -using Robust.Client.UserInterface.XAML; -using Robust.Shared.Console; - -/* - * TODO: Remove me once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. - */ - -namespace Content.Client.Administration.UI.Tabs.BabyJailTab; - -[GenerateTypedNameReferences] -public sealed partial class BabyJailTab : Control -{ - [Dependency] private readonly IConsoleHost _console = default!; - - private string _maxAccountAge; - private string _maxOverallMinutes; - - public BabyJailTab() - { - RobustXamlLoader.Load(this); - IoCManager.InjectDependencies(this); - - MaxAccountAge.OnTextEntered += args => SendMaxAccountAge(args.Text); - MaxAccountAge.OnFocusExit += args => SendMaxAccountAge(args.Text); - _maxAccountAge = MaxAccountAge.Text; - - MaxOverallMinutes.OnTextEntered += args => SendMaxOverallMinutes(args.Text); - MaxOverallMinutes.OnFocusExit += args => SendMaxOverallMinutes(args.Text); - _maxOverallMinutes = MaxOverallMinutes.Text; - } - - private void SendMaxAccountAge(string text) - { - if (string.IsNullOrWhiteSpace(text) || - text == _maxAccountAge || - !int.TryParse(text, out var minutes)) - { - return; - } - - _console.ExecuteCommand($"babyjail_max_account_age {minutes}"); - } - - private void SendMaxOverallMinutes(string text) - { - if (string.IsNullOrWhiteSpace(text) || - text == _maxOverallMinutes || - !int.TryParse(text, out var minutes)) - { - return; - } - - _console.ExecuteCommand($"babyjail_max_overall_minutes {minutes}"); - } - - public void UpdateStatus(BabyJailStatus status) - { - EnabledButton.Pressed = status.Enabled; - EnabledButton.Text = Loc.GetString(status.Enabled - ? "admin-ui-baby-jail-enabled" - : "admin-ui-baby-jail-disabled" - ); - EnabledButton.ModulateSelfOverride = status.Enabled ? Color.Red : null; - ShowReasonButton.Pressed = status.ShowReason; - - MaxAccountAge.Text = status.MaxAccountAgeMinutes.ToString(); - _maxAccountAge = MaxAccountAge.Text; - - MaxOverallMinutes.Text = status.MaxOverallMinutes.ToString(); - _maxOverallMinutes = MaxOverallMinutes.Text; - } -} diff --git a/Content.Client/Chat/TypingIndicator/TypingIndicatorVisualizerSystem.cs b/Content.Client/Chat/TypingIndicator/TypingIndicatorVisualizerSystem.cs index 182ddd74b6..336fd2830c 100644 --- a/Content.Client/Chat/TypingIndicator/TypingIndicatorVisualizerSystem.cs +++ b/Content.Client/Chat/TypingIndicator/TypingIndicatorVisualizerSystem.cs @@ -2,21 +2,36 @@ using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Shared.Prototypes; +using Content.Shared.Inventory; namespace Content.Client.Chat.TypingIndicator; public sealed class TypingIndicatorVisualizerSystem : VisualizerSystem { [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly InventorySystem _inventory = default!; + protected override void OnAppearanceChange(EntityUid uid, TypingIndicatorComponent component, ref AppearanceChangeEvent args) { if (args.Sprite == null) return; - if (!_prototypeManager.TryIndex(component.Prototype, out var proto)) + var currentTypingIndicator = component.TypingIndicatorPrototype; + + var evt = new BeforeShowTypingIndicatorEvent(); + + if (TryComp(uid, out var inventoryComp)) + _inventory.RelayEvent((uid, inventoryComp), ref evt); + + var overrideIndicator = evt.GetMostRecentIndicator(); + + if (overrideIndicator != null) + currentTypingIndicator = overrideIndicator.Value; + + if (!_prototypeManager.TryIndex(currentTypingIndicator, out var proto)) { - Log.Error($"Unknown typing indicator id: {component.Prototype}"); + Log.Error($"Unknown typing indicator id: {component.TypingIndicatorPrototype}"); return; } diff --git a/Content.Client/Clickable/ClickableComponent.cs b/Content.Client/Clickable/ClickableComponent.cs index 6f75df4683..987473ca46 100644 --- a/Content.Client/Clickable/ClickableComponent.cs +++ b/Content.Client/Clickable/ClickableComponent.cs @@ -48,7 +48,7 @@ public bool CheckClick(SpriteComponent sprite, TransformComponent transform, Ent Angle cardinalSnapping = sprite.SnapCardinals ? relativeRotation.GetCardinalDir().ToAngle() : Angle.Zero; // First we get `localPos`, the clicked location in the sprite-coordinate frame. - var entityXform = Matrix3Helpers.CreateInverseTransform(transform.WorldPosition, sprite.NoRotation ? -eye.Rotation : spriteRot - cardinalSnapping); + var entityXform = Matrix3Helpers.CreateInverseTransform(spritePos, sprite.NoRotation ? -eye.Rotation : spriteRot - cardinalSnapping); var localPos = Vector2.Transform(Vector2.Transform(worldPos, entityXform), invSpriteMatrix); // Check explicitly defined click-able bounds @@ -58,8 +58,11 @@ public bool CheckClick(SpriteComponent sprite, TransformComponent transform, Ent // Next check each individual sprite layer using automatically computed click maps. foreach (var spriteLayer in sprite.AllLayers) { - if (!spriteLayer.Visible || spriteLayer is not Layer layer) + // TODO: Move this to a system and also use SpriteSystem.IsVisible instead. + if (!spriteLayer.Visible || spriteLayer is not Layer layer || layer.CopyToShaderParameters != null) + { continue; + } // Check the layer's texture, if it has one if (layer.Texture != null) diff --git a/Content.Client/Commands/ZoomCommand.cs b/Content.Client/Commands/ZoomCommand.cs index 2bdc85e1fe..c63eeea836 100644 --- a/Content.Client/Commands/ZoomCommand.cs +++ b/Content.Client/Commands/ZoomCommand.cs @@ -20,7 +20,7 @@ public sealed class ZoomCommand : LocalizedCommands public override void Execute(IConsoleShell shell, string argStr, string[] args) { Vector2 zoom; - if (args.Length is not (1 or 2)) + if (args.Length is not (1 or 2 or 3)) { shell.WriteLine(Help); return; @@ -57,11 +57,18 @@ public override void Execute(IConsoleShell shell, string argStr, string[] args) } } + var scalePvs = true; + if (args.Length == 3 && !bool.TryParse(args[2], out scalePvs)) + { + shell.WriteError(LocalizationManager.GetString("cmd-parse-failure-bool", ("arg", args[2]))); + return; + } + var player = _playerManager.LocalSession?.AttachedEntity; if (_entityManager.TryGetComponent(player, out var content)) { - _entityManager.System().RequestZoom(player.Value, zoom, true, content); + _entityManager.System().RequestZoom(player.Value, zoom, true, scalePvs, content); return; } diff --git a/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml.cs b/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml.cs index 4d8dd86a4d..bbca06f519 100644 --- a/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml.cs +++ b/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml.cs @@ -113,7 +113,9 @@ public void UpdateCountdown() } EmergencyShuttleButton.Text = Loc.GetString("comms-console-menu-recall-shuttle"); - CountdownLabel.SetMessage($"Time remaining\n{Owner.Countdown.ToString()}s"); + var infoText = Loc.GetString($"comms-console-menu-time-remaining", + ("time", Owner.Countdown.ToString())); + CountdownLabel.SetMessage(infoText); } public override void Close() diff --git a/Content.Client/Fax/AdminUI/AdminFaxEui.cs b/Content.Client/Fax/AdminUI/AdminFaxEui.cs index ace3f3eb7b..452c54eb79 100644 --- a/Content.Client/Fax/AdminUI/AdminFaxEui.cs +++ b/Content.Client/Fax/AdminUI/AdminFaxEui.cs @@ -16,7 +16,7 @@ public AdminFaxEui() _window.OnClose += () => SendMessage(new AdminFaxEuiMsg.Close()); _window.OnFollowFax += entity => SendMessage(new AdminFaxEuiMsg.Follow(entity)); _window.OnMessageSend += args => SendMessage(new AdminFaxEuiMsg.Send(args.entity, args.title, - args.stampedBy, args.message, args.stampSprite, args.stampColor)); + args.stampedBy, args.message, args.stampSprite, args.stampColor, args.locked)); } public override void Opened() diff --git a/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml b/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml index d469a0e9d3..dc4092a3b5 100644 --- a/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml +++ b/Content.Client/Fax/AdminUI/AdminFaxWindow.xaml @@ -23,7 +23,7 @@