31726 {
31728 for (
int k = i -
num;
k < i +
num;
k++)
31729 {
31731 {
31733 {
31734 Main.tile[
k,
l].liquid = 0;
31735 Main.tile[
k,
l].lava(lava:
false);
31737 }
31738 }
31739 }
31742 Vector2D
vector2D =
default(Vector2D);
31743 vector2D.X = i;
31747 if (i > Main.maxTilesX / 2)
31748 {
31750 }
31752 {
31754 }
31760 {
31762 }
31763 if (
num34 > Main.maxTilesX)
31764 {
31765 num34 = Main.maxTilesX;
31766 }
31768 {
31770 }
31771 if (
num56 > Main.maxTilesY)
31772 {
31773 num56 = Main.maxTilesY;
31774 }
31776 {
31778 {
31779 Main.tile[
m,
n].liquid = 0;
31781 {
31782 Main.tile[
m,
n].wall = 0;
31784 {
31786 }
31787 Main.tile[
m,
n].active(active:
true);
31788 Main.tile[
m,
n].type = tileType;
31790 }
31791 }
31792 }
31798 {
31800 {
31803 {
31805 Main.tile[
num3,
num4].type = tileType;
31807 }
31808 }
31809 }
31815 {
31817 {
31820 {
31822 Main.tile[
num5,
num6].type = tileType;
31824 }
31825 }
31826 }
31831 {
31833 {
31836 {
31840 }
31841 }
31844 {
31847 }
31848 }
31850 {
31852 {
31854 if (!Main.wallDungeon[Main.tile[
num13,
num14].wall])
31855 {
31858 }
31860 {
31862 }
31864 }
31865 }
31871 {
31873 }
31874 if (
num34 > Main.maxTilesX)
31875 {
31876 num34 = Main.maxTilesX;
31877 }
31879 {
31881 }
31882 if (
num56 > Main.maxTilesY)
31883 {
31884 num56 = Main.maxTilesY;
31885 }
31887 {
31889 {
31893 }
31894 }
31900 {
31902 }
31903 if (
num34 > Main.maxTilesX)
31904 {
31905 num34 = Main.maxTilesX;
31906 }
31908 {
31910 }
31911 if (
num56 > Main.maxTilesY)
31912 {
31913 num56 = Main.maxTilesY;
31914 }
31916 {
31918 }
31920 {
31922 {
31926 }
31927 }
31933 {
31935 }
31936 if (
num34 > Main.maxTilesX)
31937 {
31938 num34 = Main.maxTilesX;
31939 }
31941 {
31943 }
31944 if (
num56 > Main.maxTilesY)
31945 {
31946 num56 = Main.maxTilesY;
31947 }
31949 {
31951 {
31955 }
31956 }
31960 {
31963 {
31967 break;
31968 }
31971 {
31975 break;
31976 }
31977 }
31989 {
31991 }
31992 if (
num34 > Main.maxTilesX)
31993 {
31994 num34 = Main.maxTilesX;
31995 }
31997 {
31999 }
32000 if (
num56 > Main.maxTilesY)
32001 {
32002 num56 = Main.maxTilesY;
32003 }
32005 {
32007 {
32010 {
32011 continue;
32012 }
32015 {
32017 {
32019 }
32020 }
32022 {
32024 }
32026 {
32031 }
32032 }
32033 }
32035 {
32037 {
32039 if (!Main.wallDungeon[Main.tile[
num27,
num28].wall])
32040 {
32043 }
32046 }
32047 }
32052 {
32054 }
32059 {
32061 {
32064 {
32068 }
32069 }
32070 }
32076 {
32078 {
32081 {
32085 }
32086 }
32087 }
32092 {
32094 }
32096 {
32098 {
32101 {
32105 }
32106 }
32109 {
32112 }
32113 }
32115 {
32121 {
32123 }
32124 if (
num34 > Main.maxTilesX)
32125 {
32126 num34 = Main.maxTilesX;
32127 }
32129 {
32131 }
32132 if (
num56 > Main.maxTilesY)
32133 {
32134 num56 = Main.maxTilesY;
32135 }
32137 {
32139 {
32142 }
32143 }
32144 }
32150 {
32152 }
32153 if (
num34 > Main.maxTilesX)
32154 {
32155 num34 = Main.maxTilesX;
32156 }
32158 {
32160 }
32161 if (
num56 > Main.maxTilesY)
32162 {
32163 num56 = Main.maxTilesY;
32164 }
32166 {
32168 {
32172 }
32173 }
32175 Main.dungeonY =
num56;
32177 Main.npc[
num40].homeless =
false;
32178 Main.npc[
num40].homeTileX = Main.dungeonX;
32179 Main.npc[
num40].homeTileY = Main.dungeonY;
32181 {
32182 int num41 = (int)Main.worldSurface;
32183 while (Main.tile[
GenVars.
dungeonX,
num41].active() || Main.tile[
GenVars.
dungeonX,
num41].wall > 0 || Main.tile[
GenVars.
dungeonX,
num41 - 1].active() || Main.tile[
GenVars.
dungeonX,
num41 - 1].wall > 0 || Main.tile[
GenVars.
dungeonX,
num41 - 2].active() || Main.tile[
GenVars.
dungeonX,
num41 - 2].wall > 0 || Main.tile[
GenVars.
dungeonX,
num41 - 3].active() || Main.tile[
GenVars.
dungeonX,
num41 - 3].wall > 0 || Main.tile[
GenVars.
dungeonX,
num41 - 4].active() || Main.tile[
GenVars.
dungeonX,
num41 - 4].wall > 0)
32184 {
32187 {
32188 break;
32189 }
32190 }
32192 {
32194 }
32195 }
32197 {
32200 {
32203 {
32206 {
32212 {
32216 }
32217 }
32218 }
32219 }
32220 else
32221 {
32224 {
32227 {
32233 {
32237 }
32238 }
32239 }
32240 }
32241 }
32248 {
32250 {
32253 }
32254 else
32255 {
32258 }
32259 }
32260 else
32261 {
32264 }
32266 {
32268 {
32270 }
32272 {
32275 {
32278 }
32279 }
32280 }
32282 {
32286 {
32288 }
32289 else
32290 {
32292 }
32294 {
32296 {
32300 }
32301 }
32302 }
32313 {
32315 }
32316 if (
num34 > Main.maxTilesX)
32317 {
32318 num34 = Main.maxTilesX;
32319 }
32321 {
32323 }
32324 if (
num56 > Main.maxTilesY)
32325 {
32326 num56 = Main.maxTilesY;
32327 }
32329 {
32331 {
32333 }
32334 }
32336 {
32337 vector2D.X -= 1.0;
32338 }
32340 }
Used when spawning Town NPCs during world generation.
static double dxStrength2
static int[] dungeonPlatformX
static double dyStrength1
static double dxStrength1
static int numDungeonPlatforms
static int[] dungeonPlatformY
static double dyStrength2
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 bool GrowDungeonTree(int i, int j, bool patch=false)
static void PlaceWall(int i, int j, int type, bool mute=false)
static bool drunkWorldGen
static bool InWorld(int x, int y, int fluff=0)
static bool getGoodWorldGen