public override void OnLevelLoaded(LoadMode mode)
        {
            AmericanRoadSignsPropReplacer.config = Configuration.Deserialize(AmericanRoadSignsPropReplacer.configPath);
            if (AmericanRoadSignsPropReplacer.config == null)
            {
                AmericanRoadSignsPropReplacer.config = new Configuration();
            }
            AmericanRoadSignsPropReplacer.SaveConfig();

            string path = getModPath();

            AmericanRoadSignsPropReplacer.FindProps();
            AmericanRoadSignsPropReplacer.ReplaceProps();
            AmericanRoadSignsPropReplacer.ChangeProps(path);

            base.OnLevelLoaded(mode);
        }
        public void OnSettingsUI(UIHelperBase helper)
        {
            AmericanRoadSignsPropReplacer.config = Configuration.Deserialize(AmericanRoadSignsPropReplacer.configPath);
            bool flag = AmericanRoadSignsPropReplacer.config == null;

            if (flag)
            {
                AmericanRoadSignsPropReplacer.config = new Configuration();
            }
            AmericanRoadSignsPropReplacer.SaveConfig();


            UIHelperBase group = helper.AddGroup(Name);

            group.AddSpace(10);
            group.AddCheckbox("Write data to debug log", AmericanRoadSignsPropReplacer.config.enable_debug, new OnCheckChanged(EventEnableDebug));
            group.AddSpace(10);
            group.AddGroup("WARNING: enabling debug data may increase loading times considerably!\nEnable this setting is only recommended when you experience problems with this mod.");
            group.AddSpace(20);
        }
 private void EventEnableDebug(bool c)
 {
     AmericanRoadSignsPropReplacer.config.enable_debug = c;
     AmericanRoadSignsPropReplacer.SaveConfig();
 }