C#:
namespace Oxide.Plugins;
[Info("FAlwaysDay", "fufeldev", "1.0.1")]
public class FAlwaysDay : RustPlugin
{
private readonly string[] _weatherCommands =
{
"weather.ambient_light_multiplier -1",
"weather.arctic_fog_ambient_intensity_mult 0",
"weather.arctic_fog_light_boost_mult 0",
"weather.arctic_fog_ramp_end -1",
"weather.arctic_fog_ramp_start -1",
"weather.arid_fog_ambient_intensity_mult 0",
"weather.arid_fog_light_boost_mult 0",
"weather.arid_fog_ramp_end -1",
"weather.arid_fog_ramp_start -1",
"weather.atmosphere_brightness 0.08",
"weather.atmosphere_contrast 0.95",
"weather.atmosphere_directionality -1",
"weather.atmosphere_fog_height_falloff 0",
"weather.atmosphere_fog_ramp_end_distance -1",
"weather.atmosphere_fog_ramp_start_distance -1",
"weather.atmosphere_mie -1",
"weather.atmosphere_rayleigh -1",
"weather.biome_fog_ambient_saturation_mult 0",
"weather.biome_fog_distance_curve -1",
"weather.clear_chance 1",
"weather.cloud_attenuation -1",
"weather.cloud_brightness 1.5",
"weather.cloud_coloring 0",
"weather.cloud_config -1",
"weather.cloud_coverage 1",
"weather.cloud_opacity 1",
"weather.cloud_saturation 1",
"weather.cloud_scattering 0.1",
"weather.cloud_sharpness 0",
"weather.cloud_size 0",
"weather.directional_light_multiplier -1",
"weather.dust_chance 0",
"weather.fog 0",
"weather.fog_chance 0",
"weather.fog_multiplier -1",
"weather.jungle_fog_ambient_intensity_mult 0",
"weather.jungle_fog_light_boost_mult 0",
"weather.jungle_fog_ramp_end -1",
"weather.jungle_fog_ramp_start -1",
"weather.moon_mesh_brightness_multiplier -1",
"weather.ocean_scale -1",
"weather.ocean_time -1",
"weather.overcast_chance 0",
"weather.rain 0",
};
private void OnServerInitialized()
{
ApplyDefaultEnvironment();
timer.Once(5f, ApplyDefaultEnvironment);
timer.Once(15f, ApplyDefaultEnvironment);
}
private void OnPlayerConnected(BasePlayer player)
{
timer.Once(1f, ApplyDefaultEnvironment);
}
private void ApplyDefaultEnvironment()
{
ConVar.Env.time = 12f;
ConVar.Env.progresstime = false;
foreach (string command in _weatherCommands)
{
Server.Command(command);
}
}
}