using System.Collections.Generic; namespace NitroxServer_Subnautica.GameLogic.Entities.Spawning { public static class SlotsHelper { private static Dictionary typeMapping = new Dictionary { { EntitySlotData.EntitySlotType.Small, EntitySlot.Type.Small }, { EntitySlotData.EntitySlotType.Medium, EntitySlot.Type.Medium }, { EntitySlotData.EntitySlotType.Large, EntitySlot.Type.Large }, { EntitySlotData.EntitySlotType.Tall, EntitySlot.Type.Tall }, { EntitySlotData.EntitySlotType.Creature, EntitySlot.Type.Creature } }; public static List ConvertSlotTypes(EntitySlotData.EntitySlotType entitySlotType) { List slotsTypes = new List(); foreach (KeyValuePair mapping in typeMapping) { EntitySlotData.EntitySlotType slotType = mapping.Key; EntitySlot.Type type = mapping.Value; if ((entitySlotType & slotType) == slotType) { slotsTypes.Add(type); } } return slotsTypes; } } }