Esempio n. 1
0
 CVar Register(string name, string value, CVarFlag flags, string desc)
 {
     return(system.Register(name, value, flags, desc));
 }
Esempio n. 2
0
 /// <summary>
 /// Construct a CVar.
 /// </summary>
 /// <param name="newname">The name of  the CVar.</param>
 /// <param name="newvalue">The value to set the CVar to.</param>
 /// <param name="newflags">The flags the CVar should be locked into.</param>
 /// <param name="_system">The CVarSystem to create this CVar within.</param>
 public CVar(string newname, string newvalue, CVarFlag newflags, CVarSystem _system)
 {
     system = _system;
     Name = newname;
     Set(newvalue);
     Flags = newflags;
 }
Esempio n. 3
0
 static CVar Register(string name, string value, CVarFlag flags)
 {
     return(system.Register(name, value, flags));
 }
Esempio n. 4
0
 /// <summary>
 /// Sets the value of an existing CVar, or generates a new one.
 /// </summary>
 /// <param name="CVar">The name of the CVar.</param>
 /// <param name="value">The value to set it to.</param>
 /// <param name="force">Whether to force a server send.</param>
 /// <param name="flags_if_new">What flags to set if the CVar is new.</param>
 /// <returns>The set CVar.</returns>
 public CVar AbsoluteSet(string CVar, string value, bool force = false, CVarFlag flags_if_new = CVarFlag.None)
 {
     CVar gotten = Get(CVar);
     if (gotten == null)
     {
         gotten = Register(CVar, value, CVarFlag.UserMade | flags_if_new);
     }
     else
     {
         gotten.Set(value, force);
     }
     return gotten;
 }
Esempio n. 5
0
 /// <summary>
 /// Registers a new CVar.
 /// </summary>
 /// <param name="CVar">The name of the CVar.</param>
 /// <param name="value">The default value.</param>
 /// <param name="flags">The flags to set on this CVar.</param>
 /// <param name="description">An optional description text for a CVar.</param>
 /// <returns>The registered CVar.</returns>
 public CVar Register(string CVar, string value, CVarFlag flags, string description = null)
 {
     CVar cvar = new CVar(CVar.ToLower(), value, flags, this);
     cvar.Description = description;
     CVars.Add(cvar.Name, cvar);
     CVarList.Add(cvar);
     return cvar;
 }
Esempio n. 6
0
 CVar Register(string name, string value, CVarFlag flags, string desc)
 {
     return system.Register(name, value, flags, desc);
 }