public static GnomeSkill[] GetGnomeSkills(GnomeSkillType skillType, SkillDef[] skillDefinitions, Character gameGnome) { List<String> skillNames = new List<String>(); if (skillType.HasFlag(GnomeSkillType.Labor)) { skillNames.AddRange(GnomanEmpire.Instance.GameDefs.CharacterSettings.LaborSkills); } if (skillType.HasFlag(GnomeSkillType.Combat)) { skillNames.AddRange(GnomanEmpire.Instance.GameDefs.CharacterSettings.CombatSkills); } var skills = skillDefinitions.Where(obj => skillNames.Contains(obj.Name)).Select(skill => new GnomeSkill(gameGnome, skill)).ToArray(); return skills; }