示例#1
0
        public static void ClearDictionaries()
        {
            States.Clear();
            Continents.Clear();
            PopTypes.Clear();
            Goods.Clear();
            CountryTags.Clear();
            Religions.Clear();
            Cultures.Clear();
            CultureGroups.Clear();
            Ideologies.Clear();
            Buildings.Clear();
            PolicyGroups.Clear();
            SubPolicies.Clear();
            Schools.Clear();
            Techs.Clear();
            Inventions.Clear();
            Units.Clear();
            Governments.Clear();
            Crimes.Clear();
            EventModifiers.Clear();
            NationalValues.Clear();
            Terrain.Clear();

            States         = null;
            Continents     = null;
            PopTypes       = null;
            Goods          = null;
            CountryTags    = null;
            Religions      = null;
            Cultures       = null;
            CultureGroups  = null;
            Ideologies     = null;
            Buildings      = null;
            PolicyGroups   = null;
            SubPolicies    = null;
            Schools        = null;
            Techs          = null;
            Inventions     = null;
            Units          = null;
            Governments    = null;
            Crimes         = null;
            EventModifiers = null;
            NationalValues = null;
            Terrain        = null;
        }
示例#2
0
        private static string GetTag(string line)
        {
            Match match = Regex.Match(line, CountryTags.TagPattern);

            if (match.Success)
            {
                string tag = match.Groups[1].Value;
                if (tag.Contains("/") && CountryTags.IsCountryTag(tag.Substring(1)))
                {
                    return(tag);
                }
                else if (CountryTags.IsCountryTag(tag))
                {
                    return(tag);
                }
            }

            return(null);
        }