Example #1
0
        public bool ContainsCultureGroup(string key)
        {
            bool found = false;

            if (m_useCustomCulture)
            {
                found = m_customCultureGroups.ContainsKey(key);
            }

            if (!found)
            {
                found = CultureGroups.ContainsKey(key);
            }

            return(found);
        }
Example #2
0
        public string GenerateCulture(string eu4Culture, string vic2Name = null, string prefix = "", bool neoCulture = false)
        {
            if (vic2Name == null)
            {
                vic2Name = eu4Culture;
            }
            // todo: look into what happens when eu4 culture groups are named differently to vic2 culture groups
            var group = Eu4Save.CultureGroups.FirstOrDefault(g => g.Value.Cultures.Contains(Eu4Save.Cultures[eu4Culture])).Value;

            if (!CultureGroups.ContainsKey(group.Name))
            {
                CultureGroups[group.Name] = new Vic2CultureGroup(group, this);
            }
            Cultures[vic2Name] = CultureGroups[group.Name].AddCulture(eu4Culture, this, vic2Name, prefix, neoCulture);
            return(vic2Name);
        }