mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-27 18:47:52 +03:00
# Description Ports MODsuits from Goobstation PR https://github.com/Goob-Station/Goob-Station/pull/1242. The PR author has confirmed that he is okay with me doing this. --- # TODO - [X] Port in sprites - [x] Port in YMLs - [X] Port code - [x] Port code PATCHES - [x] Update EE with required fixes --- <details><summary><h1>Media</h1></summary> <p> ## Modsuit crafting https://github.com/user-attachments/assets/8ff03d3a-0fc1-4818-b710-bfc43f0e2a68 ## Modsuit sealing https://github.com/user-attachments/assets/6671459a-7767-499b-8678-062fc1db7134 </p> </details> --- # Changelog 🆑 - add: Modsuits have been ported from Goobstation! --------- Signed-off-by: Eris <erisfiregamer1@gmail.com> Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com> (cherry picked from commit cb06c41fc07275e1f15af916babb44368c0c26c2)
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Content.Shared.Clothing.Components;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Client.Input;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client._Goobstation.Clothing;
|
|
|
|
public sealed class ToggleableClothingBoundUserInterface : BoundUserInterface
|
|
{
|
|
[Dependency] private readonly IClyde _displayManager = default!;
|
|
[Dependency] private readonly IInputManager _inputManager = default!;
|
|
|
|
private IEntityManager _entityManager;
|
|
private ToggleableClothingRadialMenu? _menu;
|
|
|
|
public ToggleableClothingBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
_entityManager = IoCManager.Resolve<IEntityManager>();
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_menu = this.CreateWindow<ToggleableClothingRadialMenu>();
|
|
_menu.SetEntity(Owner);
|
|
_menu.SendToggleClothingMessageAction += SendToggleableClothingMessage;
|
|
|
|
var vpSize = _displayManager.ScreenSize;
|
|
_menu.OpenCenteredAt(_inputManager.MouseScreenPosition.Position / vpSize);
|
|
}
|
|
|
|
private void SendToggleableClothingMessage(EntityUid uid)
|
|
{
|
|
var message = new ToggleableClothingUiMessage(_entityManager.GetNetEntity(uid));
|
|
SendPredictedMessage(message);
|
|
}
|
|
}
|