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

◆ PlaceAt()

static void Terraria.GameContent.Biomes.Desert.ChambersEntrance.PlaceAt ( DesertDescription description,
Point position )
inlinestaticprivate

Definition at line 34 of file ChambersEntrance.cs.

35 {
36 //IL_0286: Unknown result type (might be due to invalid IL or missing references)
37 //IL_0292: Unknown result type (might be due to invalid IL or missing references)
38 //IL_02c0: Unknown result type (might be due to invalid IL or missing references)
39 //IL_02da: Unknown result type (might be due to invalid IL or missing references)
40 //IL_02e4: Unknown result type (might be due to invalid IL or missing references)
41 //IL_02ed: Unknown result type (might be due to invalid IL or missing references)
42 //IL_0311: Unknown result type (might be due to invalid IL or missing references)
43 //IL_0322: Unknown result type (might be due to invalid IL or missing references)
44 //IL_0329: Unknown result type (might be due to invalid IL or missing references)
45 //IL_0330: Unknown result type (might be due to invalid IL or missing references)
46 //IL_0335: Unknown result type (might be due to invalid IL or missing references)
47 //IL_0337: Unknown result type (might be due to invalid IL or missing references)
48 //IL_033b: Unknown result type (might be due to invalid IL or missing references)
49 //IL_0340: Unknown result type (might be due to invalid IL or missing references)
50 //IL_0342: Unknown result type (might be due to invalid IL or missing references)
51 //IL_0346: Unknown result type (might be due to invalid IL or missing references)
52 //IL_034b: Unknown result type (might be due to invalid IL or missing references)
53 //IL_034d: Unknown result type (might be due to invalid IL or missing references)
54 //IL_0351: Unknown result type (might be due to invalid IL or missing references)
56 Point origin = new Point(position.X, position.Y + 2);
58 UnifiedRandom genRand = WorldGen.genRand;
59 ShapeData data = new ShapeData();
60 int num = description.Hive.Top - position.Y;
61 int num2 = ((genRand.Next(2) != 0) ? 1 : (-1));
63 {
64 new PathConnection(new Point(position.X + -num2 * 26, position.Y - 8), num2)
65 };
66 int num3 = genRand.Next(2, 4);
67 for (int i = 0; i < num3; i++)
68 {
69 int num4 = (int)((double)(i + 1) / (double)num3 * (double)num) + genRand.Next(-8, 9);
70 int num5 = num2 * genRand.Next(20, 41);
71 int num6 = genRand.Next(18, 29);
72 WorldUtils.Gen(position, new Shapes.Circle(num6 / 2, 3), Actions.Chain(new Modifiers.Offset(num5, num4), new Modifiers.Blotches(), new Actions.Clear().Output(data), new Actions.PlaceWall(187)));
73 list.Add(new PathConnection(new Point(num5 + num6 / 2 * -num2 + position.X, num4 + position.Y), -num2));
74 num2 *= -1;
75 }
76 WorldUtils.Gen(position, new ModShapes.OuterOutline(data), Actions.Chain(new Modifiers.Expand(1), new Modifiers.OnlyTiles(53), new Actions.SetTile(397), new Actions.PlaceWall(187)));
78 Vector2D val2 = default(Vector2D);
79 for (int j = 1; j < list.Count; j++)
80 {
81 PathConnection pathConnection = list[j - 1];
82 PathConnection pathConnection2 = list[j];
83 double num7 = Math.Abs(pathConnection2.Position.X - pathConnection.Position.X) * 1.5;
84 for (double num8 = 0.0; num8 <= 1.0; num8 += 0.02)
85 {
86 Vector2D val = new Vector2D(pathConnection.Position.X + pathConnection.Direction * num7 * num8, pathConnection.Position.Y);
87 ((Vector2D)(ref val2))._002Ector(pathConnection2.Position.X + pathConnection2.Direction * num7 * (1.0 - num8), pathConnection2.Position.Y);
92 }
93 }
94 WorldUtils.Gen(origin, new Shapes.Rectangle(new Rectangle(-29, -12, 58, 12)), Actions.Chain(new Modifiers.NotInShape(shapeData), new Modifiers.Expand(1), new Actions.PlaceWall(0)));
95 }
static double Abs(double value)
static GenAction Chain(params GenAction[] actions)
Definition Actions.cs:470
GenAction Output(ShapeData data)
Definition GenAction.cs:39
static bool Gen(Point origin, GenShape shape, GenAction action)
Definition WorldUtils.cs:17
static Vector2D Lerp(Vector2D value1, Vector2D value2, double amount)
Definition Vector2D.cs:216

References System.Math.Abs(), Terraria.WorldBuilding.Actions.Chain(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, Terraria.WorldBuilding.WorldUtils.Gen(), Terraria.WorldGen.genRand, ReLogic.Utilities.Vector2D.Lerp(), System.list, Terraria.Utilities.UnifiedRandom.Next(), Terraria.WorldBuilding.GenAction.Output(), Microsoft.Xna.Framework.Point.X, and Microsoft.Xna.Framework.Point.Y.

Referenced by Terraria.GameContent.Biomes.Desert.ChambersEntrance.Place().