terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
WorldFile.cs
Go to the documentation of this file.
1using System;
3using System.IO;
13using UnityEngine;
14
15namespace Terraria.IO
16{
17 // Token: 0x0200057D RID: 1405
18 public class WorldFile
19 {
20 // Token: 0x1400003E RID: 62
21 // (add) Token: 0x0600340C RID: 13324 RVA: 0x0020158C File Offset: 0x001FF78C
22 // (remove) Token: 0x0600340D RID: 13325 RVA: 0x002015A8 File Offset: 0x001FF7A8
23 public static event Action OnWorldLoad
24 {
26 add
27 {
28 if (!true)
29 {
30 }
32 if (@delegate != null)
33 {
34 }
35 }
37 remove
38 {
39 if (!true)
40 {
41 }
43 if (@delegate != null)
44 {
45 }
46 }
47 }
48
49 // Token: 0x0600340E RID: 13326 RVA: 0x002015C4 File Offset: 0x001FF7C4
50 public static void CacheSaveTime()
51 {
52 int num = 1;
53 if (num == 0)
54 {
55 }
56 if (num == 0)
57 {
58 }
59 }
60
61 // Token: 0x0600340F RID: 13327 RVA: 0x002015DC File Offset: 0x001FF7DC
62 public static void SetOngoingToTemps()
63 {
64 }
65
66 // Token: 0x06003410 RID: 13328 RVA: 0x002015EC File Offset: 0x001FF7EC
67 public static bool IsValidWorld(string file, bool cloudSave)
68 {
69 /*
70An exception occurred when decompiling this method (06003410)
71
72ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.IO.WorldFile::IsValidWorld(System.String,System.Boolean)
73
74 ---> System.Exception: Basic block has to end with unconditional control flow.
75{
76 IL_0000:
77 brtrue(IL_0000, ldc.i4:bool(1))
78}
79
80 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
81 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
82 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
83 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
84 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
85 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
86 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
87 --- End of inner exception stack trace ---
88 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
89 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
90*/;
91 }
92
93 // Token: 0x06003411 RID: 13329 RVA: 0x002015FC File Offset: 0x001FF7FC
95 {
96 byte[] bytes = Resources.Load<TextAsset>("Tutorial/World").bytes;
98 long num = 0L;
99 int num2 = 18;
100 if (num == 0L)
101 {
102 if (num2 == 0)
103 {
104 }
105 if (!false)
106 {
107 }
108 throw new OutOfMemoryException();
109 }
110 throw new OutOfMemoryException();
111 }
112
113 // Token: 0x06003412 RID: 13330 RVA: 0x00201690 File Offset: 0x001FF890
114 public static WorldFileData GetAllMetadata(string file, bool cloudSave)
115 {
117 return worldFileData;
118 }
119
120 // Token: 0x06003413 RID: 13331 RVA: 0x00201738 File Offset: 0x001FF938
121 public static WorldFileData CreateMetadata(string name, bool cloudSave, int GameMode)
122 {
123 /*
124An exception occurred when decompiling this method (06003413)
125
126ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.IO.WorldFileData Terraria.IO.WorldFile::CreateMetadata(System.String,System.Boolean,System.Int32)
127
128 ---> System.Exception: Basic block has to end with unconditional control flow.
129{
130 IL_0003:
131 stloc:DateTime(var_5_0F, callgetter:DateTime(DateTime::get_Now))
132 stloc:FileMetadata(var_6_17, call:FileMetadata(FileMetadata::FromCurrentSettings, ldc.i4:FileType(2)))
133 stloc:Guid(var_9_24, call:Guid(Guid::NewGuid))
134}
135
136 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
137 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
138 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
139 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
140 --- End of inner exception stack trace ---
141 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
142 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
143*/;
144 }
145
146 // Token: 0x06003414 RID: 13332 RVA: 0x0020176C File Offset: 0x001FF96C
147 public static void ResetTemps()
148 {
149 int num = 1;
150 if (num == 0)
151 {
152 }
153 if (num == 0)
154 {
155 }
157 }
158
159 // Token: 0x06003415 RID: 13333 RVA: 0x0020178C File Offset: 0x001FF98C
160 private static void ClearTempTiles()
161 {
162 int num = 1;
163 if (num == 0)
164 {
165 }
166 long num2 = 0L;
167 long num3 = 0L;
168 if (num == 0)
169 {
170 }
171 long num4 = 0L;
172 long num5 = 0L;
173 long num6 = 0L;
174 WorldGen.KillTile((int)num3, (int)num2, num4 != 0L, num5 != 0L, num6 != 0L);
175 }
176
177 // Token: 0x06003416 RID: 13334 RVA: 0x002017BC File Offset: 0x001FF9BC
178 private static void ReregisterTiles()
179 {
180 int num = 1;
181 if (num == 0)
182 {
183 }
184 if (num == 0)
185 {
186 if (num == 0)
187 {
188 }
189 Tile tile;
190 tile.ReregisterTile();
191 }
192 }
193
194 // Token: 0x06003417 RID: 13335 RVA: 0x002017E0 File Offset: 0x001FF9E0
195 public static void LoadTutorialOnMainThread(object threadContext)
196 {
197 byte[] bytes = Resources.Load<TextAsset>("Tutorial/World").bytes;
198 }
199
200 // Token: 0x06003418 RID: 13336 RVA: 0x00201800 File Offset: 0x001FFA00
201 public static void LoadWorld(bool loadFromCloud)
202 {
203 Main.checkXMas();
205 }
206
207 // Token: 0x06003419 RID: 13337 RVA: 0x00201B5C File Offset: 0x001FFD5C
208 public static void CheckSavedOreTiers()
209 {
210 if (!true)
211 {
212 }
213 }
214
215 // Token: 0x0600341A RID: 13338 RVA: 0x00201BB4 File Offset: 0x001FFDB4
217 {
218 int num = 1;
219 if (num == 0)
220 {
221 }
222 if (num == 0)
223 {
224 }
225 long num2 = 0L;
227 if (num == 0)
228 {
229 }
230 }
231
232 // Token: 0x0600341B RID: 13339 RVA: 0x00201BEC File Offset: 0x001FFDEC
234 {
235 if (!true)
236 {
237 }
238 if ("World" == null)
239 {
240 }
241 string text = DateTime.Now.ToString() + " Saving the world";
242 Debug.Log(text);
243 if (text != null)
244 {
245 string text3;
246 string text2 = text + " " + text3 + "%";
247 Thread.Sleep(0);
248 return;
249 }
250 long num = 0L;
251 int num2 = 14;
252 if (num != 0L)
253 {
254 throw new OutOfMemoryException();
255 }
256 if (num2 == 0)
257 {
258 Debug.Log(DateTime.Now.ToString() + " World saving locked out");
259 long num3 = 0L;
260 Thread.Sleep((int)num3);
261 return;
262 }
263 }
264
265 // Token: 0x0600341C RID: 13340 RVA: 0x00201C8C File Offset: 0x001FFE8C
266 private static void InternalSaveWorld(bool useCloudSaving, bool resetTime)
267 {
268 for (;;)
269 {
270 int num = 1;
271 if (num == 0)
272 {
273 }
274 string worldPath = Main.WorldPath;
275 if (num == 0)
276 {
277 }
279 if (num == 0)
280 {
281 }
282 if (num != 0)
283 {
284 break;
285 }
286 if (num != 0)
287 {
288 if (num != 0)
289 {
290 goto Block_2;
291 }
292 }
293 else
294 {
295 while (worldPath != null)
296 {
297 }
298 }
300 if (num == 0)
301 {
302 }
304 if (num == 0)
305 {
306 }
307 if (Main.worldPathName != null)
308 {
309 return;
310 }
311 }
312 return;
313 Block_2:
315 }
316
317 // Token: 0x0600341D RID: 13341 RVA: 0x00201E58 File Offset: 0x00200058
318 public static bool RenameWorld(string newName, bool useCloudSaving = false)
319 {
320 if (!true)
321 {
322 }
323 string worldPathName = Main.worldPathName;
324 long num = 0L;
325 int num2 = 4;
326 long num3 = 0L;
327 if (num != 0L)
328 {
329 throw new OutOfMemoryException();
330 }
331 int num4;
332 if (num2 == 0)
333 {
334 num4 = 11;
335 }
336 if (false)
337 {
338 throw new OutOfMemoryException();
339 }
340 int num5;
341 if (num4 == 0)
342 {
343 num5 = 12;
344 }
345 if (!false)
346 {
347 int num6;
348 if (num5 == 0)
349 {
350 num6 = 13;
351 }
352 if (!false)
353 {
354 if (num6 == 0)
355 {
358 byte[] array2;
359 if (array2 != null)
360 {
361 string text = Main.worldPathName + ".bak";
362 if (".bak" == null)
363 {
364 }
365 if (".bak" == null)
366 {
367 }
369 }
370 long num7 = 0L;
371 long num8 = 0L;
372 int num9 = 20;
373 if (num8 != 0L)
374 {
375 throw new OutOfMemoryException();
376 }
377 int num10;
378 if (num9 == 0)
379 {
380 num10 = 21;
381 }
382 if (false)
383 {
384 throw new OutOfMemoryException();
385 }
386 if (num10 == 0 && array2 != null && num7 != 0L)
387 {
388 goto IL_00D9;
389 }
390 }
391 throw new OutOfMemoryException();
392 }
393 IL_00D9:
394 throw new OutOfMemoryException();
395 }
396 throw new OutOfMemoryException();
397 }
398
399 // Token: 0x0600341E RID: 13342 RVA: 0x00202018 File Offset: 0x00200218
400 public static bool RenameWorldUsingLoadAndSave(string newName)
401 {
402 /*
403An exception occurred when decompiling this method (0600341E)
404
405ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.IO.WorldFile::RenameWorldUsingLoadAndSave(System.String)
406
407 ---> System.Exception: Basic block has to end with unconditional control flow.
408{
409 IL_0003:
410 callsetter:int32(Main::set_menuMode, ldc.i4:int32(10))
411 brtrue(IL_0000, ldc.i4:bool(0))
412}
413
414 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
415 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
416 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
417 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
418 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
419 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
420 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
421 --- End of inner exception stack trace ---
422 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
423 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
424*/;
425 }
426
427 // Token: 0x0600341F RID: 13343 RVA: 0x00202034 File Offset: 0x00200234
428 private static void RenameWorldCheck()
429 {
430 if (!true)
431 {
432 }
433 }
434
435 // Token: 0x06003420 RID: 13344 RVA: 0x0020204C File Offset: 0x0020024C
436 private static void RenameWorldUsingLoadAndSave()
437 {
439 }
440
441 // Token: 0x06003421 RID: 13345 RVA: 0x00202064 File Offset: 0x00200264
442 private static void renameWorldCallBack(object threadContext)
443 {
444 int num = 1;
445 if (threadContext != null)
446 {
447 if (num == 0)
448 {
449 }
450 if (num == 0)
451 {
452 }
453 int num2 = 1;
455 if (num2 == 0)
456 {
457 }
458 WorldFile.LoadWorld(true);
459 if (num2 == 0)
460 {
461 if (num2 == 0)
462 {
463 }
466 }
467 Main.menuMode = 6;
469 return;
470 }
471 }
472
473 // Token: 0x06003422 RID: 13346 RVA: 0x002020AC File Offset: 0x002002AC
474 private static void DoRollingBackups(string backupWorldWritePath)
475 {
476 if (!true)
477 {
478 }
479 int num = 9;
480 string text2;
481 string text = backupWorldWritePath + text2;
482 string text4;
484 string text6;
486 if (num == 0)
487 {
488 }
489 }
490
491 // Token: 0x06003423 RID: 13347 RVA: 0x002020E4 File Offset: 0x002002E4
492 private static void ResetTempsToDayTime()
493 {
494 int num = 1;
495 if (num == 0)
496 {
497 }
498 if (num == 0)
499 {
500 }
501 if (num != 0)
502 {
503 if (num == 0)
504 {
505 }
506 }
507 if (num == 0)
508 {
509 }
510 }
511
512 // Token: 0x06003424 RID: 13348 RVA: 0x0020210C File Offset: 0x0020030C
513 private static void SetTempToOngoing()
514 {
515 }
516
517 // Token: 0x06003425 RID: 13349 RVA: 0x000021DB File Offset: 0x000003DB
518 private static void SetTempToCache()
519 {
520 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
521 }
522
523 // Token: 0x06003426 RID: 13350 RVA: 0x0020211C File Offset: 0x0020031C
524 private static void ConvertMannequin(int px, int py)
525 {
526 int num = 1;
527 if (num == 0)
528 {
529 }
530 int num2 = 5;
531 bool flag = WorldGen.InWorld(px, py, num2);
532 if (num == 0)
533 {
534 }
535 Tile tile;
536 short frameX = tile.frameX;
537 Tile tile2;
538 short frameX2 = tile2.frameX;
539 Tile tile3;
540 short frameX3 = tile3.frameX;
541 Tile tile4;
542 short frameX4 = tile4.frameX;
543 int num3 = TEDisplayDoll.Place(px, py);
544 }
545
546 // Token: 0x06003427 RID: 13351 RVA: 0x00202180 File Offset: 0x00200380
547 private static void ConvertWeaponRack(int px, int py)
548 {
549 int num = 1;
550 if (num == 0)
551 {
552 }
553 long num2 = 0L;
554 bool flag = WorldGen.InWorld(px, py, (int)num2);
555 if (num == 0)
556 {
557 }
558 Tile tile;
559 short frameX = tile.frameX;
560 Tile tile2;
561 short frameX2 = tile2.frameX;
562 Tile tile3;
563 short frameX3 = tile3.frameX;
564 long num3 = 0L;
565 int num4 = 471;
566 Tile tile4;
567 tile4.type = (ushort)num4;
570 long num5 = 0L;
571 int num6 = TEWeaponsRack.Place(px, py);
572 int num7 = 1;
573 TEWeaponsRack.TryPlacing(px, py, (int)num5, (int)num3, num7);
574 }
575
576 // Token: 0x06003428 RID: 13352 RVA: 0x00202214 File Offset: 0x00200414
577 private static void ConvertOldTileEntities()
578 {
579 if (!true)
580 {
581 }
582 }
583
584 // Token: 0x06003429 RID: 13353 RVA: 0x00202260 File Offset: 0x00200460
585 private static void SaveWorld_Version2(BinaryWriter writer)
586 {
587 int num = WorldFile.SaveFileFormatHeader(writer);
588 int num2 = WorldFile.SaveWorldHeader(writer);
589 int num3 = WorldFile.SaveWorldTilesFast(writer);
590 int num4 = WorldFile.SaveChests(writer);
591 int num5 = WorldFile.SaveSigns(writer);
592 int num6 = WorldFile.SaveNPCs(writer);
593 int num7 = WorldFile.SaveTileEntities(writer);
595 int num9 = WorldFile.SaveTownManager(writer);
596 int num10 = WorldFile.SaveBestiary(writer);
597 int num11 = WorldFile.SaveCreativePowers(writer);
598 int num12 = WorldFile.SaveFooter(writer);
599 }
600
601 // Token: 0x0600342A RID: 13354 RVA: 0x002022CC File Offset: 0x002004CC
602 private static int SaveFileFormatHeader(BinaryWriter writer)
603 {
604 /*
605An exception occurred when decompiling this method (0600342A)
606
607ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveFileFormatHeader(System.IO.BinaryWriter)
608
609 ---> System.Exception: Basic block has to end with unconditional control flow.
610{
611 IL_0005:
612 brtrue(IL_0000, ldloc:int32[exp:bool](var_0_01))
613}
614
615 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
616 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
617 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
618 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
619 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
620 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
621 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
622 --- End of inner exception stack trace ---
623 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
624 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
625*/;
626 }
627
628 // Token: 0x0600342B RID: 13355 RVA: 0x002022E4 File Offset: 0x002004E4
629 private static int SaveHeaderPointers(BinaryWriter writer, int[] pointers)
630 {
631 /*
632An exception occurred when decompiling this method (0600342B)
633
634ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveHeaderPointers(System.IO.BinaryWriter,System.Int32[])
635
636 ---> System.Exception: Basic block has to end with unconditional control flow.
637{
638 Block_0:
639 stloc:uint8[](var_0_06, ldfld:uint8[](BinaryWriter::_buffer, ldloc:BinaryWriter(writer)))
640 stloc:uint8[](var_1_0D, ldfld:uint8[](BinaryWriter::_buffer, ldloc:BinaryWriter(writer)))
641}
642
643 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
644 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
645 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
646 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
647 --- End of inner exception stack trace ---
648 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
649 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
650*/;
651 }
652
653 // Token: 0x0600342C RID: 13356 RVA: 0x00202300 File Offset: 0x00200500
654 private static int SaveWorldHeader(BinaryWriter writer)
655 {
656 /*
657An exception occurred when decompiling this method (0600342C)
658
659ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveWorldHeader(System.IO.BinaryWriter)
660
661 ---> System.Exception: Basic block has to end with unconditional control flow.
662{
663 IL_0003:
664 stloc:int32(var_2_0A, callgetter:int32(Main::get_GameMode))
665 stloc:int32(var_5_13, callgetter:int32(Main::get_spawnTileX))
666 stloc:int32(var_7_1D, callgetter:int32(Main::get_spawnTileY))
667}
668
669 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
670 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
671 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
672 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
673 --- End of inner exception stack trace ---
674 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
675 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
676*/;
677 }
678
679 // Token: 0x0600342D RID: 13357 RVA: 0x00202338 File Offset: 0x00200538
680 private static int SaveWorldTilesFast(BinaryWriter writer)
681 {
682 /*
683An exception occurred when decompiling this method (0600342D)
684
685ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveWorldTilesFast(System.IO.BinaryWriter)
686
687 ---> System.Exception: Basic block has to end with unconditional control flow.
688{
689 Block_0:
690 brtrue(IL_0000, ldc.i4:bool(0))
691}
692
693 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
694 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
695 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
696 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
697 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
698 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
699 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
700 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
701 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
702 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
703 --- End of inner exception stack trace ---
704 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
705 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
706*/;
707 }
708
709 // Token: 0x0600342E RID: 13358 RVA: 0x0020237C File Offset: 0x0020057C
710 public static int SaveWorldTiles(BinaryWriter writer)
711 {
712 /*
713An exception occurred when decompiling this method (0600342E)
714
715ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveWorldTiles(System.IO.BinaryWriter)
716
717 ---> System.Exception: Basic block has to end with unconditional control flow.
718{
719 IL_0050:
720 brtrue(IL_0000, ldloc:int32[exp:bool](var_14_2B))
721}
722
723 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
724 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
725 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
726 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
727 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
728 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
729 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
730 --- End of inner exception stack trace ---
731 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
732 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
733*/;
734 }
735
736 // Token: 0x0600342F RID: 13359 RVA: 0x002023DC File Offset: 0x002005DC
737 private static int SaveChests(BinaryWriter writer)
738 {
739 /*
740An exception occurred when decompiling this method (0600342F)
741
742ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveChests(System.IO.BinaryWriter)
743
744 ---> System.Exception: Basic block has to end with unconditional control flow.
745{
746 IL_000A:
747 stloc:bool(var_3_10, call:bool(Tile::active, ldloc:Tile[exp:valuetype Terraria.Tile&](var_2)))
748}
749
750 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
751 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
752 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
753 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
754 --- End of inner exception stack trace ---
755 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
756 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
757*/;
758 }
759
760 // Token: 0x06003430 RID: 13360 RVA: 0x00202410 File Offset: 0x00200610
761 private static int SaveSigns(BinaryWriter writer)
762 {
763 /*
764An exception occurred when decompiling this method (06003430)
765
766ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveSigns(System.IO.BinaryWriter)
767
768 ---> System.Exception: Basic block has to end with unconditional control flow.
769{
770 Block_0:
771 brtrue(IL_0000, logicnot:bool(ldloc:int64[exp:bool](var_1_03)))
772}
773
774 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
775 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
776 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
777 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
778 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
779 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
780 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
781 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
782 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
783 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
784 --- End of inner exception stack trace ---
785 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
786 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
787*/;
788 }
789
790 // Token: 0x06003431 RID: 13361 RVA: 0x00202434 File Offset: 0x00200634
791 private static int SaveNPCs(BinaryWriter writer)
792 {
793 /*
794An exception occurred when decompiling this method (06003431)
795
796ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveNPCs(System.IO.BinaryWriter)
797
798 ---> System.Exception: Basic block has to end with unconditional control flow.
799{
800 IL_0011:
801 stloc:BitsByte(var_5_1C, call:BitsByte(BitsByte::op_Implicit, ldc.i4:uint8(0)))
802 stloc:int64(var_6_1F, ldc.i4:int64(0))
803 stloc:bool(var_7_2A, callgetter:bool(BitsByte::get_Item, ldloc:BitsByte[exp:valuetype Terraria.BitsByte&](var_5_1C), ldloc:int64[exp:int32](var_6_1F)))
804}
805
806 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
807 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
808 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
809 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
810 --- End of inner exception stack trace ---
811 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
812 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
813*/;
814 }
815
816 // Token: 0x06003432 RID: 13362 RVA: 0x00202470 File Offset: 0x00200670
817 private static int SaveFooter(BinaryWriter writer)
818 {
819 /*
820An exception occurred when decompiling this method (06003432)
821
822ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveFooter(System.IO.BinaryWriter)
823
824 ---> System.Exception: Basic block has to end with unconditional control flow.
825{
826 IL_0000:
827 brtrue(IL_0000, ldc.i4:bool(1))
828}
829
830 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
831 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
832 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
833 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
834 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
835 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
836 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
837 --- End of inner exception stack trace ---
838 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
839 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
840*/;
841 }
842
843 // Token: 0x06003433 RID: 13363 RVA: 0x00202480 File Offset: 0x00200680
844 private static int LoadWorld_Version2(BinaryReader reader)
845 {
846 int num = 18;
847 Tile tile;
848 ushort type = tile.type;
849 int num2 = 63538;
850 Tile tile2;
851 ushort type2 = tile2.type;
852 if (num2 != 0)
853 {
854 return num;
855 }
856 if (num2 == 0)
857 {
858 }
860 if (num2 == 0)
861 {
862 }
864 int num3;
865 return num3;
866 }
867
868 // Token: 0x06003434 RID: 13364 RVA: 0x002024F4 File Offset: 0x002006F4
869 private static void LoadWorld_LastMinuteFixes()
870 {
871 if (!true)
872 {
873 }
874 if (!true)
875 {
876 }
878 if (!true)
879 {
880 }
882 }
883
884 // Token: 0x06003435 RID: 13365 RVA: 0x00202514 File Offset: 0x00200714
885 private static void FixAgainstExploits()
886 {
887 int num = 1;
888 if (num == 0)
889 {
890 }
891 if (num == 0)
892 {
893 }
894 }
895
896 // Token: 0x06003436 RID: 13366 RVA: 0x00202548 File Offset: 0x00200748
897 public static bool LoadFileFormatHeader(BinaryReader reader, [Out] bool[] importance, [Out] int[] positions, [Out] int positionsOffset)
898 {
899 /*
900An exception occurred when decompiling this method (06003436)
901
902ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.IO.WorldFile::LoadFileFormatHeader(System.IO.BinaryReader,System.Boolean[],System.Int32[],System.Int32)
903
904 ---> System.Exception: Basic block has to end with unconditional control flow.
905{
906 IL_000D:
907 call:void(Console::WriteLine, call:string(Language::GetTextValue, ldstr:string("Error.UnableToLoadWorld")))
908}
909
910 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
911 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
912 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
913 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
914 --- End of inner exception stack trace ---
915 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
916 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
917*/;
918 }
919
920 // Token: 0x06003437 RID: 13367 RVA: 0x00202574 File Offset: 0x00200774
921 private static void LoadHeader(BinaryReader reader)
922 {
923 if (!true)
924 {
925 }
926 }
927
928 // Token: 0x06003438 RID: 13368 RVA: 0x00202814 File Offset: 0x00200A14
929 private static void LoadWorldTiles(BinaryReader reader, bool[] importance)
930 {
931 if (!true)
932 {
933 }
934 int num = 32768;
935 string text2;
936 string text = text2 + " " + text2 + "%";
937 if (num == 0)
938 {
939 }
940 }
941
942 // Token: 0x06003439 RID: 13369 RVA: 0x00202898 File Offset: 0x00200A98
943 private static void LoadChests(BinaryReader reader)
944 {
945 }
946
947 // Token: 0x0600343A RID: 13370 RVA: 0x002028E4 File Offset: 0x00200AE4
949 {
950 int num = 1;
951 if (num == 0)
952 {
953 }
954 if (num == 0)
955 {
956 }
957 Tile tile;
958 bool flag = tile.active();
959 }
960
961 // Token: 0x0600343B RID: 13371 RVA: 0x00202914 File Offset: 0x00200B14
962 private static void LoadSigns(BinaryReader reader)
963 {
964 Tile tile;
965 bool flag = tile.active();
966 }
967
968 // Token: 0x0600343C RID: 13372 RVA: 0x00202948 File Offset: 0x00200B48
969 private static void LoadDummies(BinaryReader reader)
970 {
971 }
972
973 // Token: 0x0600343D RID: 13373 RVA: 0x00202958 File Offset: 0x00200B58
974 private static void LoadNPCs(BinaryReader reader)
975 {
976 if (!true)
977 {
978 }
979 }
980
981 // Token: 0x0600343E RID: 13374 RVA: 0x002029D4 File Offset: 0x00200BD4
983 {
984 }
985
986 // Token: 0x0600343F RID: 13375 RVA: 0x002029F0 File Offset: 0x00200BF0
987 private static int LoadFooter(BinaryReader reader)
988 {
989 return 6;
990 }
991
992 // Token: 0x06003440 RID: 13376 RVA: 0x00202A00 File Offset: 0x00200C00
993 private static bool ValidateWorld(BinaryReader fileIO)
994 {
995 bool flag;
996 return flag;
997 }
998
999 // Token: 0x06003441 RID: 13377 RVA: 0x00202A94 File Offset: 0x00200C94
1000 private static FileMetadata GetFileMetadata(string file, bool cloudSave)
1001 {
1002 if (true)
1003 {
1004 }
1006 return fileMetadata;
1007 }
1008
1009 // Token: 0x06003442 RID: 13378 RVA: 0x00202AF0 File Offset: 0x00200CF0
1010 private static void FixDresserChests()
1011 {
1012 int num = 1;
1013 long num2 = 0L;
1014 if (num == 0)
1015 {
1016 }
1017 long num3 = 0L;
1018 if (num == 0)
1019 {
1020 }
1021 Tile tile;
1022 bool flag = tile.active();
1023 int num4 = Chest.CreateChest((int)num2, (int)num3, (int)num3);
1024 }
1025
1026 // Token: 0x06003443 RID: 13379 RVA: 0x00202B20 File Offset: 0x00200D20
1027 private static int SaveTileEntities(BinaryWriter writer)
1028 {
1029 if (!true)
1030 {
1031 }
1032 if (false)
1033 {
1034 throw new OutOfMemoryException();
1035 }
1036 long num = 0L;
1037 if (4 == 0)
1038 {
1039 }
1040 if (num == 0L)
1041 {
1042 return 43147264;
1043 }
1044 throw new OutOfMemoryException();
1045 }
1046
1047 // Token: 0x06003444 RID: 13380 RVA: 0x00202B70 File Offset: 0x00200D70
1048 private static void LoadTileEntities(BinaryReader reader)
1049 {
1050 if (!true)
1051 {
1052 }
1053 long num = 0L;
1054 long num2 = 0L;
1055 TileEntity tileEntity = TileEntity.Read(reader, num2 != 0L);
1056 tileEntity.ID = (int)num;
1057 int positionKey = tileEntity.PositionKey;
1058 int positionKey2 = tileEntity.PositionKey;
1059 }
1060
1061 // Token: 0x06003445 RID: 13381 RVA: 0x00202C28 File Offset: 0x00200E28
1062 private static int SaveWeightedPressurePlates(BinaryWriter writer)
1063 {
1064 if (!true)
1065 {
1066 }
1067 if (!true)
1068 {
1069 }
1070 if (false)
1071 {
1072 throw new OutOfMemoryException();
1073 }
1074 long num = 0L;
1075 if (4 == 0)
1076 {
1077 }
1078 if (num == 0L)
1079 {
1080 return 43147264;
1081 }
1082 throw new OutOfMemoryException();
1083 }
1084
1085 // Token: 0x06003446 RID: 13382 RVA: 0x00202C78 File Offset: 0x00200E78
1086 private static void LoadWeightedPressurePlates(BinaryReader reader)
1087 {
1088 if (!true)
1089 {
1090 }
1092 }
1093
1094 // Token: 0x06003447 RID: 13383 RVA: 0x00202C90 File Offset: 0x00200E90
1095 private static int SaveTownManager(BinaryWriter writer)
1096 {
1097 if (!true)
1098 {
1099 }
1100 return 1;
1101 }
1102
1103 // Token: 0x06003448 RID: 13384 RVA: 0x00202CA4 File Offset: 0x00200EA4
1104 private static void LoadTownManager(BinaryReader reader)
1105 {
1106 if (!true)
1107 {
1108 }
1109 }
1110
1111 // Token: 0x06003449 RID: 13385 RVA: 0x00202CB4 File Offset: 0x00200EB4
1112 private static int SaveBestiary(BinaryWriter writer)
1113 {
1114 /*
1115An exception occurred when decompiling this method (06003449)
1116
1117ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveBestiary(System.IO.BinaryWriter)
1118
1119 ---> System.Exception: Basic block has to end with unconditional control flow.
1120{
1121 IL_0000:
1122 brtrue(IL_0000, ldc.i4:bool(1))
1123}
1124
1125 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
1126 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
1127 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
1128 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
1129 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
1130 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
1131 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
1132 --- End of inner exception stack trace ---
1133 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
1134 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
1135*/;
1136 }
1137
1138 // Token: 0x0600344A RID: 13386 RVA: 0x00202CC4 File Offset: 0x00200EC4
1139 private static void LoadBestiary(BinaryReader reader, int loadVersionNumber)
1140 {
1141 if (!true)
1142 {
1143 }
1144 }
1145
1146 // Token: 0x0600344B RID: 13387 RVA: 0x00202CD4 File Offset: 0x00200ED4
1148 {
1149 if (!true)
1150 {
1151 }
1152 }
1153
1154 // Token: 0x0600344C RID: 13388 RVA: 0x00202CE4 File Offset: 0x00200EE4
1155 private static int SaveCreativePowers(BinaryWriter writer)
1156 {
1157 /*
1158An exception occurred when decompiling this method (0600344C)
1159
1160ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.IO.WorldFile::SaveCreativePowers(System.IO.BinaryWriter)
1161
1162 ---> System.Exception: Basic block has to end with unconditional control flow.
1163{
1164 Block_0:
1165 call:void(CreativePowerManager::SaveToWorld, callgetter:CreativePowerManager(CreativePowerManager::get_Instance), ldloc:BinaryWriter(writer))
1166}
1167
1168 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
1169 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
1170 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
1171 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
1172 --- End of inner exception stack trace ---
1173 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
1174 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
1175*/;
1176 }
1177
1178 // Token: 0x0600344D RID: 13389 RVA: 0x00202D00 File Offset: 0x00200F00
1183
1184 // Token: 0x0600344E RID: 13390 RVA: 0x00202D1C File Offset: 0x00200F1C
1186 {
1187 if (!true)
1188 {
1189 }
1190 int num = 257;
1191 if (num == 0)
1192 {
1193 }
1194 if (num == 0)
1195 {
1196 }
1197 Main.GameMode = 0;
1198 UnifiedRandom genRand = WorldGen.genRand;
1199 long num2 = 0L;
1200 WorldGen.RandomizeMoonState(genRand, num2 != 0L);
1201 return 1;
1202 }
1203
1204 // Token: 0x0600344F RID: 13391 RVA: 0x00203024 File Offset: 0x00201224
1205 public WorldFile()
1206 {
1207 }
1208
1209 // Token: 0x06003450 RID: 13392 RVA: 0x00203038 File Offset: 0x00201238
1210 // Note: this type is marked as 'beforefieldinit'.
1211 static WorldFile()
1212 {
1213 }
1214
1215 // Token: 0x040040D9 RID: 16601
1217 private static Action OnWorldLoad;
1218
1219 // Token: 0x040040DA RID: 16602
1220 private static readonly object IOLock;
1221
1222 // Token: 0x040040DB RID: 16603
1223 public static double _tempTime;
1224
1225 // Token: 0x040040DC RID: 16604
1226 public static bool _tempRaining;
1227
1228 // Token: 0x040040DD RID: 16605
1229 public static float _tempMaxRain;
1230
1231 // Token: 0x040040DE RID: 16606
1232 public static int _tempRainTime;
1233
1234 // Token: 0x040040DF RID: 16607
1235 public static bool _tempDayTime;
1236
1237 // Token: 0x040040E0 RID: 16608
1238 public static bool _tempBloodMoon;
1239
1240 // Token: 0x040040E1 RID: 16609
1241 public static bool _tempEclipse;
1242
1243 // Token: 0x040040E2 RID: 16610
1244 public static int _tempMoonPhase;
1245
1246 // Token: 0x040040E3 RID: 16611
1247 public static int _tempCultistDelay;
1248
1249 // Token: 0x040040E4 RID: 16612
1250 public static int _versionNumber;
1251
1252 // Token: 0x040040E5 RID: 16613
1253 public static bool _isWorldOnCloud;
1254
1255 // Token: 0x040040E6 RID: 16614
1256 public static bool _tempPartyGenuine;
1257
1258 // Token: 0x040040E7 RID: 16615
1259 public static bool _tempPartyManual;
1260
1261 // Token: 0x040040E8 RID: 16616
1262 public static int _tempPartyCooldown;
1263
1264 // Token: 0x040040E9 RID: 16617
1266
1267 // Token: 0x040040EA RID: 16618
1268 private static bool _hasCache;
1269
1270 // Token: 0x040040EB RID: 16619
1271 private static bool? _cachedDayTime;
1272
1273 // Token: 0x040040EC RID: 16620
1274 private static double? _cachedTime;
1275
1276 // Token: 0x040040ED RID: 16621
1277 private static int? _cachedMoonPhase;
1278
1279 // Token: 0x040040EE RID: 16622
1280 private static bool? _cachedBloodMoon;
1281
1282 // Token: 0x040040EF RID: 16623
1283 private static bool? _cachedEclipse;
1284
1285 // Token: 0x040040F0 RID: 16624
1286 private static int? _cachedCultistDelay;
1287
1288 // Token: 0x040040F1 RID: 16625
1289 private static bool? _cachedPartyGenuine;
1290
1291 // Token: 0x040040F2 RID: 16626
1292 private static bool? _cachedPartyManual;
1293
1294 // Token: 0x040040F3 RID: 16627
1295 private static int? _cachedPartyDaysOnCooldown;
1296
1297 // Token: 0x040040F4 RID: 16628
1299
1300 // Token: 0x040040F5 RID: 16629
1301 private static bool? _cachedSandstormHappening;
1302
1303 // Token: 0x040040F6 RID: 16630
1304 public static bool _tempSandstormHappening;
1305
1306 // Token: 0x040040F7 RID: 16631
1307 private static int? _cachedSandstormTimeLeft;
1308
1309 // Token: 0x040040F8 RID: 16632
1310 public static int _tempSandstormTimeLeft;
1311
1312 // Token: 0x040040F9 RID: 16633
1313 private static float? _cachedSandstormSeverity;
1314
1315 // Token: 0x040040FA RID: 16634
1316 public static float _tempSandstormSeverity;
1317
1318 // Token: 0x040040FB RID: 16635
1320
1321 // Token: 0x040040FC RID: 16636
1323
1324 // Token: 0x040040FD RID: 16637
1325 public static bool _tempLanternNightGenuine;
1326
1327 // Token: 0x040040FE RID: 16638
1328 public static bool _tempLanternNightManual;
1329
1330 // Token: 0x040040FF RID: 16639
1332
1333 // Token: 0x04004100 RID: 16640
1334 public static int _tempLanternNightCooldown;
1335
1336 // Token: 0x04004101 RID: 16641
1337 private static bool? _cachedLanternNightGenuine;
1338
1339 // Token: 0x04004102 RID: 16642
1340 private static bool? _cachedLanternNightManual;
1341
1342 // Token: 0x04004103 RID: 16643
1344
1345 // Token: 0x04004104 RID: 16644
1346 private static int? _cachedLanternNightCooldown;
1347
1348 // Token: 0x04004105 RID: 16645
1350
1351 // Token: 0x04004106 RID: 16646
1352 private static byte[] TutorialWorldData;
1353
1354 // Token: 0x04004107 RID: 16647
1355 private static bool PendingSaveAndExit;
1356
1357 // Token: 0x04004108 RID: 16648
1358 public static bool SavingWorld;
1359
1360 // Token: 0x04004109 RID: 16649
1362
1363 // Token: 0x0400410A RID: 16650
1364 public static bool RequireClearTempTiles;
1365
1366 // Token: 0x0200057E RID: 1406
1368 {
1369 // Token: 0x0400410C RID: 16652
1370 Normal,
1371 // Token: 0x0400410D RID: 16653
1373 }
1374
1375 // Token: 0x0200057F RID: 1407
1376 public static class TilePacker
1377 {
1378 // Token: 0x0400410E RID: 16654
1379 public const int Header1_1 = 1;
1380
1381 // Token: 0x0400410F RID: 16655
1382 public const int Header1_2 = 2;
1383
1384 // Token: 0x04004110 RID: 16656
1385 public const int Header1_4 = 4;
1386
1387 // Token: 0x04004111 RID: 16657
1388 public const int Header1_8 = 8;
1389
1390 // Token: 0x04004112 RID: 16658
1391 public const int Header1_10 = 16;
1392
1393 // Token: 0x04004113 RID: 16659
1394 public const int Header1_18 = 24;
1395
1396 // Token: 0x04004114 RID: 16660
1397 public const int Header1_20 = 32;
1398
1399 // Token: 0x04004115 RID: 16661
1400 public const int Header1_40 = 64;
1401
1402 // Token: 0x04004116 RID: 16662
1403 public const int Header1_80 = 128;
1404
1405 // Token: 0x04004117 RID: 16663
1406 public const int Header1_C0 = 192;
1407
1408 // Token: 0x04004118 RID: 16664
1409 public const int Header2_1 = 1;
1410
1411 // Token: 0x04004119 RID: 16665
1412 public const int Header2_2 = 2;
1413
1414 // Token: 0x0400411A RID: 16666
1415 public const int Header2_4 = 4;
1416
1417 // Token: 0x0400411B RID: 16667
1418 public const int Header2_8 = 8;
1419
1420 // Token: 0x0400411C RID: 16668
1421 public const int Header2_10 = 16;
1422
1423 // Token: 0x0400411D RID: 16669
1424 public const int Header2_20 = 32;
1425
1426 // Token: 0x0400411E RID: 16670
1427 public const int Header2_40 = 64;
1428
1429 // Token: 0x0400411F RID: 16671
1430 public const int Header2_70 = 112;
1431
1432 // Token: 0x04004120 RID: 16672
1433 public const int Header2_80 = 128;
1434
1435 // Token: 0x04004121 RID: 16673
1436 public const int Header3_1 = 1;
1437
1438 // Token: 0x04004122 RID: 16674
1439 public const int Header3_2 = 2;
1440
1441 // Token: 0x04004123 RID: 16675
1442 public const int Header3_4 = 4;
1443
1444 // Token: 0x04004124 RID: 16676
1445 public const int Header3_8 = 8;
1446
1447 // Token: 0x04004125 RID: 16677
1448 public const int Header3_10 = 16;
1449
1450 // Token: 0x04004126 RID: 16678
1451 public const int Header3_20 = 32;
1452
1453 // Token: 0x04004127 RID: 16679
1454 public const int Header3_40 = 64;
1455
1456 // Token: 0x04004128 RID: 16680
1457 public const int Header3_80 = 128;
1458
1459 // Token: 0x04004129 RID: 16681
1460 public const int Header4_1 = 1;
1461
1462 // Token: 0x0400412A RID: 16682
1463 public const int Header4_2 = 2;
1464
1465 // Token: 0x0400412B RID: 16683
1466 public const int Header4_4 = 4;
1467
1468 // Token: 0x0400412C RID: 16684
1469 public const int Header4_8 = 8;
1470
1471 // Token: 0x0400412D RID: 16685
1472 public const int Header4_10 = 16;
1473
1474 // Token: 0x0400412E RID: 16686
1475 public const int Header4_20 = 32;
1476
1477 // Token: 0x0400412F RID: 16687
1478 public const int Header4_40 = 64;
1479
1480 // Token: 0x04004130 RID: 16688
1481 public const int Header4_80 = 128;
1482 }
1483 }
1484}
class f__AnonymousType0<< Count > j__TPar
static void Sleep(int millisecondsTimeout)
Definition Thread.cs:207
static int CreateChest(int X, int Y, int id=-1)
Definition Chest.cs:366
static TileEntity Read(BinaryReader reader, bool networkSend=false)
void LoadFromWorld(BinaryReader reader, int versionGameWasLastSavedOn)
static void TryPlacing(int x, int y, int netid, int prefix, int stack)
static ? float _cachedSandstormIntendedSeverity
static void LoadWorldTiles(BinaryReader reader, bool[] importance)
Definition WorldFile.cs:929
static ? bool _cachedLanternNightGenuine
static int SaveFileFormatHeader(BinaryWriter writer)
Definition WorldFile.cs:602
static void LoadNPCs(BinaryReader reader)
Definition WorldFile.cs:974
static void LoadTileEntities(BinaryReader reader)
static bool _tempSandstormHappening
static readonly object IOLock
static void InternalSaveWorld(bool useCloudSaving, bool resetTime)
Definition WorldFile.cs:266
static bool _tempLanternNightManual
static void LoadWorld(bool loadFromCloud)
Definition WorldFile.cs:201
static int SaveCreativePowers(BinaryWriter writer)
static bool LoadFileFormatHeader(BinaryReader reader, [Out] bool[] importance, [Out] int[] positions, [Out] int positionsOffset)
Definition WorldFile.cs:897
static ? bool _cachedLanternNightNextNightIsGenuine
static void ConvertIlluminantPaintToNewField()
Definition WorldFile.cs:948
static void LoadBestiary(BinaryReader reader, int loadVersionNumber)
static bool RequireConvertOldTileEntities
static int SaveWorldTilesFast(BinaryWriter writer)
Definition WorldFile.cs:680
static void ResetTemps()
Definition WorldFile.cs:147
static bool RenameWorldUsingLoadAndSave(string newName)
Definition WorldFile.cs:400
static void FixAgainstExploits()
Definition WorldFile.cs:885
static void CheckSavedOreTiers()
Definition WorldFile.cs:208
static float _tempSandstormSeverity
static int SaveFooter(BinaryWriter writer)
Definition WorldFile.cs:817
static int LoadWorld_Version2(BinaryReader reader)
Definition WorldFile.cs:844
static bool _tempRaining
static void LoadCreativePowers(BinaryReader reader, int loadVersionNumber)
static int _tempCultistDelay
static bool _tempLanternNightGenuine
static int SaveWeightedPressurePlates(BinaryWriter writer)
static void LoadTownManager(BinaryReader reader)
static int SaveBestiary(BinaryWriter writer)
static Action OnWorldLoad
Definition WorldFile.cs:24
static void SetTempToCache()
Definition WorldFile.cs:518
static int SaveTownManager(BinaryWriter writer)
static int SaveChests(BinaryWriter writer)
Definition WorldFile.cs:737
static byte[] TutorialWorldData
static FileMetadata GetFileMetadata(string file, bool cloudSave)
static void ClearTempTiles()
Definition WorldFile.cs:160
static ? bool _cachedLanternNightManual
static ? bool _cachedSandstormHappening
static int _tempPartyCooldown
static void LoadDummies(BinaryReader reader)
Definition WorldFile.cs:969
static bool ValidateWorld(BinaryReader fileIO)
Definition WorldFile.cs:993
static float _tempSandstormIntendedSeverity
static void FixDresserChests()
static void SaveWorld_Version2(BinaryWriter writer)
Definition WorldFile.cs:585
static bool _hasCache
static readonly List< int > CachedCelebratingNPCs
static ? bool _cachedBloodMoon
static int SaveHeaderPointers(BinaryWriter writer, int[] pointers)
Definition WorldFile.cs:629
static void CacheSaveTime()
Definition WorldFile.cs:50
static bool _tempPartyGenuine
static void LoadTutorialOnMainThread(object threadContext)
Definition WorldFile.cs:195
static bool _tempDayTime
static WorldFileData CreateMetadata(string name, bool cloudSave, int GameMode)
Definition WorldFile.cs:121
static void ConvertOldTileEntities()
Definition WorldFile.cs:577
static readonly List< int > TempPartyCelebratingNPCs
static ? int _cachedPartyDaysOnCooldown
static bool IsValidWorld(string file, bool cloudSave)
Definition WorldFile.cs:67
static int _tempRainTime
static ? bool _cachedPartyManual
static bool RequireClearTempTiles
static int _tempSandstormTimeLeft
static ? float _cachedSandstormSeverity
static float _tempMaxRain
static bool _isWorldOnCloud
static void ConvertMannequin(int px, int py)
Definition WorldFile.cs:524
static ? int _cachedMoonPhase
static void ReregisterTiles()
Definition WorldFile.cs:178
static ? int _cachedLanternNightCooldown
static int SaveWorldTiles(BinaryWriter writer)
Definition WorldFile.cs:710
static bool _tempBloodMoon
static void SaveWorld(WorldFile.WorldSaveContext saveContext=WorldFile.WorldSaveContext.Normal)
Definition WorldFile.cs:216
static void LoadBestiaryForVersionsBefore210()
static int SaveSigns(BinaryWriter writer)
Definition WorldFile.cs:761
static void LoadSigns(BinaryReader reader)
Definition WorldFile.cs:962
static bool PendingSaveAndExit
static void ConvertWeaponRack(int px, int py)
Definition WorldFile.cs:547
static WorldFileData GetAllMetadata(string file, bool cloudSave)
Definition WorldFile.cs:114
static void ResetTempsToDayTime()
Definition WorldFile.cs:492
static WorldFileData GetTutorialMetadata()
Definition WorldFile.cs:94
static ? bool _cachedEclipse
static bool _tempPartyManual
static int LoadWorld_Version1_Old_BeforeRelease88(BinaryReader fileIO)
static bool _tempLanternNightNextNightIsGenuine
static int SaveWorldHeader(BinaryWriter writer)
Definition WorldFile.cs:654
static void RenameWorldCheck()
Definition WorldFile.cs:428
static int SaveTileEntities(BinaryWriter writer)
static void ValidateLoadNPCs(BinaryReader fileIO)
Definition WorldFile.cs:982
static int _versionNumber
static void SaveWorld(bool useCloudSaving, bool resetTime=false, WorldFile.WorldSaveContext saveContext=WorldFile.WorldSaveContext.Normal)
Definition WorldFile.cs:233
static int LoadFooter(BinaryReader reader)
Definition WorldFile.cs:987
static ? int _cachedCultistDelay
static void renameWorldCallBack(object threadContext)
Definition WorldFile.cs:442
static void SetOngoingToTemps()
Definition WorldFile.cs:62
static void LoadWorld_LastMinuteFixes()
Definition WorldFile.cs:869
static void LoadChests(BinaryReader reader)
Definition WorldFile.cs:943
static ? int _cachedSandstormTimeLeft
static void RenameWorldUsingLoadAndSave()
Definition WorldFile.cs:436
static void SetTempToOngoing()
Definition WorldFile.cs:513
static bool _tempEclipse
static int _tempMoonPhase
static int _tempLanternNightCooldown
static bool RenameWorld(string newName, bool useCloudSaving=false)
Definition WorldFile.cs:318
static ? bool _cachedPartyGenuine
static ? bool _cachedDayTime
static void LoadHeader(BinaryReader reader)
Definition WorldFile.cs:921
static void DoRollingBackups(string backupWorldWritePath)
Definition WorldFile.cs:474
static double _tempTime
static int SaveNPCs(BinaryWriter writer)
Definition WorldFile.cs:791
static ? double _cachedTime
static Exception LastThrownLoadException
static bool SavingWorld
static void LoadWeightedPressurePlates(BinaryReader reader)
static void checkHalloween()
Definition Main.cs:7445
static string worldPathName
Definition Main.cs:5362
static void ToggleGameplayUpdates(bool state)
Definition Main.cs:3758
static string WorldPath
Definition Main.cs:2728
static void checkXMas()
Definition Main.cs:7436
static byte[] ReadAllBytes(string path, bool cloud=false)
static void CreateDirectory(string path)
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static UnifiedRandom genRand
Definition WorldGen.cs:38
static void RandomizeMoonState(UnifiedRandom random, bool garenteeNewStyle=false)
Definition WorldGen.cs:1501
static bool InWorld(int x, int y, int fluff=0)
Definition WorldGen.cs:1952
static void Log(object message)
Definition Debug.cs:51
static Object Load(string path)
Definition Resources.cs:20
static DateTime Now
Definition DateTime.cs:530
override string ToString()
Definition DateTime.cs:834
void ReregisterTile()
Definition Tile.cs:45
ushort type
Definition Tile.cs:58
short frameX
Definition Tile.cs:244
bool active()
Definition Tile.cs:1241