Clean up EquipmentSlotDefinitions.cs a bit.
This commit is contained in:
@@ -6,6 +6,9 @@ namespace Content.Shared.GameObjects.Components.Inventory
|
||||
{
|
||||
public static class EquipmentSlotDefines
|
||||
{
|
||||
/// <summary>
|
||||
/// Uniquely identifies a single slot in an inventory.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public enum Slots
|
||||
{
|
||||
@@ -29,6 +32,9 @@ namespace Content.Shared.GameObjects.Components.Inventory
|
||||
EXOSUITSLOT2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines what slot types an item can fit into.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
[Flags]
|
||||
public enum SlotFlags
|
||||
@@ -55,7 +61,7 @@ namespace Content.Shared.GameObjects.Components.Inventory
|
||||
EXOSUITSTORAGE = 1 << 14
|
||||
}
|
||||
|
||||
public static Dictionary<Slots, string> SlotNames = new Dictionary<Slots, string>()
|
||||
public static readonly IReadOnlyDictionary<Slots, string> SlotNames = new Dictionary<Slots, string>()
|
||||
{
|
||||
{Slots.HEAD, "Head"},
|
||||
{Slots.EYES, "Eyes"},
|
||||
@@ -70,13 +76,19 @@ namespace Content.Shared.GameObjects.Components.Inventory
|
||||
{Slots.IDCARD, "Id Card"},
|
||||
{Slots.POCKET1, "Left Pocket"},
|
||||
{Slots.POCKET2, "Right Pocket"},
|
||||
{Slots.POCKET3, "Up Pocket" },
|
||||
{Slots.POCKET4, "Down Pocket" },
|
||||
{Slots.POCKET3, "Up Pocket"}, // What?
|
||||
{Slots.POCKET4, "Down Pocket"}, // I, uh, what?
|
||||
{Slots.EXOSUITSLOT1, "Suit Storage"},
|
||||
{Slots.EXOSUITSLOT2, "Backup Storage"}
|
||||
};
|
||||
|
||||
public static Dictionary<Slots, SlotFlags> SlotMasks = new Dictionary<Slots, SlotFlags>()
|
||||
/// <summary>
|
||||
/// Defines which slot types fit in which slots.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Note that this is not exhaustive. Inventory implementations can provide additional behavior.
|
||||
/// </remarks>
|
||||
public static readonly IReadOnlyDictionary<Slots, SlotFlags> SlotMasks = new Dictionary<Slots, SlotFlags>()
|
||||
{
|
||||
{Slots.HEAD, SlotFlags.HEAD},
|
||||
{Slots.EYES, SlotFlags.EYES},
|
||||
|
||||
Reference in New Issue
Block a user