Fix MagicMirror UI (#42544)

This commit is contained in:
B_Kirill
2026-01-20 21:59:58 +10:00
committed by GitHub
parent 04f0e5231c
commit 7f7f3b6ef1
4 changed files with 6 additions and 2 deletions

View 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 += (_, _) =>

View 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>

View 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);
}

View 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.