private static void Prefix(ref CarLevelOfDetail.Level newLevel) { if (newLevel > _maxLod) { newLevel = _maxLod; } }
internal static void Init() { var setting = Entry.Settings.GetItem <string>("carLevelOfDetailCap"); try { _maxLod = (CarLevelOfDetail.Level)Enum.Parse(typeof(CarLevelOfDetail.Level), setting, true); } catch (Exception) { Console.WriteLine("[Tweakr] Setting 'carLevelOfDetailCap' has an invalid value; ignoring."); } }