Ejemplo n.º 1
0
        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");
            }
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 static void SetSkyboxVer(Player p, string area, EnvConfig cfg, string value)
 {
     SetFloat(p, value, area, 1024, "skybox vertical speed", ref cfg.SkyboxVerSpeed, -0xFFFFFF, 0xFFFFFF);
 }
Ejemplo n.º 4
0
 static void SetWeatherFade(Player p, string area, EnvConfig cfg, string value)
 {
     SetFloat(p, value, area, 128, "weather fade rate", ref cfg.WeatherFade, 0, 255);
 }
Ejemplo n.º 5
0
 static void SetWeatherSpeed(Player p, string area, EnvConfig cfg, string value)
 {
     SetFloat(p, value, area, 256, "weather speed", ref cfg.WeatherSpeed, -0xFFFFFF, 0xFFFFFF);
 }
Ejemplo n.º 6
0
 static void SetCloudsSpeed(Player p, string area, EnvConfig cfg, string value)
 {
     SetFloat(p, value, area, 256, "clouds speed", ref cfg.CloudsSpeed, -0xFFFFFF, 0xFFFFFF);
 }
Ejemplo n.º 7
0
 static void SetSkybox(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "skybox color", ref cfg.SkyboxColor);
 }
Ejemplo n.º 8
0
 static void SetShadow(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "shadow color", ref cfg.ShadowColor);
 }
Ejemplo n.º 9
0
 static void SetBorder(Player p, string area, EnvConfig cfg, string value)
 {
     SetBlock(p, value, area, "sides block", ref cfg.EdgeBlock);
 }
Ejemplo n.º 10
0
 static void SetFog(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "fog color", ref cfg.FogColor);
 }
Ejemplo n.º 11
0
 static void SetClouds(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "cloud color", ref cfg.CloudColor);
 }
Ejemplo n.º 12
0
 static void SetMaxFog(Player p, string area, EnvConfig cfg, string value)
 {
     SetInt(p, value, area, "max fog distance", ref cfg.MaxFogDistance);
 }
Ejemplo n.º 13
0
 static void SetSidesOffset(Player p, string area, EnvConfig cfg, string value)
 {
     SetInt(p, value, area, "sides offset", ref cfg.SidesOffset);
 }
Ejemplo n.º 14
0
 static void SetEdgeLevel(Player p, string area, EnvConfig cfg, string value)
 {
     SetInt(p, value, area, "edge level", ref cfg.EdgeLevel);
 }
Ejemplo n.º 15
0
 static void SetCloudsHeight(Player p, string area, EnvConfig cfg, string value)
 {
     SetInt(p, value, area, "clouds height", ref cfg.CloudsHeight);
 }
Ejemplo n.º 16
0
 static void SetSun(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "sun color", ref cfg.LightColor);
 }
Ejemplo n.º 17
0
 static void SetHorizon(Player p, string area, EnvConfig cfg, string value)
 {
     SetBlock(p, value, area, "edge block", ref cfg.HorizonBlock);
 }