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

◆ RandomizeBackgrounds()

static void Terraria.WorldGen.RandomizeBackgrounds ( UnifiedRandom random)
inlinestatic

Definition at line 4682 of file WorldGen.cs.

4683 {
4686 {
4687 }
4689 while (treeBG3 == treeBG1 || treeBG3 == treeBG2)
4690 {
4692 }
4694 while (treeBG4 == treeBG1 || treeBG4 == treeBG2 || treeBG4 == treeBG3)
4695 {
4697 }
4698 setBG(0, treeBG1);
4699 setBG(10, treeBG2);
4700 setBG(11, treeBG3);
4701 setBG(12, treeBG4);
4702 setBG(1, random.Next(5));
4703 setBG(2, random.Next(6));
4704 snowBG = random.Next(8);
4705 if (snowBG == 2 && random.Next(2) == 0)
4706 {
4707 if (random.Next(2) == 0)
4708 {
4709 snowBG = 21;
4710 }
4711 else
4712 {
4713 snowBG = 22;
4714 }
4715 }
4716 if (snowBG == 3 && random.Next(2) == 0)
4717 {
4718 if (random.Next(2) == 0)
4719 {
4720 snowBG = 31;
4721 }
4722 else
4723 {
4724 snowBG = 32;
4725 }
4726 }
4727 if (snowBG == 4 && random.Next(2) == 0)
4728 {
4729 if (random.Next(2) == 0)
4730 {
4731 snowBG = 41;
4732 }
4733 else
4734 {
4735 snowBG = 42;
4736 }
4737 }
4738 setBG(3, snowBG);
4739 setBG(4, random.Next(5));
4740 setBG(5, random.Next(6));
4741 setBG(6, random.Next(5));
4742 setBG(7, random.Next(6));
4743 setBG(8, random.Next(4));
4744 setBG(9, random.Next(3));
4745 }
static int treeBG2
Definition WorldGen.cs:1140
static int treeBG3
Definition WorldGen.cs:1142
static int treeBG4
Definition WorldGen.cs:1144
static void setBG(int bg, int style)
Definition WorldGen.cs:4028
static int RollRandomForestBGStyle(UnifiedRandom random)
Definition WorldGen.cs:4747
static int treeBG1
Definition WorldGen.cs:1138
static int snowBG
Definition WorldGen.cs:1150

References Terraria.Utilities.UnifiedRandom.Next(), Terraria.WorldGen.RollRandomForestBGStyle(), Terraria.WorldGen.setBG(), Terraria.WorldGen.snowBG, Terraria.WorldGen.treeBG1, Terraria.WorldGen.treeBG2, Terraria.WorldGen.treeBG3, and Terraria.WorldGen.treeBG4.

Referenced by Terraria.WorldGen.AddGenPasses(), Terraria.Main.Initialize_AlmostEverything(), and Terraria.Main.UpdateMenu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: