Ejemplo n.º 1
0
 public override EReturn Load(Nini.Config.IConfig config)
 {
     base.Load(config);
     //Nini.Config.IConfig config = GetConfig(source, "Nepritel");
     if (config != null)
     {
         Ohrozeni  = config.GetInt("Ohrozeni");
         Stretnuti = config.GetInt("Stretnuti");
         Utok      = config.GetInt("Utok");
         Obrana    = config.GetInt("Obrana");
         Zivoty    = config.GetInt("Zivoty");
         string   s    = config.GetString("Stiny");
         string[] stin = s.Split(',');
         Stin = new List <MyString>();
         foreach (string ss in stin)
         {
             MyString ms = new MyString();
             ms.String = ss;
             Stin.Add(ms);
         }
         return(EReturn.NoError);
     }
     else
     {
         return(EReturn.Error);
     }
 }
Ejemplo n.º 2
0
 public override EReturn Load(Nini.Config.IConfig config)
 {
     base.Load(config);
     //Nini.Config.IConfig config = GetConfig(source, "Hrdina");
     if (config != null)
     {
         Hrozba = config.GetInt("Hrozba");
         Vule   = config.GetInt("Vule");
         Utok   = config.GetInt("Utok");
         Obrana = config.GetInt("Obrana");
         Zivoty = config.GetInt("Zivoty");
         return(EReturn.NoError);
     }
     else
     {
         return(EReturn.Error);
     }
 }
 public void WindConfig(OpenSim.Region.Framework.Scenes.Scene scene, Nini.Config.IConfig windConfig)
 {
     if (windConfig != null)
     {
         if (windConfig.Contains("strength"))
         {
             m_strength = windConfig.GetFloat("strength", 1.0f);
         }
         if (windConfig.Contains("damping"))
         {
             m_damping_rate = windConfig.GetFloat("damping", 0);
             if (m_damping_rate > 1.0f)
             {
                 m_damping_rate = 1.0f;
             }
         }
         if (windConfig.Contains("force"))
         {
             m_init_force = windConfig.GetInt("force", 0);
             if (m_init_force < 0 || m_init_force > 2)
             {
                 m_init_force = 0;
             }
         }
         //
         if (windConfig.Contains("region"))
         {
             m_region_size = windConfig.GetInt("region", 256);
             m_region_size = (((int)Math.Abs(m_region_size) + 255) / 256) * 256;
             if (m_region_size == 0)
             {
                 m_region_size = 256;
             }
         }
         if (scene != null)
         {
             m_region_size = (int)scene.RegionInfo.RegionSizeX;
         }
     }
 }
Ejemplo n.º 4
0
 public override EReturn Load(Nini.Config.IConfig config)
 {
     base.Load(config);
     //Nini.Config.IConfig config = GetConfig(source, "Udalost");
     if (config != null)
     {
         Cena = config.GetInt("Cena");
         return(EReturn.NoError);
     }
     else
     {
         return(EReturn.Error);
     }
 }
Ejemplo n.º 5
0
 public int GetInt(string key, int defaultValue)
 {
     return(config.GetInt(key, defaultValue));
 }