static void SetSmoothFog(Player p, string area, EnvConfig cfg, string value) { if (IsResetString(value)) { p.Message("Reset smooth fog for {0} &Sto &cOFF", area); cfg.ExpFog = -1; } else { bool enabled = false; if (!CommandParser.GetBool(p, value, ref enabled)) { return; } cfg.ExpFog = enabled ? 1 : 0; p.Message("Set smooth fog for {0} &Sto {1}", area, enabled ? "&aON" : "&cOFF"); } }
static void SetWeather(Player p, string area, EnvConfig cfg, string value) { int weather; if (IsResetString(value)) { p.Message("Reset weather for {0} &Sto 0 (Sun)", area); weather = -1; } else { if (int.TryParse(value, out weather)) { } else if (value.CaselessEq("sun")) { weather = 0; } else if (value.CaselessEq("rain")) { weather = 1; } else if (value.CaselessEq("snow")) { weather = 2; } if (weather < 0 || weather > 2) { p.Message("Weather can be either sun, rain, or snow."); return; } string type = weather == 0 ? "&SSun" : (weather == 1 ? "&1Rain" : "&fSnow"); p.Message("Set weather for {0} &Sto {1} ({2}&S)", area, weather, type); } cfg.Weather = weather; }
static void SetSkyboxVer(Player p, string area, EnvConfig cfg, string value) { SetFloat(p, value, area, 1024, "skybox vertical speed", ref cfg.SkyboxVerSpeed, -0xFFFFFF, 0xFFFFFF); }
static void SetWeatherFade(Player p, string area, EnvConfig cfg, string value) { SetFloat(p, value, area, 128, "weather fade rate", ref cfg.WeatherFade, 0, 255); }
static void SetWeatherSpeed(Player p, string area, EnvConfig cfg, string value) { SetFloat(p, value, area, 256, "weather speed", ref cfg.WeatherSpeed, -0xFFFFFF, 0xFFFFFF); }
static void SetCloudsSpeed(Player p, string area, EnvConfig cfg, string value) { SetFloat(p, value, area, 256, "clouds speed", ref cfg.CloudsSpeed, -0xFFFFFF, 0xFFFFFF); }
static void SetSkybox(Player p, string area, EnvConfig cfg, string value) { SetColor(p, value, area, "skybox color", ref cfg.SkyboxColor); }
static void SetShadow(Player p, string area, EnvConfig cfg, string value) { SetColor(p, value, area, "shadow color", ref cfg.ShadowColor); }
static void SetBorder(Player p, string area, EnvConfig cfg, string value) { SetBlock(p, value, area, "sides block", ref cfg.EdgeBlock); }
static void SetFog(Player p, string area, EnvConfig cfg, string value) { SetColor(p, value, area, "fog color", ref cfg.FogColor); }
static void SetClouds(Player p, string area, EnvConfig cfg, string value) { SetColor(p, value, area, "cloud color", ref cfg.CloudColor); }
static void SetMaxFog(Player p, string area, EnvConfig cfg, string value) { SetInt(p, value, area, "max fog distance", ref cfg.MaxFogDistance); }
static void SetSidesOffset(Player p, string area, EnvConfig cfg, string value) { SetInt(p, value, area, "sides offset", ref cfg.SidesOffset); }
static void SetEdgeLevel(Player p, string area, EnvConfig cfg, string value) { SetInt(p, value, area, "edge level", ref cfg.EdgeLevel); }
static void SetCloudsHeight(Player p, string area, EnvConfig cfg, string value) { SetInt(p, value, area, "clouds height", ref cfg.CloudsHeight); }
static void SetSun(Player p, string area, EnvConfig cfg, string value) { SetColor(p, value, area, "sun color", ref cfg.LightColor); }
static void SetHorizon(Player p, string area, EnvConfig cfg, string value) { SetBlock(p, value, area, "edge block", ref cfg.HorizonBlock); }