14 Point point = trackWorldPosition.ToTileCoordinates();
20 point2.X += digDirectionX;
21 point2.Y += digDirectionY;
27 if (digDirectionY != 0)
31 Point point3 = point2;
32 Point point4 = point3;
35 for (
int i = point4.
Y; i <= point3.
Y; i++)
45 for (
int j = point4.
Y; j <= point3.
Y; j++)
77 for (
int i = 0; i < 58; i++)
82 if (item.type == 2340 && item.stack > 0)
104 if (!tileSafely.
active() || tileSafely.
type != 314)
108 if (!tileSafely2.
active() || tileSafely2.
type != 314)
112 GetExpectedDirections(tileCoordsOfFrontWheel, tileCoordsWeWantToReach, out var expectedStartLeft, out var expectedStartRight, out var expectedEndLeft, out var expectedEndRight);
124 private static void GetExpectedDirections(
Point startCoords,
Point endCoords, out
int? expectedStartLeft, out
int? expectedStartRight, out
int? expectedEndLeft, out
int? expectedEndRight)
126 int num = endCoords.Y - startCoords.
Y;
127 int num2 = endCoords.X - startCoords.
X;
128 expectedStartLeft =
null;
129 expectedStartRight =
null;
130 expectedEndLeft =
null;
131 expectedEndRight =
null;
134 expectedStartLeft = num;
135 expectedEndRight = -num;
139 expectedStartRight = num;
140 expectedEndLeft = -num;
151 GetExpectedDirections(startCoords, endCoords, out var expectedStartLeft, out var expectedStartRight, out var expectedEndLeft, out var expectedEndRight);
154 if (tileSafely.
active() && tileSafely.
type == 314)
158 if (tileSafely2.
active() && tileSafely2.
type == 314)
203 AchievementsHelper.CurrentlyMining =
true;
209 AchievementsHelper.CurrentlyMining =
false;
static float Clamp(float value, float min, float max)
static Tile GetTileSafely(Vector2 position)
void MineTheTileIfNecessary(int x, int y)
void PoundTrack(Point spot)
bool CanGetPastTile(int x, int y)
void TryDigging(Player player, Vector2 trackWorldPosition, int digDirectionX, int digDirectionY)
void ConsumeATrackItem(Player player)
bool DoTheTracksConnectProperly(Point tileCoordsOfFrontWheel, Point tileCoordsWeWantToReach)
bool CanConsumeATrackItem(Player player)
Item FindMinecartTrackItem(Player player)
static MinecartDiggerHelper Instance
static void GetExpectedDirections(Point startCoords, Point endCoords, out int? expectedStartLeft, out int? expectedStartRight, out int? expectedEndLeft, out int? expectedEndRight)
bool HasPickPower(Player player, int x, int y)
void CorrectTrackConnections(Point startCoords, Point endCoords)
void PlaceATrack(int x, int y)
bool AlreadyLeadsIntoWantedTrack(Point tileCoordsOfFrontWheel, Point tileCoordsWeWantToReach)
static double worldSurface
static bool FrameTrack(int i, int j, bool pound, bool mute=false)
static void TryFittingTileOrientation(Point tileCoords, int? expectedYOffsetForLeft, int? expectedYOffsetForRight)
static bool GetAreExpectationsForSidesMet(Point tileCoords, int? expectedYOffsetForLeft, int? expectedYOffsetForRight)
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
bool HasEnoughPickPowerToHurtTile(int x, int y)
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 bool CanKillTile(int i, int j, SpecialKillTileContext context)
static int CheckTileBreakability(int x, int y)
static bool CheckTileBreakability2_ShouldTileSurvive(int x, int y)