コード例 #1
0
 public void Write(ParadoxStreamWriter writer)
 {
     if (Name != null)
     {
         writer.WriteLine("name", Name, ValueWrite.Quoted);
     }
     writer.WriteLine("tax", Tax);
     foreach (var val in Cores)
     {
         writer.WriteLine("add_core", val);
     }
     if (TopProvinces != null)
     {
         writer.Write("top_provinces={ ");
         foreach (var val in TopProvinces)
         {
             writer.Write(val, ValueWrite.Quoted);
             writer.Write(" ");
         }
         writer.WriteLine("}");
     }
     foreach (var val in Armies)
     {
         writer.Write("army", val);
     }
 }
コード例 #2
0
 public void Write(ParadoxStreamWriter writer)
 {
     if (Name != null)
     {
         writer.WriteLine("name", Name, ValueWrite.Quoted);
     }
     if (Type != null)
     {
         writer.WriteLine("type", Type);
     }
     writer.WriteLine("morale", Morale);
     writer.WriteLine("strength", Strength);
 }
コード例 #3
0
 public void Write(ParadoxStreamWriter writer)
 {
     if (Name != null)
     {
         writer.WriteLine("name", Name, ValueWrite.Quoted);
     }
     if (Leader != null)
     {
         writer.Write("leader", Leader);
     }
     foreach (var val in Units)
     {
         writer.Write("unit", val);
     }
     if (Attachments != null)
     {
         writer.Write("attachments", w =>
         {
             foreach (var val in Attachments)
             {
                 w.Write(String.Empty, val);
             }
         });
     }
 }
コード例 #4
0
            public void Write(ParadoxStreamWriter writer)
            {
                writer.WriteLine("name", Name, ValueWrite.Quoted);
                writer.WriteLine("citysize", CitySize);
                writer.Write("discovered_by={", ValueWrite.LeadingTabs);
                foreach (var country in DiscoveredBy)
                {
                    writer.Write(country, ValueWrite.None);
                    writer.Write(" ", ValueWrite.None);
                }

                writer.Write("}", ValueWrite.NewLine);

                writer.WriteLine("generic_infantry = {", ValueWrite.LeadingTabs);
                foreach (var infantry in GenericInfantry)
                {
                    writer.WriteLine(infantry, ValueWrite.LeadingTabs);
                }
                writer.WriteLine("}", ValueWrite.LeadingTabs);
            }
コード例 #5
0
        public void Write(ParadoxStreamWriter writer)
        {
            List <KeyValuePair <string, string> > sortedDynamicNames = Entity.DynamicNames.ToList().OrderBy(x => x.Key).ToList();

            foreach (var dynamicName in sortedDynamicNames)
            {
                writer.WriteLine(dynamicName.Key, dynamicName.Value, ValueWrite.Quoted);
            }

            foreach (LandedTitleEntity landedTitle in Entity.Children)
            {
                LandedTitleDefinition landedTitleDefinition = new LandedTitleDefinition
                {
                    Entity = landedTitle
                };

                writer.Write(landedTitle.Id, landedTitleDefinition);
            }
        }
コード例 #6
0
 public void Write(ParadoxStreamWriter writer)
 {
     writer.WriteLine("id", Id);
     writer.WriteLine("type", Type);
 }
コード例 #7
0
 public void Write(ParadoxStreamWriter writer)
 {
     writer.WriteLine(string.Empty);
     writer.WriteLine(string.Format("{0}={{holder={1}}}", Time, HoldID));
 }
コード例 #8
0
ファイル: FileSave.cs プロジェクト: nickbabcock/Pdoxcl2Sharp
            public void Write(ParadoxStreamWriter writer)
            {
                writer.WriteLine("name", Name, ValueWrite.Quoted);
                writer.WriteLine("citysize", CitySize);
                writer.Write("discovered_by={", ValueWrite.LeadingTabs);
                foreach (var country in DiscoveredBy)
                {
                    writer.Write(country, ValueWrite.None);
                    writer.Write(" ", ValueWrite.None);
                }

                writer.Write("}", ValueWrite.NewLine);

                writer.WriteLine("generic_infantry = {", ValueWrite.LeadingTabs);
                foreach (var infantry in GenericInfantry)
                {
                    writer.WriteLine(infantry, ValueWrite.LeadingTabs);
                }
                writer.WriteLine("}", ValueWrite.LeadingTabs);
            }