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

◆ IsBackgroundConsideredTheSame()

static bool Terraria.WorldGen.IsBackgroundConsideredTheSame ( int oldBG,
int newBG )
inlinestatic

Definition at line 4773 of file WorldGen.cs.

4774 {
4775 switch (oldBG)
4776 {
4777 case 3:
4778 case 31:
4779 if (newBG != 3)
4780 {
4781 return newBG == 31;
4782 }
4783 return true;
4784 case 5:
4785 case 51:
4786 if (newBG != 5)
4787 {
4788 return newBG == 51;
4789 }
4790 return true;
4791 case 7:
4792 case 71:
4793 case 72:
4794 case 73:
4795 if (newBG != 7)
4796 {
4797 if (newBG >= 71)
4798 {
4799 return newBG <= 73;
4800 }
4801 return false;
4802 }
4803 return true;
4804 default:
4805 return oldBG == newBG;
4806 }
4807 }

Referenced by Terraria.WorldGen.RandomizeBackgroundBasedOnPlayer().

+ Here is the caller graph for this function: