* Start work on stripping. * more strippable work * Stripping works * Nullable * MORE NULLABLE * nullable moment * life is pain * Interaction check. * Update Content.Client/GameObjects/Components/HUD/Inventory/StrippableBoundUserInterface.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Client/GameObjects/Components/HUD/Inventory/StrippableBoundUserInterface.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/HandsComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/HandsComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/HandsComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/StrippableComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/StrippableComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/HandsComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/StrippableComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/StrippableComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Shared/GameObjects/Components/GUI/SharedStrippableComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Update Content.Server/GameObjects/Components/GUI/StrippableComponent.cs Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Rename InventoryComponent and HandsComponent's OnChanged event to OnItemChanged * Apply suggestions from code review Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> * Use static EquipmentSlotDefines * Do not expose ContainerSlot on Inventory or Hands. Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Content.Shared.GameObjects.Components.Inventory;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.GameObjects.Components.UserInterface;
|
|
using Robust.Shared.Serialization;
|
|
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
|
|
|
|
namespace Content.Shared.GameObjects.Components.GUI
|
|
{
|
|
public class SharedStrippableComponent : Component
|
|
{
|
|
public override string Name => "Strippable";
|
|
|
|
[NetSerializable, Serializable]
|
|
public enum StrippingUiKey
|
|
{
|
|
Key,
|
|
}
|
|
}
|
|
|
|
[NetSerializable, Serializable]
|
|
public class StrippingInventoryButtonPressed : BoundUserInterfaceMessage
|
|
{
|
|
public Slots Slot { get; }
|
|
|
|
public StrippingInventoryButtonPressed(Slots slot)
|
|
{
|
|
Slot = slot;
|
|
}
|
|
}
|
|
|
|
[NetSerializable, Serializable]
|
|
public class StrippingHandButtonPressed : BoundUserInterfaceMessage
|
|
{
|
|
public string Hand { get; }
|
|
|
|
public StrippingHandButtonPressed(string hand)
|
|
{
|
|
Hand = hand;
|
|
}
|
|
}
|
|
|
|
[NetSerializable, Serializable]
|
|
public class StrippingBoundUserInterfaceState : BoundUserInterfaceState
|
|
{
|
|
public Dictionary<Slots, string> Inventory { get; }
|
|
public Dictionary<string, string> Hands { get; }
|
|
|
|
public StrippingBoundUserInterfaceState(Dictionary<Slots, string> inventory, Dictionary<string, string> hands)
|
|
{
|
|
Inventory = inventory;
|
|
Hands = hands;
|
|
}
|
|
}
|
|
}
|