324 {
325 for (
int i = 0;
i <
data.Length;
i++)
326 {
328 }
329 if (!Main.SettingsEnabled_MinersWobble)
330 {
331 return;
332 }
333 int num = 1;
335 if (Main.drawToScreen)
336 {
338 }
340 bool flag = Main.ShouldShowInvisibleWalls();
341 for (
int j = 0; j <
data.Length; j++)
342 {
344 {
345 continue;
346 }
348 if (damage < 20)
349 {
350 continue;
351 }
355 {
356 continue;
357 }
358 Tile tile = Main.tile[x, y];
359 bool flag2 = tile != null;
360 if (flag2 && num == 1)
361 {
362 flag2 = flag2 && tile.active() && Main.tileSolid[Main.tile[x, y].type] && (!tile.invisibleBlock() || flag);
363 }
364 if (flag2 && num == 2)
365 {
366 flag2 = flag2 && tile.wall != 0 && (!tile.invisibleWall() || flag);
367 }
368 if (!flag2)
369 {
370 continue;
371 }
372 bool flag3 = false;
373 bool flag4 = false;
374 if (tile.type == 10)
375 {
376 flag3 = false;
377 }
378 else if (Main.tileSolid[tile.type] && !Main.tileSolidTop[tile.type])
379 {
380 flag3 = true;
381 }
382 else if (
WorldGen.IsTreeType(tile.type))
383 {
384 flag4 = true;
385 int num2 = tile.frameX / 22;
386 int num3 = tile.frameY / 22;
387 if (num3 < 9)
388 {
389 flag3 = ((num2 != 1 && num2 != 2) || num3 < 6 || num3 > 8) && (num2 != 3 || num3 > 2) && (num2 != 4 || num3 < 3 || num3 > 5) && ((num2 != 5 || num3 < 6 || num3 > 8) ? true : false);
390 }
391 }
392 else if (tile.type == 72)
393 {
394 flag4 = true;
395 if (tile.frameX <= 34)
396 {
397 flag3 = true;
398 }
399 }
400 if (!flag3 || tile.slope() != 0 || tile.halfBrick())
401 {
402 continue;
403 }
404 int num4 = 0;
405 if (damage >= 80)
406 {
407 num4 = 3;
408 }
409 else if (damage >= 60)
410 {
411 num4 = 2;
412 }
413 else if (damage >= 40)
414 {
415 num4 = 1;
416 }
417 else if (damage >= 20)
418 {
419 num4 = 0;
420 }
422 value.Inflate(-2, -2);
423 if (flag4)
424 {
426 }
428 if (!((float)animationTimeElapsed >= 10f))
429 {
430 float num5 = (float)animationTimeElapsed / 10f;
431 Color color = Lighting.GetColor(x, y);
432 float rotation = 0f;
434 float num6 = 0.5f;
435 float num7 = num5 % num6;
436 num7 *= 1f / num6;
437 if ((int)(num5 / num6) % 2 == 1)
438 {
439 num7 = 1f - num7;
440 }
441 Tile tileSafely = Framing.GetTileSafely(x, y);
442 Tile tile2 = tileSafely;
443 Texture2D texture2D = Main.instance.TilePaintSystem.TryGetTileAndRequestIfNotReady(tileSafely.type, 0, tileSafely.color());
444 if (texture2D != null)
445 {
448 float num8 = num7 * 0.2f + 1f;
449 float num9 = 1f - num7;
450 num9 = 1f;
451 color *= num9 * num9 * 0.8f;
452 Vector2 scale = num8 * vector3;
453 Vector2 position = (
new Vector2(x * 16 - (
int)Main.screenPosition.X, y * 16 - (
int)Main.screenPosition.Y) + vector + vector2 + zero).Floor();
454 spriteBatch.
Draw(texture2D, position,
new Rectangle(tile2.frameX, tile2.frameY, 16, 16), color, rotation, vector2, scale,
SpriteEffects.None, 0f);
455 color.A = 180;
457 }
458 }
459 }
460 }
void Draw(Texture2D texture, Vector2 position, Color color)
static Asset< Texture2D > TileCrack