예제 #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");
            }
        }
예제 #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;
        }
예제 #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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #7
0
 static void SetSkybox(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "skybox color", ref cfg.SkyboxColor);
 }
예제 #8
0
 static void SetShadow(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "shadow color", ref cfg.ShadowColor);
 }
예제 #9
0
 static void SetBorder(Player p, string area, EnvConfig cfg, string value)
 {
     SetBlock(p, value, area, "sides block", ref cfg.EdgeBlock);
 }
예제 #10
0
 static void SetFog(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "fog color", ref cfg.FogColor);
 }
예제 #11
0
 static void SetClouds(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "cloud color", ref cfg.CloudColor);
 }
예제 #12
0
 static void SetMaxFog(Player p, string area, EnvConfig cfg, string value)
 {
     SetInt(p, value, area, "max fog distance", ref cfg.MaxFogDistance);
 }
예제 #13
0
 static void SetSidesOffset(Player p, string area, EnvConfig cfg, string value)
 {
     SetInt(p, value, area, "sides offset", ref cfg.SidesOffset);
 }
예제 #14
0
 static void SetEdgeLevel(Player p, string area, EnvConfig cfg, string value)
 {
     SetInt(p, value, area, "edge level", ref cfg.EdgeLevel);
 }
예제 #15
0
 static void SetCloudsHeight(Player p, string area, EnvConfig cfg, string value)
 {
     SetInt(p, value, area, "clouds height", ref cfg.CloudsHeight);
 }
예제 #16
0
 static void SetSun(Player p, string area, EnvConfig cfg, string value)
 {
     SetColor(p, value, area, "sun color", ref cfg.LightColor);
 }
예제 #17
0
 static void SetHorizon(Player p, string area, EnvConfig cfg, string value)
 {
     SetBlock(p, value, area, "edge block", ref cfg.HorizonBlock);
 }