Barber scissors fix (#22895)

* barber!

* 5% change to maintenance

* some fixes

* refactor some

* ElectroJR fix merge

* aoa

* remvoe humanoid

* Magic mirror cleanup

* Cleanup

* Bunch more fixes

* Fix nohair + range bugs

* Fixes

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Ed
2024-01-06 12:19:45 +03:00
committed by GitHub
parent 52aac0ea3b
commit f0097d4963
6 changed files with 190 additions and 131 deletions

View File

@@ -30,6 +30,7 @@ public sealed class MagicMirrorBoundUserInterface : BoundUserInterface
_window.OnFacialHairSlotAdded += delegate () { AddSlot(MagicMirrorCategory.FacialHair); };
_window.OnFacialHairSlotRemoved += args => RemoveSlot(MagicMirrorCategory.FacialHair, args);
_window.OnClose += Close;
_window.OpenCentered();
}
@@ -53,17 +54,18 @@ public sealed class MagicMirrorBoundUserInterface : BoundUserInterface
SendMessage(new MagicMirrorAddSlotMessage(category));
}
protected override void ReceiveMessage(BoundUserInterfaceMessage message)
protected override void UpdateState(BoundUserInterfaceState state)
{
base.ReceiveMessage(message);
base.UpdateState(state);
if (message is not MagicMirrorUiData data || _window == null)
if (state is not MagicMirrorUiState data || _window == null)
{
return;
}
_window.UpdateState(data);
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);