EFTCheatPVE/stoopid.raw/stupid.solutions.Features/EZWeatherController.cs

38 lines
757 B
C#

using EFT.UI;
using EFT.Weather;
using UnityEngine;
namespace stupid.solutions.Features;
public class EZWeatherController : MonoBehaviour
{
public static WeatherController _weatherController;
private static ToDController _toDController;
private void Update()
{
}
public static void Initialize()
{
_weatherController = WeatherController.Instance;
_toDController = _weatherController?.TimeOfDayController;
if (_weatherController == null)
{
ConsoleScreen.LogError("WeatherController not found!");
}
if (_toDController == null)
{
ConsoleScreen.LogError("TimeOfDayController not found!");
}
}
public static void EnsureInitialized()
{
if (_weatherController == null || _toDController == null)
{
Initialize();
}
}
}