Exemple #1
0
        public ExpansionSettingsBase ConvertToSettings(int in_slot_index)
        {
            ExpansionSettingsBase expansion_settings;

            if (Type == ExpansionManager.ExpansionType.Card)
            {
                expansion_settings = new CardSettingsBase(SettingsBase.SettingsCategory.TVC, SectionName, in_slot_index);
            }
            else
            {
                expansion_settings = new ExpansionSettingsBase(SettingsBase.SettingsCategory.TVC, SectionName);
            }

            return(expansion_settings);
        }
Exemple #2
0
        /// <summary>
        /// Add module in setup operation
        /// </summary>
        /// <param name="in_module_name"></param>
        public void SetupAddModule(ExpansionInfo in_expansion_info, int in_selected_slot_index)
        {
            ExpansionSettingsBase expansion_settings = in_expansion_info.ConvertToSettings(in_selected_slot_index);

            expansion_settings.Active = true;
            m_settings_file.ModuleAdd(expansion_settings);

            ExpansionBase expansion_class;

            LoadExpansionMainClass(in_expansion_info.SectionName, out expansion_class);

            LoadedExpansionInfo loaded_expansion_info = new LoadedExpansionInfo(expansion_class, expansion_settings.ExpansionIndex, in_selected_slot_index);

            m_expansions.Add(loaded_expansion_info);

            // create tree information
            SetupCreateModuleTreeInfo(loaded_expansion_info, m_expansions.Count - 1);
        }