Make grinder use item slots (& misc eject-button changes) (#7197)
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Shared.Access.Components
|
||||
{
|
||||
@@ -12,29 +8,15 @@ namespace Content.Shared.Access.Components
|
||||
public const int MaxFullNameLength = 256;
|
||||
public const int MaxJobTitleLength = 256;
|
||||
|
||||
public static string PrivilegedIdCardSlotId = "IdCardConsole-privilegedId";
|
||||
public static string TargetIdCardSlotId = "IdCardConsole-targetId";
|
||||
|
||||
[DataField("privilegedIdSlot")]
|
||||
public ItemSlot PrivilegedIdSlot = new();
|
||||
|
||||
[DataField("targetIdSlot")]
|
||||
public ItemSlot TargetIdSlot = new();
|
||||
|
||||
public enum UiButton
|
||||
{
|
||||
PrivilegedId,
|
||||
TargetId,
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class IdButtonPressedMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public readonly UiButton Button;
|
||||
|
||||
public IdButtonPressedMessage(UiButton button)
|
||||
{
|
||||
Button = button;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class WriteToTargetIdMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Shared.Access.Systems
|
||||
{
|
||||
@@ -21,8 +19,8 @@ namespace Content.Shared.Access.Systems
|
||||
|
||||
private void OnComponentInit(EntityUid uid, SharedIdCardConsoleComponent component, ComponentInit args)
|
||||
{
|
||||
_itemSlotsSystem.AddItemSlot(uid, $"{component.Name}-privilegedId", component.PrivilegedIdSlot);
|
||||
_itemSlotsSystem.AddItemSlot(uid, $"{component.Name}-targetId", component.TargetIdSlot);
|
||||
_itemSlotsSystem.AddItemSlot(uid, SharedIdCardConsoleComponent.PrivilegedIdCardSlotId, component.PrivilegedIdSlot);
|
||||
_itemSlotsSystem.AddItemSlot(uid, SharedIdCardConsoleComponent.TargetIdCardSlotId, component.TargetIdSlot);
|
||||
}
|
||||
|
||||
private void OnComponentRemove(EntityUid uid, SharedIdCardConsoleComponent component, ComponentRemove args)
|
||||
|
||||
Reference in New Issue
Block a user