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

◆ ApplyPass()

override void Terraria.GameContent.Biomes.JunglePass.ApplyPass ( GenerationProgress progress,
GameConfiguration configuration )
inlineprotected

Definition at line 18 of file JunglePass.cs.

19 {
20 progress.Message = Lang.gen[11].Value;
21 _worldScale = (double)Main.maxTilesX / 4200.0 * 1.5;
22 double worldScale = _worldScale;
23 Point point = CreateStartPoint();
24 int x = point.X;
25 int y = point.Y;
26 Point zero = Point.Zero;
27 ApplyRandomMovement(ref x, ref y, 100, 100);
28 zero.X += x;
29 zero.Y += y;
30 PlaceFirstPassMud(x, y, 3);
31 PlaceGemsAt(x, y, 63, 2);
32 progress.Set(0.15);
33 ApplyRandomMovement(ref x, ref y, 250, 150);
34 zero.X += x;
35 zero.Y += y;
36 PlaceFirstPassMud(x, y, 0);
37 PlaceGemsAt(x, y, 65, 2);
38 progress.Set(0.3);
39 int oldX = x;
40 int oldY = y;
41 ApplyRandomMovement(ref x, ref y, 400, 150);
42 zero.X += x;
43 zero.Y += y;
44 PlaceFirstPassMud(x, y, -3);
45 PlaceGemsAt(x, y, 67, 2);
46 progress.Set(0.45);
47 x = zero.X / 3;
48 y = zero.Y / 3;
49 int num = GenBase._random.Next((int)(400.0 * worldScale), (int)(600.0 * worldScale));
50 int num2 = (int)(25.0 * worldScale);
51 x = Utils.Clamp(x, GenVars.leftBeachEnd + num / 2 + num2, GenVars.rightBeachStart - num / 2 - num2);
52 GenVars.mudWall = true;
53 WorldGen.TileRunner(x, y, num, 10000, 59, addTile: false, 0.0, -20.0, noYChange: true);
55 GenVars.mudWall = false;
56 progress.Set(0.6);
58 GenerateFinishingTouches(progress, oldX, oldY);
59 }
void GenerateTunnelToSurface(int i, int j)
Definition JunglePass.cs:88
void PlaceGemsAt(int x, int y, ushort baseGem, int gemVariants)
Definition JunglePass.cs:61
void PlaceFirstPassMud(int x, int y, int xSpeedScale)
Definition JunglePass.cs:69
void GenerateFinishingTouches(GenerationProgress progress, int oldX, int oldY)
void ApplyRandomMovement(ref int x, ref int y, int xRange, int yRange)
Definition JunglePass.cs:81
static UnifiedRandom _random
Definition GenBase.cs:9

References Terraria.WorldBuilding.GenBase._random, Terraria.GameContent.Biomes.JunglePass._worldScale, Terraria.GameContent.Biomes.JunglePass.ApplyRandomMovement(), Terraria.GameContent.Biomes.JunglePass.CreateStartPoint(), Terraria.Lang.gen, Terraria.GameContent.Biomes.JunglePass.GenerateFinishingTouches(), Terraria.GameContent.Biomes.JunglePass.GenerateHolesInMudWalls(), Terraria.GameContent.Biomes.JunglePass.GenerateTunnelToSurface(), Terraria.WorldBuilding.GenVars.leftBeachEnd, Terraria.Main.maxTilesX, Terraria.GameContent.Biomes.JunglePass.PlaceFirstPassMud(), Terraria.GameContent.Biomes.JunglePass.PlaceGemsAt(), Terraria.WorldBuilding.GenVars.rightBeachStart, Terraria.WorldBuilding.GenerationProgress.Set(), Terraria.WorldGen.TileRunner(), Microsoft.Xna.Framework.Point.X, Microsoft.Xna.Framework.Point.Y, and Microsoft.Xna.Framework.Point.Zero.