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

◆ Place()

override bool Terraria.GameContent.Biomes.DesertBiome.Place ( Point origin,
StructureMap structures )
inline

Definition at line 13 of file DesertBiome.cs.

14 {
16 if (!desertDescription.IsValid)
17 {
18 return false;
19 }
20 ExportDescriptionToEngine(desertDescription);
21 SandMound.Place(desertDescription);
22 desertDescription.UpdateSurfaceMap();
23 if (!Main.tenthAnniversaryWorld && GenBase._random.NextDouble() <= ChanceOfEntrance)
24 {
25 switch (GenBase._random.Next(4))
26 {
27 case 0:
28 ChambersEntrance.Place(desertDescription);
29 break;
30 case 1:
31 AnthillEntrance.Place(desertDescription);
32 break;
33 case 2:
34 LarvaHoleEntrance.Place(desertDescription);
35 break;
36 case 3:
37 PitEntrance.Place(desertDescription);
38 break;
39 }
40 }
41 DesertHive.Place(desertDescription);
42 CleanupArea(desertDescription.Hive);
43 Rectangle area = new Rectangle(desertDescription.CombinedArea.X, 50, desertDescription.CombinedArea.Width, desertDescription.CombinedArea.Bottom - 20);
44 structures.AddStructure(area, 10);
45 return true;
46 }
static void ExportDescriptionToEngine(DesertDescription description)
static void CleanupArea(Rectangle area)
static void Place(DesertDescription description)
static void Place(DesertDescription description)
static DesertDescription CreateFromPlacement(Point origin)
static void Place(DesertDescription description)
static void Place(DesertDescription description)
static void Place(DesertDescription description)
Definition PitEntrance.cs:8
static void Place(DesertDescription description)
Definition SandMound.cs:8
static UnifiedRandom _random
Definition GenBase.cs:9
void AddStructure(Rectangle area, int padding=0)

References Terraria.WorldBuilding.GenBase._random, Terraria.WorldBuilding.StructureMap.AddStructure(), Microsoft.Xna.Framework.Rectangle.Bottom, Terraria.GameContent.Biomes.DesertBiome.ChanceOfEntrance, Terraria.GameContent.Biomes.DesertBiome.CleanupArea(), Terraria.GameContent.Biomes.Desert.DesertDescription.CombinedArea, Terraria.GameContent.Biomes.Desert.DesertDescription.CreateFromPlacement(), Terraria.GameContent.Biomes.DesertBiome.ExportDescriptionToEngine(), Terraria.GameContent.Biomes.Desert.DesertDescription.Hive, Terraria.GameContent.Biomes.Desert.DesertDescription.IsValid, Terraria.GameContent.Biomes.Desert.AnthillEntrance.Place(), Terraria.GameContent.Biomes.Desert.ChambersEntrance.Place(), Terraria.GameContent.Biomes.Desert.DesertHive.Place(), Terraria.GameContent.Biomes.Desert.LarvaHoleEntrance.Place(), Terraria.GameContent.Biomes.Desert.PitEntrance.Place(), Terraria.GameContent.Biomes.Desert.SandMound.Place(), Terraria.Main.tenthAnniversaryWorld, Terraria.GameContent.Biomes.Desert.DesertDescription.UpdateSurfaceMap(), Microsoft.Xna.Framework.Rectangle.Width, and Microsoft.Xna.Framework.Rectangle.X.