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
Modifiers.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x020004B1 RID: 1201
8 public static class Modifiers
9 {
10 // Token: 0x020004B2 RID: 1202
11 public class ShapeScale : GenAction
12 {
13 // Token: 0x06002FE9 RID: 12265 RVA: 0x001F501C File Offset: 0x001F321C
14 public ShapeScale(int scale)
15 {
17 base..ctor();
18 this._scale = scale;
19 }
20
21 // Token: 0x06002FEA RID: 12266 RVA: 0x001F5040 File Offset: 0x001F3240
22 public override bool Apply(Point origin, int x, int y, params object[] args)
23 {
24 if (this._scale == 0)
25 {
26 }
27 int scale = this._scale;
28 bool flag;
29 return flag;
30 }
31
32 // Token: 0x040039A0 RID: 14752
33 private int _scale;
34 }
35
36 // Token: 0x020004B3 RID: 1203
37 public class Expand : GenAction
38 {
39 // Token: 0x06002FEB RID: 12267 RVA: 0x001F5068 File Offset: 0x001F3268
40 public Expand(int expansion)
41 {
43 base..ctor();
45 }
46
47 // Token: 0x06002FEC RID: 12268 RVA: 0x001F508C File Offset: 0x001F328C
48 public Expand(int xExpansion, int yExpansion)
49 {
51 base..ctor();
53 }
54
55 // Token: 0x06002FED RID: 12269 RVA: 0x001F50B0 File Offset: 0x001F32B0
56 public override bool Apply(Point origin, int x, int y, params object[] args)
57 {
58 int xExpansion = this._xExpansion;
59 int yExpansion = this._yExpansion;
60 bool flag = base.UnitApply(origin, x, y, args);
61 int yExpansion2 = this._yExpansion;
62 int xExpansion2 = this._xExpansion;
63 return flag;
64 }
65
66 // Token: 0x040039A1 RID: 14753
67 private int _xExpansion;
68
69 // Token: 0x040039A2 RID: 14754
70 private int _yExpansion;
71 }
72
73 // Token: 0x020004B4 RID: 1204
74 public class RadialDither : GenAction
75 {
76 // Token: 0x06002FEE RID: 12270 RVA: 0x001F50E8 File Offset: 0x001F32E8
77 public RadialDither(double innerRadius, double outerRadius)
78 {
80 base..ctor();
82 }
83
84 // Token: 0x06002FEF RID: 12271 RVA: 0x001F510C File Offset: 0x001F330C
85 public override bool Apply(Point origin, int x, int y, params object[] args)
86 {
87 if (!true)
88 {
89 }
90 double innerRadius = this._innerRadius;
91 if (!true)
92 {
93 }
94 double num2;
95 double num = Math.Max(num2, num2);
97 return base.UnitApply(origin, x, y, args);
98 }
99
100 // Token: 0x040039A3 RID: 14755
101 private double _innerRadius;
102
103 // Token: 0x040039A4 RID: 14756
104 private double _outerRadius;
105 }
106
107 // Token: 0x020004B5 RID: 1205
108 public class Blotches : GenAction
109 {
110 // Token: 0x06002FF0 RID: 12272 RVA: 0x001F5160 File Offset: 0x001F3360
111 public Blotches(int scale = 2, double chance = 0.3)
112 {
114 base..ctor();
116 }
117
118 // Token: 0x06002FF1 RID: 12273 RVA: 0x001F5184 File Offset: 0x001F3384
119 public Blotches(int xScale, int yScale, double chance = 0.3)
120 {
122 base..ctor();
127 }
128
129 // Token: 0x06002FF2 RID: 12274 RVA: 0x001F51BC File Offset: 0x001F33BC
130 public Blotches(int leftScale, int upScale, int rightScale, int downScale, double chance = 0.3)
131 {
133 base..ctor();
134 this._minX = leftScale;
136 this._maxX = rightScale;
138 }
139
140 // Token: 0x06002FF3 RID: 12275 RVA: 0x001F51F4 File Offset: 0x001F33F4
141 public override bool Apply(Point origin, int x, int y, params object[] args)
142 {
143 int num = GenBase._random.InternalSample();
145 double chance = this._chance;
147 int minX = this._minX;
149 int maxX = this._maxX;
150 long num3 = 0L;
151 int num4 = random2.Next((int)num3, maxX);
153 int minY = this._minY;
154 int num5 = 1;
155 int num6 = random3.Next((int)num3, num5);
157 int maxY = this._maxY;
158 long num7 = 0L;
159 int num8 = random4.Next((int)num7, maxY);
160 return base.UnitApply(origin, maxY, y, args);
161 }
162
163 // Token: 0x040039A5 RID: 14757
164 private int _minX;
165
166 // Token: 0x040039A6 RID: 14758
167 private int _minY;
168
169 // Token: 0x040039A7 RID: 14759
170 private int _maxX;
171
172 // Token: 0x040039A8 RID: 14760
173 private int _maxY;
174
175 // Token: 0x040039A9 RID: 14761
176 private double _chance;
177 }
178
179 // Token: 0x020004B6 RID: 1206
180 public class InShape : GenAction
181 {
182 // Token: 0x06002FF4 RID: 12276 RVA: 0x001F52A4 File Offset: 0x001F34A4
184 {
186 base..ctor();
188 }
189
190 // Token: 0x06002FF5 RID: 12277 RVA: 0x001F52C8 File Offset: 0x001F34C8
191 public override bool Apply(Point origin, int x, int y, params object[] args)
192 {
194 return base.UnitApply(origin, x, y, args);
195 }
196
197 // Token: 0x040039AA RID: 14762
199 }
200
201 // Token: 0x020004B7 RID: 1207
202 public class NotInShape : GenAction
203 {
204 // Token: 0x06002FF6 RID: 12278 RVA: 0x001F52F4 File Offset: 0x001F34F4
206 {
208 base..ctor();
210 }
211
212 // Token: 0x06002FF7 RID: 12279 RVA: 0x001F5318 File Offset: 0x001F3518
213 public override bool Apply(Point origin, int x, int y, params object[] args)
214 {
217 bool flag;
218 return flag;
219 }
220
221 // Token: 0x040039AB RID: 14763
223 }
224
225 // Token: 0x020004B8 RID: 1208
226 public class Conditions : GenAction
227 {
228 // Token: 0x06002FF8 RID: 12280 RVA: 0x001F5340 File Offset: 0x001F3540
229 public Conditions(params GenCondition[] conditions)
230 {
232 base..ctor();
233 this._conditions = conditions;
234 }
235
236 // Token: 0x06002FF9 RID: 12281 RVA: 0x001F5364 File Offset: 0x001F3564
237 public override bool Apply(Point origin, int x, int y, params object[] args)
238 {
239 int height = this._conditions._height;
240 GenCondition[] conditions = this._conditions;
241 return base.UnitApply(origin, x, y, args);
242 }
243
244 // Token: 0x040039AC RID: 14764
246 }
247
248 // Token: 0x020004B9 RID: 1209
249 public class OnlyWalls : GenAction
250 {
251 // Token: 0x06002FFA RID: 12282 RVA: 0x001F53A0 File Offset: 0x001F35A0
252 public OnlyWalls(params ushort[] types)
253 {
255 base..ctor();
256 this._types = types;
257 }
258
259 // Token: 0x06002FFB RID: 12283 RVA: 0x001F53C4 File Offset: 0x001F35C4
260 public override bool Apply(Point origin, int x, int y, params object[] args)
261 {
262 ushort[] types = this._types;
263 Tile tile;
264 ushort wall = tile.wall;
265 ushort[] types2 = this._types;
267 return base.UnitApply(origin, x, y, args);
268 }
269
270 // Token: 0x040039AD RID: 14765
271 private ushort[] _types;
272 }
273
274 // Token: 0x020004BA RID: 1210
275 public class OnlyTiles : GenAction
276 {
277 // Token: 0x06002FFC RID: 12284 RVA: 0x001F53FC File Offset: 0x001F35FC
278 public OnlyTiles(params ushort[] types)
279 {
281 base..ctor();
282 this._types = types;
283 }
284
285 // Token: 0x06002FFD RID: 12285 RVA: 0x001F5420 File Offset: 0x001F3620
286 public override bool Apply(Point origin, int x, int y, params object[] args)
287 {
288 if (!true)
289 {
290 }
291 Tile tile;
292 bool flag = tile.active();
293 ushort[] types = this._types;
294 Tile tile2;
295 ushort type = tile2.type;
296 ushort[] types2 = this._types;
298 return base.UnitApply(origin, x, y, args);
299 }
300
301 // Token: 0x040039AE RID: 14766
302 private ushort[] _types;
303 }
304
305 // Token: 0x020004BB RID: 1211
306 public class IsTouching : GenAction
307 {
308 // Token: 0x06002FFE RID: 12286 RVA: 0x001F5464 File Offset: 0x001F3664
309 public IsTouching(bool useDiagonals, params ushort[] tileIds)
310 {
312 base..ctor();
314 }
315
316 // Token: 0x06002FFF RID: 12287 RVA: 0x001F5488 File Offset: 0x001F3688
317 public override bool Apply(Point origin, int x, int y, params object[] args)
318 {
319 bool useDiagonals = this._useDiagonals;
320 if (8 == 0)
321 {
322 }
323 Tile tile;
324 bool flag = tile.active();
325 ushort[] tileIds = this._tileIds;
326 ushort[] tileIds2 = this._tileIds;
328 return base.UnitApply(origin, x, y, args);
329 }
330
331 // Token: 0x06003000 RID: 12288 RVA: 0x001F54D4 File Offset: 0x001F36D4
332 // Note: this type is marked as 'beforefieldinit'.
333 static IsTouching()
334 {
335 }
336
337 // Token: 0x040039AF RID: 14767
338 private static readonly int[] DIRECTIONS;
339
340 // Token: 0x040039B0 RID: 14768
341 private bool _useDiagonals;
342
343 // Token: 0x040039B1 RID: 14769
344 private ushort[] _tileIds;
345 }
346
347 // Token: 0x020004BC RID: 1212
348 public class NotTouching : GenAction
349 {
350 // Token: 0x06003001 RID: 12289 RVA: 0x001F54E4 File Offset: 0x001F36E4
351 public NotTouching(bool useDiagonals, params ushort[] tileIds)
352 {
354 base..ctor();
356 }
357
358 // Token: 0x06003002 RID: 12290 RVA: 0x001F5508 File Offset: 0x001F3708
359 public override bool Apply(Point origin, int x, int y, params object[] args)
360 {
361 bool useDiagonals = this._useDiagonals;
362 if (8 == 0)
363 {
364 }
365 Tile tile;
366 bool flag = tile.active();
367 ushort[] tileIds = this._tileIds;
368 ushort[] tileIds2 = this._tileIds;
369 return base.UnitApply(origin, x, y, args);
370 }
371
372 // Token: 0x06003003 RID: 12291 RVA: 0x001F5558 File Offset: 0x001F3758
373 // Note: this type is marked as 'beforefieldinit'.
374 static NotTouching()
375 {
376 }
377
378 // Token: 0x040039B2 RID: 14770
379 private static readonly int[] DIRECTIONS;
380
381 // Token: 0x040039B3 RID: 14771
382 private bool _useDiagonals;
383
384 // Token: 0x040039B4 RID: 14772
385 private ushort[] _tileIds;
386 }
387
388 // Token: 0x020004BD RID: 1213
390 {
391 // Token: 0x06003004 RID: 12292 RVA: 0x001F5568 File Offset: 0x001F3768
392 public IsTouchingAir(bool useDiagonals = false)
393 {
395 base..ctor();
396 }
397
398 // Token: 0x06003005 RID: 12293 RVA: 0x001F5584 File Offset: 0x001F3784
399 public override bool Apply(Point origin, int x, int y, params object[] args)
400 {
401 bool useDiagonals = this._useDiagonals;
402 if (8 == 0)
403 {
404 }
405 Tile tile;
406 bool flag = tile.active();
408 return flag;
409 }
410
411 // Token: 0x06003006 RID: 12294 RVA: 0x001F55C0 File Offset: 0x001F37C0
412 // Note: this type is marked as 'beforefieldinit'.
414 {
415 }
416
417 // Token: 0x040039B5 RID: 14773
418 private static readonly int[] DIRECTIONS;
419
420 // Token: 0x040039B6 RID: 14774
421 private bool _useDiagonals;
422 }
423
424 // Token: 0x020004BE RID: 1214
425 public class SkipTiles : GenAction
426 {
427 // Token: 0x06003007 RID: 12295 RVA: 0x001F55D0 File Offset: 0x001F37D0
428 public SkipTiles(params ushort[] types)
429 {
431 base..ctor();
432 this._types = types;
433 }
434
435 // Token: 0x06003008 RID: 12296 RVA: 0x001F55F4 File Offset: 0x001F37F4
436 public override bool Apply(Point origin, int x, int y, params object[] args)
437 {
438 if (!true)
439 {
440 }
441 Tile tile;
442 bool flag = tile.active();
443 ushort[] types = this._types;
444 Tile tile2;
445 ushort type = tile2.type;
446 ushort[] types2 = this._types;
447 return base.UnitApply(origin, x, y, args);
448 }
449
450 // Token: 0x040039B7 RID: 14775
451 private ushort[] _types;
452 }
453
454 // Token: 0x020004BF RID: 1215
455 public class HasLiquid : GenAction
456 {
457 // Token: 0x06003009 RID: 12297 RVA: 0x001F5640 File Offset: 0x001F3840
458 public HasLiquid(int liquidLevel = -1, int liquidType = -1)
459 {
461 base..ctor();
462 this._liquidType = liquidType;
463 }
464
465 // Token: 0x0600300A RID: 12298 RVA: 0x001F5664 File Offset: 0x001F3864
466 public override bool Apply(Point origin, int x, int y, params object[] args)
467 {
468 if (!true)
469 {
470 }
471 int liquidType = this._liquidType;
472 Tile tile;
473 byte b = tile.liquidType();
474 int liquidLevel = this._liquidLevel;
476 return base.UnitApply(origin, x, y, args);
477 }
478
479 // Token: 0x040039B8 RID: 14776
480 private int _liquidType;
481
482 // Token: 0x040039B9 RID: 14777
483 private int _liquidLevel;
484 }
485
486 // Token: 0x020004C0 RID: 1216
487 public class SkipWalls : GenAction
488 {
489 // Token: 0x0600300B RID: 12299 RVA: 0x001F56AC File Offset: 0x001F38AC
490 public SkipWalls(params ushort[] types)
491 {
493 base..ctor();
494 this._types = types;
495 }
496
497 // Token: 0x0600300C RID: 12300 RVA: 0x001F56D0 File Offset: 0x001F38D0
498 public override bool Apply(Point origin, int x, int y, params object[] args)
499 {
500 ushort[] types = this._types;
501 Tile tile;
502 ushort wall = tile.wall;
503 ushort[] types2 = this._types;
504 return base.UnitApply(origin, x, y, args);
505 }
506
507 // Token: 0x040039BA RID: 14778
508 private ushort[] _types;
509 }
510
511 // Token: 0x020004C1 RID: 1217
512 public class IsEmpty : GenAction
513 {
514 // Token: 0x0600300D RID: 12301 RVA: 0x001F5710 File Offset: 0x001F3910
515 public override bool Apply(Point origin, int x, int y, params object[] args)
516 {
517 if (!true)
518 {
519 }
520 Tile tile;
521 bool flag = tile.active();
523 return flag;
524 }
525
526 // Token: 0x0600300E RID: 12302 RVA: 0x001F573C File Offset: 0x001F393C
527 public IsEmpty()
528 {
530 base..ctor();
531 }
532 }
533
534 // Token: 0x020004C2 RID: 1218
535 public class IsSolid : GenAction
536 {
537 // Token: 0x0600300F RID: 12303 RVA: 0x001F5758 File Offset: 0x001F3958
538 public override bool Apply(Point origin, int x, int y, params object[] args)
539 {
540 if (!true)
541 {
542 }
543 Tile tile;
544 bool flag = tile.active();
545 bool flag2 = WorldGen.SolidOrSlopedTile(x, y);
546 return base.UnitApply(origin, x, y, args);
547 }
548
549 // Token: 0x06003010 RID: 12304 RVA: 0x001F5790 File Offset: 0x001F3990
550 public IsSolid()
551 {
553 base..ctor();
554 }
555 }
556
557 // Token: 0x020004C3 RID: 1219
558 public class IsNotSolid : GenAction
559 {
560 // Token: 0x06003011 RID: 12305 RVA: 0x001F57AC File Offset: 0x001F39AC
561 public override bool Apply(Point origin, int x, int y, params object[] args)
562 {
563 if (!true)
564 {
565 }
566 Tile tile;
567 bool flag = tile.active();
568 bool flag2 = WorldGen.SolidOrSlopedTile(x, y);
570 return flag2;
571 }
572
573 // Token: 0x06003012 RID: 12306 RVA: 0x001F57E0 File Offset: 0x001F39E0
574 public IsNotSolid()
575 {
577 base..ctor();
578 }
579 }
580
581 // Token: 0x020004C4 RID: 1220
583 {
584 // Token: 0x06003013 RID: 12307 RVA: 0x001F57FC File Offset: 0x001F39FC
585 public RectangleMask(int xMin, int xMax, int yMin, int yMax)
586 {
588 base..ctor();
589 this._xMin = xMin;
590 this._xMax = yMin;
591 this._xMax = xMax;
592 }
593
594 // Token: 0x06003014 RID: 12308 RVA: 0x001F582C File Offset: 0x001F3A2C
595 public override bool Apply(Point origin, int x, int y, params object[] args)
596 {
597 int xMin = this._xMin;
598 int xMax = this._xMax;
599 int yMin = this._yMin;
600 int yMax = this._yMax;
602 return base.UnitApply(origin, x, y, args);
603 }
604
605 // Token: 0x040039BB RID: 14779
606 private int _xMin;
607
608 // Token: 0x040039BC RID: 14780
609 private int _yMin;
610
611 // Token: 0x040039BD RID: 14781
612 private int _xMax;
613
614 // Token: 0x040039BE RID: 14782
615 private int _yMax;
616 }
617
618 // Token: 0x020004C5 RID: 1221
619 public class Offset : GenAction
620 {
621 // Token: 0x06003015 RID: 12309 RVA: 0x001F5868 File Offset: 0x001F3A68
622 public Offset(int x, int y)
623 {
625 base..ctor();
626 this._xOffset = x;
627 }
628
629 // Token: 0x06003016 RID: 12310 RVA: 0x001F588C File Offset: 0x001F3A8C
630 public override bool Apply(Point origin, int x, int y, params object[] args)
631 {
632 int xOffset = this._xOffset;
633 return base.UnitApply(origin, x, y, args);
634 }
635
636 // Token: 0x040039BF RID: 14783
637 private int _xOffset;
638
639 // Token: 0x040039C0 RID: 14784
640 private int _yOffset;
641 }
642
643 // Token: 0x020004C6 RID: 1222
644 public class Dither : GenAction
645 {
646 // Token: 0x06003017 RID: 12311 RVA: 0x001F58AC File Offset: 0x001F3AAC
647 public Dither(double failureChance = 0.5)
648 {
650 base..ctor();
652 }
653
654 // Token: 0x06003018 RID: 12312 RVA: 0x001F58D0 File Offset: 0x001F3AD0
655 public override bool Apply(Point origin, int x, int y, params object[] args)
656 {
657 int num = GenBase._random.InternalSample();
658 double failureChance = this._failureChance;
660 return base.UnitApply(origin, x, y, args);
661 }
662
663 // Token: 0x040039C1 RID: 14785
664 private double _failureChance;
665 }
666
667 // Token: 0x020004C7 RID: 1223
668 public class Flip : GenAction
669 {
670 // Token: 0x06003019 RID: 12313 RVA: 0x001F5904 File Offset: 0x001F3B04
671 public Flip(bool flipX, bool flipY)
672 {
674 base..ctor();
675 }
676
677 // Token: 0x0600301A RID: 12314 RVA: 0x001F5920 File Offset: 0x001F3B20
678 public override bool Apply(Point origin, int x, int y, params object[] args)
679 {
680 bool flipX = this._flipX;
681 bool flipY = this._flipY;
682 return base.UnitApply(origin, x, y, args);
683 }
684
685 // Token: 0x040039C2 RID: 14786
686 private bool _flipX;
687
688 // Token: 0x040039C3 RID: 14787
689 private bool _flipY;
690 }
691 }
692}
class f__AnonymousType0<< Count > j__TPar
static byte Max(byte val1, byte val2)
Definition Math.cs:111
static UnifiedRandom _random
Definition GenBase.cs:13
Blotches(int xScale, int yScale, double chance=0.3)
Definition Modifiers.cs:119
Blotches(int scale=2, double chance=0.3)
Definition Modifiers.cs:111
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:141
Blotches(int leftScale, int upScale, int rightScale, int downScale, double chance=0.3)
Definition Modifiers.cs:130
Conditions(params GenCondition[] conditions)
Definition Modifiers.cs:229
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:237
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:655
Dither(double failureChance=0.5)
Definition Modifiers.cs:647
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:56
Expand(int xExpansion, int yExpansion)
Definition Modifiers.cs:48
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:678
Flip(bool flipX, bool flipY)
Definition Modifiers.cs:671
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:466
HasLiquid(int liquidLevel=-1, int liquidType=-1)
Definition Modifiers.cs:458
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:191
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:515
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:561
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:538
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:399
IsTouching(bool useDiagonals, params ushort[] tileIds)
Definition Modifiers.cs:309
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:317
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:213
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:359
NotTouching(bool useDiagonals, params ushort[] tileIds)
Definition Modifiers.cs:351
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:630
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:286
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:260
RadialDither(double innerRadius, double outerRadius)
Definition Modifiers.cs:77
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:85
RectangleMask(int xMin, int xMax, int yMin, int yMax)
Definition Modifiers.cs:585
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:595
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:22
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:436
override bool Apply(Point origin, int x, int y, params object[] args)
Definition Modifiers.cs:498
static bool SolidOrSlopedTile(Tile tile)
void liquidType(int liquidType)
Definition Tile.cs:936
ushort type
Definition Tile.cs:58
bool active()
Definition Tile.cs:1241
ushort wall
Definition Tile.cs:85