Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TileReachCheckSettings.cs
Go to the documentation of this file.
2
4{
6
7 public int? TileReachLimit;
8
9 public int? OverrideXReach;
10
11 public int? OverrideYReach;
12
14 {
15 get
16 {
18 result.TileRangeMultiplier = 1;
19 result.TileReachLimit = 20;
20 return result;
21 }
22 }
23
25 {
26 get
27 {
29 result.OverrideXReach = 60;
30 result.OverrideYReach = 60;
31 return result;
32 }
33 }
34
36 {
37 get
38 {
40 result.OverrideXReach = 39;
41 result.OverrideYReach = 39;
42 return result;
43 }
44 }
45
46 public void GetRanges(Player player, out int x, out int y)
47 {
48 x = Player.tileRangeX * TileRangeMultiplier;
49 y = Player.tileRangeY * TileRangeMultiplier;
50 int? tileReachLimit = TileReachLimit;
51 if (tileReachLimit.HasValue)
52 {
53 int value = tileReachLimit.Value;
54 if (x > value)
55 {
56 x = value;
57 }
58 if (y > value)
59 {
60 y = value;
61 }
62 }
63 if (OverrideXReach.HasValue)
64 {
65 x = OverrideXReach.Value;
66 }
67 if (OverrideYReach.HasValue)
68 {
69 y = OverrideYReach.Value;
70 }
71 }
72}
void GetRanges(Player player, out int x, out int y)