Make grinder use item slots (& misc eject-button changes) (#7197)

This commit is contained in:
Leon Friedrich
2022-03-28 17:03:03 +13:00
committed by GitHub
parent 9cccc6da99
commit 80699543d9
31 changed files with 163 additions and 297 deletions

View File

@@ -1,7 +1,5 @@
using System.Collections.Generic;
using Content.Shared.Containers.ItemSlots;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
using static Content.Shared.Access.Components.SharedIdCardConsoleComponent;
@@ -23,6 +21,10 @@ namespace Content.Client.Access.UI
base.Open();
_window = new IdCardConsoleWindow(this, _prototypeManager) {Title = _entityManager.GetComponent<MetaDataComponent>(Owner.Owner).EntityName};
_window.PrivilegedIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(PrivilegedIdCardSlotId));
_window.TargetIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(TargetIdCardSlotId));
_window.OnClose += Close;
_window.OpenCentered();
}
@@ -41,11 +43,6 @@ namespace Content.Client.Access.UI
_window?.UpdateState(castState);
}
public void ButtonPressed(UiButton button)
{
SendMessage(new IdButtonPressedMessage(button));
}
public void SubmitData(string newFullName, string newJobTitle, List<string> newAccessList)
{
if (newFullName.Length > MaxFullNameLength)