20668 {
20675 bool flag = true;
20677 while (true)
20678 {
20681 {
20682 break;
20683 }
20687 {
20689 }
20691 {
20692 if (i >
num6 - 2 && i <=
num6 + 1)
20693 {
20695 {
20696 if (Main.tile[i,
num4].type != 19 && Main.tile[i,
num4].type != 15 && Main.tile[i,
num4].type != 304 && Main.tile[i,
num4].type != 21 && Main.tile[i,
num4].type != 10 && Main.tile[i,
num4 - 1].type != 15 && Main.tile[i,
num4 - 1].type != 304 && Main.tile[i,
num4 - 1].type != 21 && Main.tile[i,
num4 - 1].type != 10 && Main.tile[i,
num4 + 1].type != 10)
20697 {
20699 }
20700 if (!Main.wallDungeon[Main.tile[i,
num4].wall])
20701 {
20702 Main.tile[
i,
num4].wall = 244;
20703 }
20704 if (!Main.wallDungeon[Main.tile[i - 1,
num4].wall] && (Main.tile[i - 1,
num4].wall > 0 || (
double)
num4 >= Main.worldSurface))
20705 {
20706 Main.tile[
i - 1,
num4].wall = 244;
20707 }
20708 if (!Main.wallDungeon[Main.tile[i + 1,
num4].wall] && (Main.tile[i + 1,
num4].wall > 0 || (
double)
num4 >= Main.worldSurface))
20709 {
20710 Main.tile[
i + 1,
num4].wall = 244;
20711 }
20713 {
20714 Main.tile[
i,
num4 + 1].active(active:
false);
20716 }
20717 }
20718 }
20719 else
20720 {
20721 if (Main.tile[i,
num4].type != 15 && Main.tile[i,
num4].type != 304 && Main.tile[i,
num4].type != 21 && Main.tile[i,
num4].type != 10 && Main.tile[i - 1,
num4].type != 10 && Main.tile[i + 1,
num4].type != 10)
20722 {
20723 if (!Main.wallDungeon[Main.tile[i,
num4].wall])
20724 {
20725 Main.tile[
i,
num4].type = 191;
20726 Main.tile[
i,
num4].active(active:
true);
20727 Main.tile[
i,
num4].halfBrick(halfBrick:
false);
20728 }
20729 if (Main.tile[i - 1,
num4].type == 40)
20730 {
20731 Main.tile[
i - 1,
num4].type = 0;
20732 }
20733 if (Main.tile[i + 1,
num4].type == 40)
20734 {
20735 Main.tile[
i + 1,
num4].type = 0;
20736 }
20737 }
20739 {
20740 Main.tile[
i,
num4].wall = 244;
20741 }
20742 }
20744 {
20747 }
20748 }
20751 {
20752 continue;
20753 }
20757 {
20759 }
20760 if (flag)
20761 {
20763 }
20765 {
20767 }
20769 {
20771 }
20773 {
20774 flag = false;
20776 if (Main.wallDungeon[Main.tile[
minl,
num4 + 1].wall] || Main.wallDungeon[Main.tile[
minl + 1,
num4 + 1].wall] || Main.wallDungeon[Main.tile[
minl + 2,
num4 + 1].wall])
20777 {
20779 }
20781 {
20782 continue;
20783 }
20785 {
20787 {
20788 Main.tile[
k,
num4 + 1].active(active:
false);
20789 Main.tile[
k,
num4 + 1].halfBrick(halfBrick:
false);
20790 Main.tile[
k,
num4 + 1].slope(0);
20792 }
20793 }
20794 }
20795 else
20796 {
20799 }
20800 }
20805 {
20806 for (
int m =
j - 3;
m <=
j;
m++)
20807 {
20808 Main.tile[
l,
m].active(active:
false);
20809 if (!Main.wallDungeon[Main.tile[
l,
m].wall])
20810 {
20811 Main.tile[
l,
m].wall = 244;
20812 }
20813 }
20814 }
20815 }
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static UnifiedRandom genRand
static void SquareWallFrame(int i, int j, bool resetFrame=true)
static void SquareTileFrame(int i, int j, bool resetFrame=true)