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
TrackGenerator.cs
Go to the documentation of this file.
1using System;
6
8{
9 // Token: 0x020008DC RID: 2268
10 public class TrackGenerator
11 {
12 // Token: 0x060045B4 RID: 17844 RVA: 0x00255534 File Offset: 0x00253734
13 public bool Place(Point origin, int minLength, int maxLength)
14 {
15 if (!true)
16 {
17 }
18 this.CreateTrackStart(origin);
19 bool flag = this.FindPath(minLength, maxLength);
20 this.PlacePath();
21 return true;
22 }
23
24 // Token: 0x060045B5 RID: 17845 RVA: 0x00255560 File Offset: 0x00253760
25 private void PlacePath()
26 {
27 int length = this._length;
28 int length2 = this._length;
29 long num = 0L;
30 if (length2 == 0)
31 {
32 }
34 int num2 = 7;
35 if (genRand.Next(num2) != 0)
36 {
37 int num3 = this.playerHeight;
38 return;
39 }
40 if (length2 == 0)
41 {
42 }
44 int num4 = 5;
45 int num5 = 9;
46 int num6 = genRand2.Next(num4, num5);
48 if (length2 == 0)
49 {
50 }
52 Tile tile;
53 ushort wall = tile.wall;
54 if (history == null)
55 {
56 }
58 Tile tile2;
59 ushort wall2 = tile2.wall;
60 if (history == null)
61 {
62 }
63 Tile tile3;
64 ushort wall3 = tile3.wall;
65 if (history == null)
66 {
67 }
69 long num7 = 0L;
70 Tile tile4;
71 ushort type = tile4.type;
73 if (history3 == null)
74 {
75 }
76 int num8 = 1;
77 long num9 = 0L;
78 long num10 = 0L;
79 long num11 = 0L;
80 WorldGen.KillTile(0, (int)num7, num9 != 0L, num10 != 0L, num8 != 0);
81 int num12 = this.playerHeight;
82 long num13 = 0L;
83 if (num12 == 0)
84 {
85 }
87 int num14 = 7;
88 int num15;
89 if (genRand3.Next(num14) == 0)
90 {
91 if (num12 == 0)
92 {
93 }
95 num15 = 5;
96 int num16 = 9;
99 }
101 int num18 = 1;
102 long num19 = 0L;
103 Tile.SmoothSlope(0, num15, num18 != 0, num19 != 0L);
104 int num20 = this.playerHeight;
105 int num21 = 1;
106 Tile.SmoothSlope(0, num15, num21 != 0, num19 != 0L);
107 Tile tile5;
108 bool flag = tile5.wire();
110 if (num20 != 0 && num13 != 0L)
111 {
112 history6 = this._history;
113 if (history6 == null)
114 {
115 }
116 Tile tile6;
118 if (history6 == null)
119 {
120 }
121 int num22 = 314;
122 int num23 = 1;
123 int num24 = 1;
124 long num25 = 0L;
125 bool flag2 = WorldGen.PlaceTile(0, (int)num, num22, num25 != 0L, num23 != 0, (int)num11, num24);
126 return;
127 }
128 if (history6 == null)
129 {
130 }
131 int num26 = 314;
132 Tile tile7;
133 tile7.ResetToType((ushort)num26);
134 Tile tile8;
135 tile8.wire(false);
136 if (num13 != 0L)
137 {
139 int length3 = this._length;
140 int num27 = this.playerHeight;
141 int num28 = 1;
142 WorldUtils.TileFrame(0, (int)num, num28 != 0);
143 int num29 = this.playerHeight;
144 }
145 }
146
147 // Token: 0x060045B6 RID: 17846 RVA: 0x00255770 File Offset: 0x00253970
148 private void CreateTrackStart(Point origin)
149 {
150 if (!true)
151 {
152 }
153 int num = 1;
155 this.playerHeight = num;
157 int num2 = 1;
158 int xDirection = this._xDirection;
160 history2.X = (short)xDirection;
162 }
163
164 // Token: 0x060045B7 RID: 17847 RVA: 0x002557C0 File Offset: 0x002539C0
165 private bool FindPath(int minLength, int maxLength)
166 {
167 /*
168An exception occurred when decompiling this method (060045B7)
169
170ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Generation.TrackGenerator::FindPath(System.Int32,System.Int32)
171
172 ---> System.Exception: Basic block has to end with unconditional control flow.
173{
174 IL_0053:
175 stloc:int32(var_9_5B, call:int32(Math::Min, ldloc:int32(maxLength), ldloc:int32(var_5_31)))
176 stfld:int32(TrackGenerator::_length, ldloc:TrackGenerator(this), ldloc:int32(var_9_5B))
177 call:void(TrackGenerator::SmoothTrack, ldloc:TrackGenerator(this))
178 stloc:int32(var_11_74, ldfld:int32(TrackGenerator::_length, ldloc:TrackGenerator(this)))
179 stloc:int64(var_12_77, ldc.i4:int64(0))
180 stloc:TrackPlacementState(var_13_83, call:TrackPlacementState(TrackGenerator::GetHistorySegmentPlacementState, ldloc:TrackGenerator(this), ldloc:int64[exp:int32](var_12_77), ldloc:int32(var_11_74)))
181}
182
183 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
184 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
185 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
186 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
187 --- End of inner exception stack trace ---
188 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
189 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
190*/;
191 }
192
193 // Token: 0x060045B8 RID: 17848 RVA: 0x00255854 File Offset: 0x00253A54
195 {
196 int length = this._length;
198 int num = 2;
199 int xDirection = this._xDirection;
200 if (length == 0)
201 {
202 }
203 while (num == 0)
204 {
205 }
207 return trackPlacementState;
208 }
209
210 // Token: 0x060045B9 RID: 17849 RVA: 0x002558F0 File Offset: 0x00253AF0
218
219 // Token: 0x060045BA RID: 17850 RVA: 0x0025591C File Offset: 0x00253B1C
244
245 // Token: 0x060045BB RID: 17851 RVA: 0x00255A2C File Offset: 0x00253C2C
250
251 // Token: 0x060045BC RID: 17852 RVA: 0x00255A44 File Offset: 0x00253C44
257
258 // Token: 0x060045BD RID: 17853 RVA: 0x00255A74 File Offset: 0x00253C74
259 private void SmoothTrack()
260 {
261 int length = this._length;
262 if (!false)
263 {
264 }
265 int num = Math.Min(0, 43134976);
267 }
268
269 // Token: 0x060045BE RID: 17854 RVA: 0x00255AA8 File Offset: 0x00253CA8
270 private static bool CanSlopesTouch(TrackGenerator.TrackSlope leftSlope, TrackGenerator.TrackSlope rightSlope)
271 {
272 return true;
273 }
274
275 // Token: 0x060045BF RID: 17855 RVA: 0x00255AB8 File Offset: 0x00253CB8
276 private static bool FindSuitableOrigin(Point origin)
277 {
278 /*
279An exception occurred when decompiling this method (060045BF)
280
281ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Generation.TrackGenerator::FindSuitableOrigin(Microsoft.Xna.Framework.Point)
282
283 ---> System.Exception: Basic block has to end with unconditional control flow.
284{
285 IL_0016:
286 stloc:TrackPlacementState(var_3_21, call:TrackPlacementState(TrackGenerator::CalculateStateForLocation, ldc.i4:int32(0), ldc.i4:int32(43134976)))
287}
288
289 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
290 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
291 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
292 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
293 --- End of inner exception stack trace ---
294 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
295 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
296*/;
297 }
298
299 // Token: 0x060045C0 RID: 17856 RVA: 0x00255AE8 File Offset: 0x00253CE8
301 {
302 /*
303An exception occurred when decompiling this method (060045C0)
304
305ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.GameContent.Generation.TrackGenerator/TrackPlacementState Terraria.GameContent.Generation.TrackGenerator::CalculateStateForLocation(System.Int32,System.Int32)
306
307 ---> System.Exception: Basic block has to end with unconditional control flow.
308{
309 IL_001D:
310 stloc:int64(var_4_1E, ldc.i4:int64(0))
311 stloc:bool(var_5_29, call:bool(WorldGen::SolidTile, ldc.i4:int32(0), ldloc:int32(x), ldloc:int64[exp:bool](var_4_1E)))
312 stloc:int32(var_7_2F, ldc.i4:int32(2))
313 stloc:int32(var_8_36, ldc.i4:int32(314))
314 stloc:int32(var_9_3A, ldc.i4:int32(30))
315 stloc:bool(var_10_48, call:bool(WorldGen::IsTileNearby, ldloc:int32(var_7_2F), ldloc:int32(x), ldloc:int32(var_8_36), ldloc:int32(var_9_3A)))
316}
317
318 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
319 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
320 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
321 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
322 --- End of inner exception stack trace ---
323 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
324 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
325*/;
326 }
327
328 // Token: 0x060045C1 RID: 17857 RVA: 0x00255B40 File Offset: 0x00253D40
329 private static bool IsMinecartTrack(int x, int y)
330 {
331 /*
332An exception occurred when decompiling this method (060045C1)
333
334ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Generation.TrackGenerator::IsMinecartTrack(System.Int32,System.Int32)
335
336 ---> System.Exception: Basic block has to end with unconditional control flow.
337{
338 IL_000F:
339 stloc:uint16(var_4_15, callgetter:uint16(Tile::get_type, ldloc:Tile[exp:valuetype Terraria.Tile&](var_3)))
340}
341
342 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
343 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
344 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
345 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
346 --- End of inner exception stack trace ---
347 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
348 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
349*/;
350 }
351
352 // Token: 0x060045C2 RID: 17858 RVA: 0x00255B68 File Offset: 0x00253D68
353 private static bool IsLocationInvalid(int x, int y)
354 {
355 if (!true)
356 {
357 }
359 if (!true)
360 {
361 }
362 long num = 32752L;
363 int num2 = 32768;
364 if (num == 0L)
365 {
366 }
367 if (num2 == 0)
368 {
369 }
370 if (num2 == 0)
371 {
372 }
373 bool flag = WorldGen.oceanDepths(0, x);
374 int num3 = 1;
375 if (num3 == 0)
376 {
377 }
378 Tile tile;
379 ushort wall = tile.wall;
380 if (num3 == 0)
381 {
382 }
383 if (num == 0L)
384 {
385 }
386 while (num == 0L)
387 {
388 }
389 return false;
390 }
391
392 // Token: 0x060045C3 RID: 17859 RVA: 0x00255C10 File Offset: 0x00253E10
393 [Conditional("ENABLE_DEBUG")]
394 [Conditional("UNITY_EDITOR")]
395 private void DrawPause()
396 {
397 }
398
399 // Token: 0x060045C4 RID: 17860 RVA: 0x00255C20 File Offset: 0x00253E20
401 {
402 }
403
404 // Token: 0x060045C5 RID: 17861 RVA: 0x00255C3C File Offset: 0x00253E3C
405 // Note: this type is marked as 'beforefieldinit'.
407 {
408 }
409
410 // Token: 0x0400821A RID: 33306
411 private static readonly ushort[] InvalidWalls;
412
413 // Token: 0x0400821B RID: 33307
414 private static readonly ushort[] InvalidTiles;
415
416 // Token: 0x0400821C RID: 33308
418
419 // Token: 0x0400821D RID: 33309
421
422 // Token: 0x0400821E RID: 33310
423 private int _xDirection;
424
425 // Token: 0x0400821F RID: 33311
426 private int _length;
427
428 // Token: 0x04008220 RID: 33312
429 private int playerHeight = 6;
430
431 // Token: 0x020008DD RID: 2269
433 {
434 // Token: 0x04008222 RID: 33314
435 Available,
436 // Token: 0x04008223 RID: 33315
438 // Token: 0x04008224 RID: 33316
439 Invalid
440 }
441
442 // Token: 0x020008DE RID: 2270
443 private enum TrackSlope : sbyte
444 {
445 // Token: 0x04008226 RID: 33318
446 Up = -1,
447 // Token: 0x04008227 RID: 33319
448 Straight,
449 // Token: 0x04008228 RID: 33320
450 Down
451 }
452
453 // Token: 0x020008DF RID: 2271
454 private enum TrackMode : byte
455 {
456 // Token: 0x0400822A RID: 33322
457 Normal,
458 // Token: 0x0400822B RID: 33323
459 Tunnel
460 }
461
462 // Token: 0x020008E0 RID: 2272
463 [DebuggerDisplay("X = {X}, Y = {Y}, Slope = {Slope}")]
464 private struct TrackHistory
465 {
466 // Token: 0x060045C6 RID: 17862 RVA: 0x00255C4C File Offset: 0x00253E4C
467 public TrackHistory(int x, int y, TrackGenerator.TrackSlope slope)
468 {
469 this.X = (short)x;
470 this.Y = (short)y;
471 this.Slope = slope;
472 }
473
474 // Token: 0x0400822C RID: 33324
475 public short X;
476
477 // Token: 0x0400822D RID: 33325
478 public short Y;
479
480 // Token: 0x0400822E RID: 33326
482
483 // Token: 0x0400822F RID: 33327
485 }
486 }
487}
class f__AnonymousType0<< Count > j__TPar
static byte Min(byte val1, byte val2)
Definition Math.cs:152
bool Place(Point origin, int minLength, int maxLength)
static bool CanSlopesTouch(TrackGenerator.TrackSlope leftSlope, TrackGenerator.TrackSlope rightSlope)
readonly TrackGenerator.TrackHistory[] _rewriteHistory
TrackGenerator.TrackPlacementState GetHistorySegmentPlacementState(int startIndex, int length)
TrackGenerator.TrackPlacementState TryRewriteHistoryToAvoidTiles()
TrackGenerator.TrackPlacementState CreateTunnel()
bool FindPath(int minLength, int maxLength)
void RewriteSlopeDirection(int index, TrackGenerator.TrackSlope slope)
static TrackGenerator.TrackPlacementState CalculateStateForLocation(int x, int y)
readonly TrackGenerator.TrackHistory[] _history
void AppendToHistory(TrackGenerator.TrackSlope slope, TrackGenerator.TrackMode mode=TrackGenerator.TrackMode.Normal)
static int UnderworldLayer
Definition Main.cs:5133
static void TileFrame(int x, int y, bool frameNeighbors=false)
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static UnifiedRandom genRand
Definition WorldGen.cs:38
static bool oceanDepths(int x, int y)
Definition WorldGen.cs:2605
TrackHistory(int x, int y, TrackGenerator.TrackSlope slope)
static void SmoothSlope(int x, int y, bool applyToNeighbors=true, bool sync=false)
Definition Tile.cs:1338
void ResetToType(ushort type)
Definition Tile.cs:1298
ushort type
Definition Tile.cs:58
void ClearEverything()
Definition Tile.cs:355
ushort wall
Definition Tile.cs:85
bool wire()
Definition Tile.cs:1007