20818 {
20822 bool flag2 =
false;
20832 {
20838 {
20840 break;
20841 }
20844 {
20846 }
20848 {
20849 if (Main.wallDungeon[Main.tile[i,
num4].wall])
20850 {
20851 flag = true;
20853 }
20854 if (i >
num9 - 2 && i <=
num9 + 1)
20855 {
20857 {
20858 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)
20859 {
20861 }
20862 if (!Main.wallDungeon[Main.tile[i,
num4].wall])
20863 {
20864 Main.tile[
i,
num4].wall = 244;
20865 }
20866 if (!Main.wallDungeon[Main.tile[i - 1,
num4].wall] && (Main.tile[i - 1,
num4].wall > 0 || (
double)
num4 >= Main.worldSurface))
20867 {
20868 Main.tile[
i - 1,
num4].wall = 244;
20869 }
20870 if (!Main.wallDungeon[Main.tile[i + 1,
num4].wall] && (Main.tile[i + 1,
num4].wall > 0 || (
double)
num4 >= Main.worldSurface))
20871 {
20872 Main.tile[
i + 1,
num4].wall = 244;
20873 }
20875 {
20876 Main.tile[
i,
num4 + 1].active(active:
false);
20878 }
20879 }
20880 }
20881 else
20882 {
20883 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)
20884 {
20885 if (!Main.wallDungeon[Main.tile[i,
num4].wall])
20886 {
20887 Main.tile[
i,
num4].type = 191;
20888 Main.tile[
i,
num4].active(active:
true);
20889 Main.tile[
i,
num4].halfBrick(halfBrick:
false);
20890 }
20891 if (Main.tile[i - 1,
num4].type == 40)
20892 {
20893 Main.tile[
i - 1,
num4].type = 0;
20894 }
20895 if (Main.tile[i + 1,
num4].type == 40)
20896 {
20897 Main.tile[
i + 1,
num4].type = 0;
20898 }
20899 }
20901 {
20902 Main.tile[
i,
num4].wall = 244;
20903 }
20904 }
20906 {
20909 }
20910 }
20913 {
20917 {
20919 }
20921 {
20923 }
20925 {
20927 }
20929 {
20931 }
20933 {
20935 int style = 23;
20936 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])
20937 {
20938 style = 12;
20939 }
20941 {
20943 {
20944 Main.tile[
k,
num4 + 1].active(active:
false);
20946 }
20947 }
20948 }
20949 else
20950 {
20953 }
20955 {
20958 {
20960 }
20961 }
20962 if (
num5 <= 0 && !flag)
20963 {
20964 flag = true;
20966 }
20967 }
20969 {
20972 {
20974 {
20976 {
20978 }
20979 }
20980 }
20982 {
20984 }
20985 }
20986 else
20987 {
20989 {
20990 continue;
20991 }
20994 {
20996 {
20998 {
21000 }
21001 }
21002 }
21004 {
21006 }
21007 }
21008 }
21013 {
21015 {
21019 {
21021 {
21023 {
21025 }
21026 }
21027 }
21029 {
21031 }
21032 }
21033 }
21034 }
static bool GrowLivingTree_HorizontalTunnel(int i, int j)
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 GrowLivingTreePassageRoom(int minl, int minr, int Y)
static void SquareTileFrame(int i, int j, bool resetFrame=true)