Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Caverer()

static void Terraria.WorldGen.Caverer ( int X,
int Y )
inlinestatic

Definition at line 69144 of file WorldGen.cs.

69145 {
69146 //IL_0077: Unknown result type (might be due to invalid IL or missing references)
69147 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
69148 //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
69149 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
69150 //IL_0284: Unknown result type (might be due to invalid IL or missing references)
69151 //IL_028b: Unknown result type (might be due to invalid IL or missing references)
69152 //IL_02b0: Unknown result type (might be due to invalid IL or missing references)
69153 //IL_02b5: Unknown result type (might be due to invalid IL or missing references)
69154 //IL_0184: Unknown result type (might be due to invalid IL or missing references)
69155 //IL_018b: Unknown result type (might be due to invalid IL or missing references)
69156 //IL_01b1: Unknown result type (might be due to invalid IL or missing references)
69157 //IL_01b6: Unknown result type (might be due to invalid IL or missing references)
69158 //IL_01b8: Unknown result type (might be due to invalid IL or missing references)
69159 //IL_01c0: Unknown result type (might be due to invalid IL or missing references)
69160 switch (genRand.Next(2))
69161 {
69162 case 0:
69163 {
69164 int num4 = genRand.Next(7, 9);
69165 double num5 = (double)genRand.Next(100) * 0.01;
69166 double num6 = 1.0 - num5;
69167 if (genRand.Next(2) == 0)
69168 {
69169 num5 = 0.0 - num5;
69170 }
69171 if (genRand.Next(2) == 0)
69172 {
69173 num6 = 0.0 - num6;
69174 }
69175 Vector2D val2 = default(Vector2D);
69176 ((Vector2D)(ref val2))._002Ector((double)X, (double)Y);
69177 for (int j = 0; j < num4; j++)
69178 {
69179 val2 = digTunnel(val2.X, val2.Y, num5, num6, genRand.Next(6, 20), genRand.Next(4, 9));
69180 num5 += (double)genRand.Next(-20, 21) * 0.1;
69181 num6 += (double)genRand.Next(-20, 21) * 0.1;
69182 if (num5 < -1.5)
69183 {
69184 num5 = -1.5;
69185 }
69186 if (num5 > 1.5)
69187 {
69188 num5 = 1.5;
69189 }
69190 if (num6 < -1.5)
69191 {
69192 num6 = -1.5;
69193 }
69194 if (num6 > 1.5)
69195 {
69196 num6 = 1.5;
69197 }
69198 double num7 = (double)genRand.Next(100) * 0.01;
69199 double num8 = 1.0 - num7;
69200 if (genRand.Next(2) == 0)
69201 {
69202 num7 = 0.0 - num7;
69203 }
69204 if (genRand.Next(2) == 0)
69205 {
69206 num8 = 0.0 - num8;
69207 }
69208 Vector2D val3 = digTunnel(val2.X, val2.Y, num7, num8, genRand.Next(30, 50), genRand.Next(3, 6));
69209 TileRunner((int)val3.X, (int)val3.Y, genRand.Next(10, 20), genRand.Next(5, 10), -1);
69210 }
69211 break;
69212 }
69213 case 1:
69214 {
69215 int num = genRand.Next(15, 30);
69216 double num2 = (double)genRand.Next(100) * 0.01;
69217 double num3 = 1.0 - num2;
69218 if (genRand.Next(2) == 0)
69219 {
69220 num2 = 0.0 - num2;
69221 }
69222 if (genRand.Next(2) == 0)
69223 {
69224 num3 = 0.0 - num3;
69225 }
69226 Vector2D val = default(Vector2D);
69227 ((Vector2D)(ref val))._002Ector((double)X, (double)Y);
69228 for (int i = 0; i < num; i++)
69229 {
69230 val = digTunnel(val.X, val.Y, num2, num3, genRand.Next(5, 15), genRand.Next(2, 6), Wet: true);
69231 num2 += (double)genRand.Next(-20, 21) * 0.1;
69232 num3 += (double)genRand.Next(-20, 21) * 0.1;
69233 if (num2 < -1.5)
69234 {
69235 num2 = -1.5;
69236 }
69237 if (num2 > 1.5)
69238 {
69239 num2 = 1.5;
69240 }
69241 if (num3 < -1.5)
69242 {
69243 num3 = -1.5;
69244 }
69245 if (num3 > 1.5)
69246 {
69247 num3 = 1.5;
69248 }
69249 }
69250 break;
69251 }
69252 }
69253 }
static UnifiedRandom genRand
Definition WorldGen.cs:1215
static Vector2D digTunnel(double X, double Y, double xDir, double yDir, int Steps, int Size, bool Wet=false)
static void TileRunner(int i, int j, double strength, int steps, int type, bool addTile=false, double speedX=0.0, double speedY=0.0, bool noYChange=false, bool overRide=true, int ignoreTileType=-1)

References ReLogic.Utilities.Vector2D.X, System.X, ReLogic.Utilities.Vector2D.Y, and System.Y.

Referenced by Terraria.WorldGen.GenerateWorld().