]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix MagicMirror UI (#42544)
authorB_Kirill <153602297+B-Kirill@users.noreply.github.com>
Tue, 20 Jan 2026 11:59:58 +0000 (21:59 +1000)
committerGitHub <noreply@github.com>
Tue, 20 Jan 2026 11:59:58 +0000 (11:59 +0000)
Content.Client/MagicMirror/MagicMirrorBoundUserInterface.cs
Content.Client/MagicMirror/MagicMirrorWindow.xaml
Content.Shared/MagicMirror/MagicMirrorSystem.cs
Resources/Locale/en-US/character-appearance/components/magic-mirror-component.ftl

index ec247da1acba208b175d468247357538d88a2d32..4344926e8546f16211336218db615503a7526185 100644 (file)
@@ -20,6 +20,9 @@ public sealed class MagicMirrorBoundUserInterface : BoundUserInterface
         base.Open();
 
         _window = this.CreateWindow<MagicMirrorWindow>();
+
+        _window.Title = EntMan.GetComponent<MetaDataComponent>(Owner).EntityName;
+
         _window.MarkingsPicker.SetModel(_markingsModel);
 
         _markingsModel.MarkingsChanged += (_, _) =>
index a09b6745085a0d14b5289fda502b5c9309195d17..3de0aecef373a795fb01a9f699e5cc3eba50e6ec 100644 (file)
@@ -1,6 +1,5 @@
 <DefaultWindow xmlns="https://spacestation14.io"
                xmlns:humanoid="clr-namespace:Content.Client.Humanoid"
-               Title="{Loc 'magic-mirror-window-title'}"
                MinSize="700 500">
    <humanoid:MarkingPicker Name="MarkingsPicker" Access="Public" HorizontalExpand="True" VerticalExpand="True" />
 </DefaultWindow>
index 65a4d11079ecb6c3b3aa760ddaea5a156250fe60..ca7609c97d9efc0891dd8351d138af67016a6f80 100644 (file)
@@ -142,6 +142,9 @@ public sealed class MagicMirrorSystem : EntitySystem
         if (!args.CanReach || args.Target == null)
             return;
 
+        if (!HasComp<VisualBodyComponent>(args.Target.Value))
+            return;
+
         UpdateInterface(mirror, args.Target.Value);
         _userInterface.TryOpenUi(mirror.Owner, MagicMirrorUiKey.Key, args.User);
     }
index 1b22fbf828238f174e4bad2e36585ffd20a8a4a8..ec2289cb900a99bbf7fcd15fd361e578ecf6ab8c 100644 (file)
@@ -1,6 +1,5 @@
 magic-mirror-component-activate-user-has-no-hair = You can't have any hair!
 
-magic-mirror-window-title = Magic Mirror
 magic-mirror-add-slot-self = You're giving yourself some hair.
 magic-mirror-remove-slot-self = You're removing some of your hair.
 magic-mirror-change-slot-self = You're changing your hairstyle.