public static ConVar <T> Register <T>(string Name, T Value, ConVarType Type = ConVarType.Default) { ConVar <T> CVar = new ConVar <T>(Name, Value, Type); ConItems.Register(Name, CVar); return(CVar); }
public static void RegisterAlias(string Alias, string Command) { Alias = Alias.Trim(); if (ConItems.TryFind(Alias, out ConItem Itm)) { Error("Cannot shadow a command/variable with an alias"); return; } if (Aliases.ContainsKey(Alias)) { Aliases.Remove(Alias); } Aliases.Add(Alias, Command); }
public static IEnumerable <ConVar> GetAll() { return(ConItems.GetAll <ConVar>()); }
public static bool TryFind(string Name, out ConVar Var) { Var = ConItems.Find(Name) as ConVar; return(Var != null); }