Definition at line 6880 of file WorldGen.cs.
6881 {
6882
6883
6885 if (!Main.tile[
X, i].active() && Main.tile[
X, i].wall == 0)
6886 {
6887 for (; !Main.tile[
X,
i].active() && Main.tile[
X, i].wall == 0 && (
double)i <= Main.worldSurface;
i++)
6888 {
6889 }
6890 if ((
double)
i > Main.worldSurface - 10.0)
6891 {
6892 return false;
6893 }
6894 if (Main.tile[
X, i].type != 53)
6895 {
6896 return false;
6897 }
6898 int num = 350;
6900 {
6902 {
6903 return false;
6904 }
6905 }
6911 {
6912 for (
int l = i - oasisHeight;
l <=
i + oasisHeight +
num4;
l++)
6913 {
6914 Tile tile = Main.tile[
k,
l];
6915 if (tile.active())
6916 {
6917 if (Main.tileSolid[tile.type])
6918 {
6919 if ((tile.type == 151 || tile.type == 397) &&
Math.
Abs(
k -
X) <
num2 &&
Math.
Abs(
l - i) < oasisHeight / 2)
6920 {
6921 return false;
6922 }
6923 if (tile.type != 53)
6924 {
6925 return false;
6926 }
6927 }
6928 }
6929 else if ((tile.liquid > 0 || tile.wall > 0) &&
Math.
Abs(
k -
X) <
num2 &&
Math.
Abs(
l - i) < oasisHeight / 2)
6930 {
6931 return false;
6932 }
6933 }
6935 {
6936 if (Main.tile[
k, i - 6].active())
6937 {
6938 return false;
6939 }
6940 if (!Main.tile[
k, i + 1].active())
6941 {
6942 return false;
6943 }
6944 }
6945 }
6949 {
6952 {
6953 break;
6954 }
6955 }
6959 int num10 =
i - oasisHeight * 4;
6960 int num11 =
i + oasisHeight * 3;
6962 {
6964 }
6965 if (
num9 > Main.maxTilesX)
6966 {
6967 num9 = Main.maxTilesX;
6968 }
6970 {
6972 }
6973 if (
num11 > Main.maxTilesY)
6974 {
6975 num11 = Main.maxTilesY;
6976 }
6978 {
6980 {
6991 {
6993 {
6994 Main.tile[
m,
n].liquid = 127;
6995 }
6997 {
6998 Main.tile[
m,
n].liquid =
byte.MaxValue;
6999 }
7000 Main.tile[
m,
n].lava(lava:
false);
7001 Main.tile[
m,
n].active(active:
false);
7002 }
7004 {
7005 if (Main.tile[
m,
n].type == 53)
7006 {
7007 Main.tile[
m,
n].active(active:
false);
7008 }
7009 }
7011 {
7012 if (Main.tile[
m,
n].active() && Main.tileSolid[Main.tile[
m,
n].type] && !Main.tileSolidTop[Main.tile[
m,
n].type])
7013 {
7014 Main.tile[
m,
n].slope(0);
7015 Main.tile[
m,
n].halfBrick(halfBrick:
false);
7016 continue;
7017 }
7018 Main.tile[
m,
n].active(active:
true);
7019 Main.tile[
m,
n].type = 53;
7020 Main.tile[
m,
n].slope(0);
7021 Main.tile[
m,
n].halfBrick(halfBrick:
false);
7022 }
7023 }
7024 }
7028 num11 =
i + oasisHeight * 2;
7030 {
7032 {
7036 double num23 = (double)
num7 * 0.5700000000000001;
7038 {
7039 bool flag = false;
7041 {
7045 {
7047 {
7049 {
7050 flag = true;
7051 }
7053 break;
7054 }
7056 {
7057 break;
7058 }
7059 }
7062 {
7064 {
7066 {
7067 flag = true;
7068 }
7070 break;
7071 }
7073 {
7074 break;
7075 }
7077 }
7078 flag = true;
7080 {
7083 {
7085 {
7087 }
7091 {
7095 }
7096 }
7097 }
7098 }
7099 }
7100 }
7101 }
7103 {
7107 }
7108 return true;
7109 }
7110 return false;
7111 }
static double Sqrt(double d)
static double Abs(double value)
static readonly int oasisHeight
static Point[] oasisPosition
static readonly int maxOasis
static UnifiedRandom genRand
static double Distance(Vector2D value1, Vector2D value2)
References System.Math.Abs(), Terraria.Tile.active(), ReLogic.Utilities.Vector2D.Distance(), Terraria.WorldGen.genRand, Terraria.Tile.liquid, Terraria.WorldBuilding.GenVars.maxOasis, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.WorldBuilding.GenVars.numOasis, Terraria.WorldBuilding.GenVars.oasisHeight, Terraria.WorldBuilding.GenVars.oasisPosition, Terraria.WorldBuilding.GenVars.oasisWidth, System.Math.Sqrt(), Terraria.Main.tile, Terraria.Main.tileSolid, Terraria.Main.tileSolidTop, Terraria.Tile.type, Terraria.Tile.wall, Terraria.Main.worldSurface, System.X, and System.Y.