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

◆ RandomizeMoonState()

static void Terraria.WorldGen.RandomizeMoonState ( UnifiedRandom random,
bool garenteeNewStyle = false )
inlinestatic

Definition at line 4152 of file WorldGen.cs.

4153 {
4154 int moonType = Main.moonType;
4155 do
4156 {
4157 Main.moonType = random.Next(9);
4158 }
4159 while (garenteeNewStyle && moonType == Main.moonType);
4160 }

References Terraria.Main.moonType, and Terraria.Utilities.UnifiedRandom.Next().

Referenced by Terraria.WorldGen.GenerateWorld(), Terraria.Projectile.Kill(), and Terraria.IO.WorldFile.LoadWorld_Version1_Old_BeforeRelease88().