예제 #1
0
 public TerrainList( EU2.Install install )
 {
     CSVReader reader = new CSVReader( install.GetMapFile( "terrain types.csv" ) );
     try {
         ReadFromCSV( reader );
     }
     finally {
         reader.Close();
     }
 }
예제 #2
0
        public bool ReadFromCSV( CSVReader reader )
        {
            ArrayList items = new ArrayList();

            // Skip first row
            reader.SkipRow();
            for ( ; ; ) {
                Religion item = new Religion();
                if ( !item.ReadFromCSV( reader ) ) break;

                items.Add( item );
            }

            list = new Religion[items.Count];
            items.CopyTo( list );

            return true;
        }
예제 #3
0
파일: Terrain.cs 프로젝트: And-G/Magellan
        public bool ReadFromCSV( CSVReader reader )
        {
            id = reader.ReadInt();
            name = reader.ReadString();
            movement = reader.ReadFloat();

            return true;
        }
예제 #4
0
파일: Good.cs 프로젝트: And-G/Magellan
        public bool ReadFromCSV( CSVReader reader )
        {
            name = reader.ReadString();
            baseResourceValue = reader.ReadInt();
            mine = reader.ReadBoolean();
            tradePost = reader.ReadBoolean();
            numOfSlaves = reader.ReadInt();

            return true;
        }
예제 #5
0
 public void ReadFrom( CSVReader reader )
 {
     for ( int i=0; i<Count; ++i ) {
         scales[i].ReadFrom( reader );
     }
     recalc = true;
 }
예제 #6
0
        public ColorScales( CSVReader reader )
        {
            scales = new ColorScale[Count];
            for ( int i=0; i<Count; ++i ) {
                scales[i] = new ColorScale( "" );
            }
            shades = new int[8192];

            ReadFrom( reader );
        }
예제 #7
0
 public void ReadFrom( CSVReader reader )
 {
     red = reader.ReadByte();
     green = reader.ReadByte();
     blue = reader.ReadByte();
     index = reader.ReadByte();
 }
예제 #8
0
 public void ReadFrom( CSVReader reader )
 {
     name = reader.ReadString();
     reader.SkipRow();
     reader.SkipRow();
     for ( int i=0; i<4; ++i ) {
         data[i].ReadFrom( reader );
     }
 }
예제 #9
0
파일: Religion.cs 프로젝트: And-G/Magellan
        public bool ReadFromCSV( CSVReader reader )
        {
            string tmp = reader.ReadString();

            if ( tmp.ToUpper() == "END" ) return false;
            name = tmp;
            techSpeed = reader.ReadInt();
            stabBonus = reader.ReadInt();
            productionEfficiency = reader.ReadInt();
            tradeEfficiency = reader.ReadInt();
            taxIncome = reader.ReadInt();
            morale = reader.ReadInt();
            annualColonistRatio = reader.ReadInt();
            annualDiplomatRatio = reader.ReadInt();
            annualMissionaryRatio = reader.ReadInt();
            reader.SkipRow();

            return true;
        }