@@ -20,7 +20,7 @@ class Program
2020
2121 static void Main ( string [ ] args )
2222 {
23- args = new string [ ] { "G_6051CDAF_9BCF_4FE2_97C4_48F3ACB248AE.mob" , @"E:\Новая папка (1)\workspace\proto_1" } ;
23+ args = new string [ ] { "G_6051CDAF_9BCF_4FE2_97C4_48F3ACB248AE.mob" , @"E:\Новая папка (1)\workspace\proto_1" } ;
2424
2525 if ( args . Length != 1 )
2626 {
@@ -43,12 +43,13 @@ static void Main(string[] args)
4343 obj . Header . filename = file ;
4444
4545 ObjectConfig . ObjectList . Add ( obj ) ;
46+ /*
4647 Console.Write (file + " ");
4748 Console.Write (obj.Header.ObjectId.ToString () + " ");
49+ */
4850
4951
50-
51- Console . WriteLine ( ( reader . BaseStream . Position == reader . BaseStream . Length ) . ToString ( ) + " " + reader . BaseStream . Position . ToString ( ) + " " + reader . BaseStream . Length . ToString ( ) ) ;
52+ //Console.WriteLine((reader.BaseStream.Position == reader.BaseStream.Length).ToString() + " " + reader.BaseStream.Position.ToString() + " " + reader.BaseStream.Length.ToString());
5253
5354 if ( reader . BaseStream . Position != reader . BaseStream . Length ) {
5455 Console . WriteLine ( " !!! not full reading !!!" ) ;
@@ -60,8 +61,8 @@ static void Main(string[] args)
6061 }
6162 }
6263
63-
64-
64+ DumpAllIn ( path ) ;
65+ /*
6566 if (Directory.Exists(path))
6667 {
6768 DumpAllIn(path);
@@ -75,26 +76,29 @@ static void Main(string[] args)
7576 w.Close();
7677 }
7778 }
78-
79+ */
7980 Console . WriteLine ( "Done. Reading {0} object." , ObjRead ) ;
80- Console . ReadKey ( ) ;
81+ File . WriteAllLines ( @"E:\mob_decode_art.txt" , TempleFileFormats . Utils . temp . list_art_id . Distinct ( ) . ToArray ( ) ) ;
82+ //Console.ReadKey();
8183 }
8284
8385 private static void DumpAllIn ( string dirname )
8486 {
85- foreach ( var file in Directory . EnumerateFiles ( dirname , "*.mob" , SearchOption . AllDirectories ) )
87+ foreach ( string file in File . ReadLines ( @"E:\mob.txt" , Encoding . GetEncoding ( "windows-1251" ) ) )
88+ //foreach (var file in Directory.EnumerateFiles(dirname, "*.mob", SearchOption.AllDirectories))
8689 {
87- using ( var w1 = new StreamWriter ( file + ".json" , false , Encoding . UTF8 , 8192 ) )
90+ // using (var w1 = new StreamWriter(file + ".json", false, Encoding.UTF8, 8192))
8891 {
89- DumpFile ( file , w1 ) ;
90- w1 . Flush ( ) ;
91- w1 . Close ( ) ;
92+ DumpFile ( file , null ) ;
93+ // w1.Flush();
94+ // w1.Close();
9295 }
9396 }
9497
95- }
98+ }
99+
96100
97- private static void DumpFile ( string filename , StreamWriter w )
101+ private static void DumpFile ( string filename , StreamWriter w )
98102 {
99103 ObjRead ++ ;
100104
@@ -103,12 +107,40 @@ private static void DumpFile(string filename, StreamWriter w)
103107 {
104108 obj = reader . GameObjectReader ( ) ;
105109 }
106-
110+ /*
107111 Console.WriteLine("{0}", obj.Header.GameObjectType);
108112 Console.WriteLine(" ObjectID {0}", obj.Header.ObjectId.ToString());
109113 Console.WriteLine(" Proto_ID {0}", obj.Header.ProtoId.ToString());
110114 Console.WriteLine("\n");
115+ */
116+ /*
117+ string[] dictionary = new string[] {
118+ "obj_f_armor_paper_doll_aid",
119+ "obj_f_current_aid",
120+ "obj_f_light_aid",
121+ "obj_f_shadow",
122+ "obj_f_aid",
123+ "obj_f_destroyed_aid",
124+ "obj_f_critter_portrait",
125+ "obj_f_item_inv_aid",
126+ "obj_f_item_use_aid_fragment",
127+ "obj_f_weapon_paper_doll_aid",
128+ "obj_f_weapon_missile_aid",
129+ "obj_f_weapon_visual_effect_aid"
130+ };
131+
132+ foreach (var s in dictionary)
133+ {
134+ if(obj.GetType().GetProperty(s) != null)
135+ {
136+ ArtId o = (ArtId)GetPropValue(obj, s);
137+ list_art_id.Add(o.path);
138+ }
139+ }
140+
141+ */
111142
143+ /*
112144 w.WriteLine(new Export<GameObject>(obj).GetText());
113145
114146
@@ -119,7 +151,7 @@ private static void DumpFile(string filename, StreamWriter w)
119151 writer.Close ();
120152 writer.Dispose ();
121153 }
122-
123- }
124- }
154+ */
155+ }
156+ }
125157}
0 commit comments