private void LoadLanguages() { _languages.Clear(); if (!string.IsNullOrEmpty(ModHelper.GetPath())) { string localePath = Path.Combine(ModHelper.GetPath(), _localeVirtualPath); if (Directory.Exists(localePath)) { string[] languageFiles = Directory.GetFiles(localePath); foreach (string languageFile in languageFiles) { LanguageModel language = JsonHelper.FromJsonFile <LanguageModel>(languageFile); if (language != null) { _languages.Add(language.UniqueName, language); } } } } }
public override void OnRefreshMilestones() { if (managers.loading.currentMode == AppMode.Game && Singleton <UnlockManager> .exists) { ModConfigModel config = JsonHelper.FromJsonFile <ModConfigModel>(Path.Combine(ModHelper.GetPath(), _modConfigFilePath)) ?? new ModConfigModel(); BuildNonDefault(config); RefreshMilestones(config); } milestonesManager.UnlockMilestone("Basic Road Created"); }