/// <summary> /// Searches for a numeric convar with the specified name and sends it to the 'convar' output parameter. /// If not found, a notification will be sent to the context. /// </summary> /// <param name="cvName">The name of the convar.</param> /// <param name="convar">The Convar object to send the result to.</param> /// <returns></returns> public bool RequestNumericConvar(string cvName, out Convar convar) { convar = null; Convar cv; if (!Devcom.Convars.TryGetValue(Util.Qualify(Category, cvName), out cv)) { Notify("Convar '" + cvName + "' not found."); return false; } if (!Util.IsNumericType(cv.Value)) { Notify("Convar '" + cvName + "' is not a numeric type."); return false; } convar = cv; return true; }
/// <summary> /// Searches for a convar with the specified name and sends it to the 'convar' output parameter. /// If not found, a notification will be sent to the context. /// </summary> /// <param name="cvName">The name of the convar.</param> /// <param name="convar">The Convar object to send the result to.</param> /// <returns></returns> public bool RequestConvar(string cvName, out Convar convar) { if (Devcom.Convars.TryGetValue(Util.Qualify(Category, cvName), out convar)) return true; Notify("Convar '" + cvName + "' not found."); return false; }