mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-19 06:28:40 +03:00
* Уэээээээ * Почти настрадались * Скоро конец.... * СКОРО * Мышки плакали, кололись, но продолжали упорно жрать кактус * Все ближе! * Это такой конец? * Книжка говна * фиксики * ОНО ЖИВОЕ * Телепорт * разное * Added byond * ивенты теперь работают * Разфикс телепорта * Свет мой зеркальце скажи, да всю правду доложи - Я ль робастней всех на свете? * Разное * Еще многа всего * Многа разнава * Скоро конец.... * ЭТО КОНЕЦ * Фикс линтера (ну, или я на это надеюсь) * Еще один фикс линтера * Победа! * фиксики * пу пу пу * Фикс подмастерья * Мисклик * Высокочастотный меч * Неймспейсы * Пул способностей мага
53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
// SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
|
|
// SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
|
|
// SPDX-FileCopyrightText: 2025 Misandry <mary@thughunt.ing>
|
|
// SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
using Content.Shared._Shitcode.Wizard.MagicMirror;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client._Shitcode.Wizard.MagicMirror;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class WizardMirrorBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
|
|
{
|
|
[ViewVariables]
|
|
private WizardMirrorWindow? _window;
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_window = this.CreateWindow<WizardMirrorWindow>();
|
|
|
|
if (EntMan.TryGetComponent(Owner, out WizardMirrorComponent? mirror))
|
|
_window.AllowedSpecies = new(mirror.AllowedSpecies);
|
|
|
|
_window.Save += OnSave;
|
|
}
|
|
|
|
private void OnSave()
|
|
{
|
|
var profile = _window?.Profile;
|
|
if (profile != null)
|
|
SendMessage(new WizardMirrorMessage(profile));
|
|
}
|
|
|
|
protected override void UpdateState(BoundUserInterfaceState state)
|
|
{
|
|
base.UpdateState(state);
|
|
|
|
if (state is not WizardMirrorUiState data)
|
|
return;
|
|
|
|
if (_window == null)
|
|
return;
|
|
|
|
_window.LoadedProfile = data.Profile.Clone();
|
|
_window.SetProfile(data.Profile);
|
|
}
|
|
}
|