public ModuleSettingData(XElement element) { m_SlotSettings = new ConcurrentDictionary <ShipModelSlotType, ModuleSlotSettingData>(); m_Workshop = (Workshop)Enum.Parse(typeof(Workshop), element.GetString("name")); var dump = element.Elements("slot").Select(slotElement => { ModuleSlotSettingData slotData = new ModuleSlotSettingData(slotElement); m_SlotSettings.TryAdd(slotData.slotType, slotData); return(slotData); }).ToList(); }
public bool TryGetSlotSetting(ShipModelSlotType slotType, out ModuleSlotSettingData data) { return(m_SlotSettings.TryGetValue(slotType, out data)); }