internal Civilization(int id, string name = null, PlayerColor color = null, Leader leader = null, Expansion.Expansion requirement = null)
        {
            Id = id;
            Color = color;
            Requirement = requirement;
            Leader = leader;

            SaveName = new SaveString(Prefix, name, true);
        }
Exemplo n.º 2
0
        internal Map(string name, GameProperty<MapSize> mapSize = null, IEnumerable<GameProperty> mapProperties = null, SaveString saveName = null, Expansion.Expansion requirement = null, IDictionary<MapSize, SaveString> sizedMaps = null)
        {
            Name = name;
            Path = saveName;
            Requirement = requirement;
            if (mapProperties != null)
                _MapProperties = new List<GameProperty>(mapProperties);
            else _MapProperties = new List<GameProperty>();

            if (mapSize == null)
                mapSize = MapPropertyLib.MapSizeProp;

            if (sizedMaps != null)
                SizedMaps = new Dictionary<MapSize, SaveString>(sizedMaps);

            NumberOfCityStates = new SaveNumber(12, 0, MaxCityStates);
            this._Size = mapSize;
            AdjustMapSizeSideEffects(mapSize.Value);
        }
Exemplo n.º 3
0
 public void RemoveExpansion(Expansion.Expansion expansion)
 {
     if (expansion != Expansion.Expansion.CivilizationVComplete && expansion != Expansion.Expansion.Upgrade1 && expansion != Expansion.Expansion.Mongolia)
     {
         _Expansions.Remove(expansion);
         if (!this.HasGnkOrBnw)
         {
             SetPropertiesForVanilla();
         }
         if (!_Expansions.IsSupersetOf(Expansion.Expansion.All))
             _Expansions.Remove(Expansion.Expansion.CivilizationVComplete);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Note that adding all expansions to a map will automatically add the Civilization V Compete expansion
 /// </summary>
 public void AddExpansion(Expansion.Expansion expansion)
 {
     if (expansion != Expansion.Expansion.CivilizationVComplete)
     {
         _Expansions.Add(expansion);
         if (expansion == Expansion.Expansion.GodsAndKings || expansion == Expansion.Expansion.BraveNewWorld)
         {
             SetPropertiesForExpansions();
         }
         if (_Expansions.IsSupersetOf(Expansion.Expansion.All))
             _Expansions.Add(Expansion.Expansion.CivilizationVComplete);
     }
 }