public static void UpdateTime() { if (Main.netMode != 1) { if (Sandstorm.Happening) { if (Sandstorm.TimeLeft > 86400) { Sandstorm.TimeLeft = 0; } Sandstorm.TimeLeft -= Main.dayRate; if (!Sandstorm.HasSufficientWind()) { Sandstorm.TimeLeft -= 15 * Main.dayRate; } if ((double)Main.windSpeedCurrent == 0.0) { Sandstorm.TimeLeft = 0; } if (Sandstorm.TimeLeft <= 0) { Sandstorm.StopSandstorm(); } } else if (Sandstorm.HasSufficientWind()) { for (int index = 0; index < Main.dayRate; ++index) { if (Main.rand.Next(86400) == 0) { Sandstorm.StartSandstorm(); } } } if (Main.rand.Next(18000) == 0) { Sandstorm.ChangeSeverityIntentions(); } } Sandstorm.UpdateSeverity(); }
public static void UpdateTime() { if (Main.netMode != 1) { if (Sandstorm.Happening) { if (Sandstorm.TimeLeft > 86400) { Sandstorm.TimeLeft = 0; } Sandstorm.TimeLeft -= Main.dayRate; if (Sandstorm.TimeLeft <= 0) { Sandstorm.StopSandstorm(); } } else { var num = (int)((double)Main.windSpeed * 100.0); for (var index = 0; index < Main.dayRate; ++index) { if (Main.rand.Next(777600) == 0) { Sandstorm.StartSandstorm(); } else if ((Main.numClouds < 40 || Math.Abs(num) > 50) && Main.rand.Next(518400) == 0) { Sandstorm.StartSandstorm(); } } } if (Main.rand.Next(18000) == 0) { Sandstorm.ChangeSeverityIntentions(); } } Sandstorm.UpdateSeverity(); }
public static void UpdateTime() { if (Main.netMode != 1) { if (Sandstorm.Happening) { if (Sandstorm.TimeLeft > 86400) { Sandstorm.TimeLeft = 0; } Sandstorm.TimeLeft -= Main.dayRate; if (Sandstorm.TimeLeft <= 0) { Sandstorm.StopSandstorm(); } } else { int value = (int)(Main.windSpeed * 100f); for (int i = 0; i < Main.dayRate; i++) { if (Main.rand.Next(518400) == 0) { Sandstorm.StartSandstorm(); } else if ((Main.numClouds < 40 || Math.Abs(value) > 50) && Main.rand.Next(345600) == 0) { Sandstorm.StartSandstorm(); } } } if (Main.rand.Next(18000) == 0) { Sandstorm.ChangeSeverityIntentions(); } } Sandstorm.UpdateSeverity(); }
public static void StopSandstorm() { Sandstorm.Happening = false; Sandstorm.TimeLeft = 0; Sandstorm.ChangeSeverityIntentions(); }
public static void StartSandstorm() { Sandstorm.Happening = true; Sandstorm.TimeLeft = (int)(3600f * (8f + Main.rand.NextFloat() * 16f)); Sandstorm.ChangeSeverityIntentions(); }
private static void StartSandstorm() { Sandstorm.Happening = true; Sandstorm.TimeLeft = (int)(3600.0 * (8.0 + (double)Main.rand.NextFloat() * 16.0)); Sandstorm.ChangeSeverityIntentions(); }
private static void StartSandstorm() { Sandstorm.Happening = true; Sandstorm.TimeLeft = Main.rand.Next(28800, 86401); Sandstorm.ChangeSeverityIntentions(); }