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

◆ IsBackgroundConsideredTheSame()

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

Definition at line 4404 of file WorldGen.cs.

4405 {
4406 switch (oldBG)
4407 {
4408 case 3:
4409 case 31:
4410 if (newBG != 3)
4411 {
4412 return newBG == 31;
4413 }
4414 return true;
4415 case 5:
4416 case 51:
4417 if (newBG != 5)
4418 {
4419 return newBG == 51;
4420 }
4421 return true;
4422 case 7:
4423 case 71:
4424 case 72:
4425 case 73:
4426 if (newBG != 7)
4427 {
4428 if (newBG >= 71)
4429 {
4430 return newBG <= 73;
4431 }
4432 return false;
4433 }
4434 return true;
4435 default:
4436 return oldBG == newBG;
4437 }
4438 }

Referenced by Terraria.WorldGen.RandomizeBackgroundBasedOnPlayer().