Skip to content

Commit da2e352

Browse files
UI overhaul (#360)
* Refactor engine configuration UI for improved readability and functionality - Updated localization string for current engine configuration to be more concise. - Refactored DrawConfigSelectors method to utilize BuildConfigRows for better structure and clarity in the engine configuration UI. - Enhanced the configuration row definition structure for better data handling and display. - Implemented dynamic column width calculation for the configuration table to improve layout adaptability. - Adjusted GUI styles for the editor panel to enhance visual consistency and usability. * Add TestFlight data retrieval methods to TestFlightWrapper - Implemented GetCurrentFlightData method to retrieve the current flight data for a part. - Implemented GetMaximumData method to retrieve the maximum data value for a part. - Added GetDataPercentage method to calculate the percentage of current data relative to maximum data. - Enhanced reflection logic to safely access TestFlightCore methods. * Implement feature X to enhance user experience and optimize performance * Implement feature X to enhance user experience and fix bug Y in module Z * Refactor column management in ModuleEngineConfigs to remove unused data columns and update visibility logic * Refactor code structure * Even more reorganization of the engine config UI code. * Reorganize engine config UI code structure by moving UI-related files into a dedicated UI folder * Enhance engine configuration UI by adding close functionality and improving tooltip styles * MM Patch fix, and other fixes * feat: Enhance Engine Configuration GUI with Survival Probability and Slider Controls - Set default view to compact mode in EngineConfigGUI. - Introduced slider for burn time with input field and include ignition toggle. - Updated survival probability calculations based on slider time in EngineConfigGUI. - Modified reliability section to display survival probabilities for starting, current, and max data units. - Improved layout and styling for survival probability display in EngineConfigInfoPanel. - Refactored simulation controls to include new slider and checkbox for ignition. - Removed redundant failure rate summary section from EngineConfigInfoPanel. * refactor: Simplify TestFlight UI support configuration by consolidating engine config processing * Enhance Engine Configuration GUI with Survival Probability Modes - Introduced a toggle for switching between percentage and time modes for survival probability calculations. - Updated the EngineConfigGUI to handle new slider inputs for percentage and time, ensuring values persist across engines. - Modified the reliability section to display survival probabilities based on the selected mode, adjusting calculations accordingly. - Enhanced the UI to reflect changes in survival probability display, including dynamic headers and tooltips. - Updated the simulation controls to accommodate the new mode, allowing users to input either a survival percentage or a burn time. * Introduce new RealFuels tank configuration window Replaces the legacy TankWindow with a modernized UI overhaul (RealFuelsWindow). This includes a new Life Support planner, quick-fill engine presets with ratio status indicators, resource locking, and a searchable available propellants list. The project target framework is also updated to v4.8 to support the new UI components. * Improve the Layout and Design of the new Tank UI Window * Fix issues from PR #355 Yes, Siimav told me that the proper way to handle this was to do it through the original PR, but I REALLY didn't want to go through the process of disentangling this. * Added ClickThroughBlocker * Added a Settings option to have the Engine GUI always open when engine is clicked on * Moved the TestFlight failures into an external file so they can easily be updated if TF ever changes them * Fixed the RCS Graphs attempting to open even without TF failures attached to them * Fixed the propellant consumption math * Removed the reflection to get the RCS propellants and used GetConsumedResources() instead * Cached the GUIStyle allocations as static properties to stop the extra calls per frame * Fixed the issue where engines in symmetry were failing to open the window. The previous design was only trying to access the "first" engine that was placed * Removed the tech abbreviations * Moved the remaining items into localization * Extracted the RP-1 credit information into a separate file * Final UI Updates * Added MUCH better RCS / Generic Engine UI to help trigger players to upgrade their RCS levels. * Fixed an issue where the Tank UI wouldn't work properly on symmetry items * Fixed the issue where locking a resource did not persist when the UI closed * Allow direct selection of Liters when adding a new resource to a tank * Changed the QUICK FILL section to treat the entire row as a button * Removed the legacy TankWindow.cs and removed the never used RealWindowsPAW code. --------- Co-authored-by: Arodoid <ockidj@gmail.com>
1 parent 0e3a85b commit da2e352

26 files changed

Lines changed: 7547 additions & 1050 deletions

RealFuels/Localization/en-us.cfg

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Localization
4444
#RF_Engine_GUIHide = Hide GUI
4545
#RF_Engine_GUIShow = Show GUI
4646
#RF_Engine_WindowTitle = Configure <<1>>
47-
#RF_Engine_CurrentConfig = Current config
47+
#RF_Engine_CurrentConfig = Current
4848
#RF_Engine_ConfigSwitch = Switch to
4949
#RF_Engine_LacksTech = Lacks tech for <<1>>
5050
#RF_Engine_Purchase = Purchase
@@ -55,6 +55,43 @@ Localization
5555
#RF_Engine_unlocktech = unlock tech
5656
#RF_Engine_PayEntryCost = pay entry cost
5757

58+
// Engine config table column headers
59+
#RF_Engine_ColName = Name
60+
#RF_Engine_ColMinThrottle = Min%
61+
#RF_Engine_ColRatedBurnTime = Rated (s)
62+
#RF_Engine_ColTestedBurnTime = Tested (s)
63+
#RF_Engine_ColIgnReliability = Ign Reliability
64+
#RF_Engine_ColBurnNoData = Burn No Data
65+
#RF_Engine_ColBurnMaxData = Burn Max Data
66+
#RF_Engine_ColExtraCost = Extra Cost
67+
// Dynamic: survival column header in time mode — <<1>> is the formatted time value
68+
#RF_Engine_ColSurvivalAtTime = Survival @ <<1>>
69+
// Dynamic: survival column header in percentage mode — <<1>> is the percentage value
70+
#RF_Engine_ColTimeAtSurvival = Time @ <<1>>%
71+
72+
// Engine config table column tooltips
73+
#RF_Engine_TipName = Configuration name
74+
#RF_Engine_TipThrust = Rated thrust
75+
#RF_Engine_TipMinThrottle = Minimum throttle
76+
#RF_Engine_TipIsp = Sea level and vacuum Isp
77+
#RF_Engine_TipMass = Engine mass
78+
#RF_Engine_TipGimbal = Gimbal range
79+
#RF_Engine_TipIgnitions = Ignitions
80+
#RF_Engine_TipUllage = Ullage requirement
81+
#RF_Engine_TipPressureFed = Pressure-fed
82+
#RF_Engine_TipRatedBurnTime = Rated burn time
83+
#RF_Engine_TipTestedBurnTime = Tested burn time (real-world test duration)
84+
#RF_Engine_TipIgnReliability = Ignition reliability (starting / max data)
85+
#RF_Engine_TipBurnNoData = Cycle reliability at 0 data
86+
#RF_Engine_TipBurnMaxData = Cycle reliability at max data
87+
#RF_Engine_TipExtraCost = Extra cost for this config
88+
#RF_Engine_TipActions = Switch and purchase actions
89+
#RF_Engine_TipRequires = Required technology
90+
// Dynamic: survival tooltip in time mode — <<1>> is the formatted time value
91+
#RF_Engine_TipSurvivalAtTime = Survival probability at <<1>> (starting / max data)
92+
// Dynamic: survival tooltip in percentage mode — <<1>> is the percentage value
93+
#RF_Engine_TipTimeAtSurvival = Time to reach <<1>>% survival (starting / max data)
94+
5895
#RF_EngineRF_SymmetricAutocutoff = Symmetric Auto-cutoff
5996
#RF_EngineRF_IgnitedFor = Ignited for\u0020
6097
#RF_EngineRF_Tags = Tags

RealFuels/Localization/pt-br.cfg

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,39 @@ Localization
5555
#RF_Engine_unlocktech = desbloquear tecnologia
5656
#RF_Engine_PayEntryCost = pagar custo de entrada
5757

58+
// Engine config table column headers (untranslated)
59+
#RF_Engine_ColName = Name
60+
#RF_Engine_ColMinThrottle = Min%
61+
#RF_Engine_ColRatedBurnTime = Rated (s)
62+
#RF_Engine_ColTestedBurnTime = Tested (s)
63+
#RF_Engine_ColIgnReliability = Ign Reliability
64+
#RF_Engine_ColBurnNoData = Burn No Data
65+
#RF_Engine_ColBurnMaxData = Burn Max Data
66+
#RF_Engine_ColExtraCost = Extra Cost
67+
#RF_Engine_ColSurvivalAtTime = Survival @ <<1>>
68+
#RF_Engine_ColTimeAtSurvival = Time @ <<1>>%
69+
70+
// Engine config table column tooltips (untranslated)
71+
#RF_Engine_TipName = Configuration name
72+
#RF_Engine_TipThrust = Rated thrust
73+
#RF_Engine_TipMinThrottle = Minimum throttle
74+
#RF_Engine_TipIsp = Sea level and vacuum Isp
75+
#RF_Engine_TipMass = Engine mass
76+
#RF_Engine_TipGimbal = Gimbal range
77+
#RF_Engine_TipIgnitions = Ignitions
78+
#RF_Engine_TipUllage = Ullage requirement
79+
#RF_Engine_TipPressureFed = Pressure-fed
80+
#RF_Engine_TipRatedBurnTime = Rated burn time
81+
#RF_Engine_TipTestedBurnTime = Tested burn time (real-world test duration)
82+
#RF_Engine_TipIgnReliability = Ignition reliability (starting / max data)
83+
#RF_Engine_TipBurnNoData = Cycle reliability at 0 data
84+
#RF_Engine_TipBurnMaxData = Cycle reliability at max data
85+
#RF_Engine_TipExtraCost = Extra cost for this config
86+
#RF_Engine_TipActions = Switch and purchase actions
87+
#RF_Engine_TipRequires = Required technology
88+
#RF_Engine_TipSurvivalAtTime = Survival probability at <<1>> (starting / max data)
89+
#RF_Engine_TipTimeAtSurvival = Time to reach <<1>>% survival (starting / max data)
90+
5891
#RF_EngineRF_SymmetricAutocutoff = Corte Automático Simétrico
5992
#RF_EngineRF_IgnitedFor = Ignitado por\u0020
6093
#RF_EngineRF_Tags = Etiquetas

RealFuels/Localization/ru.cfg

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,39 @@ Localization
5555
#RF_Engine_unlocktech = Технология для разблокирования
5656
#RF_Engine_PayEntryCost = заплатить стоимость открытия
5757

58+
// Engine config table column headers (untranslated)
59+
#RF_Engine_ColName = Name
60+
#RF_Engine_ColMinThrottle = Min%
61+
#RF_Engine_ColRatedBurnTime = Rated (s)
62+
#RF_Engine_ColTestedBurnTime = Tested (s)
63+
#RF_Engine_ColIgnReliability = Ign Reliability
64+
#RF_Engine_ColBurnNoData = Burn No Data
65+
#RF_Engine_ColBurnMaxData = Burn Max Data
66+
#RF_Engine_ColExtraCost = Extra Cost
67+
#RF_Engine_ColSurvivalAtTime = Survival @ <<1>>
68+
#RF_Engine_ColTimeAtSurvival = Time @ <<1>>%
69+
70+
// Engine config table column tooltips (untranslated)
71+
#RF_Engine_TipName = Configuration name
72+
#RF_Engine_TipThrust = Rated thrust
73+
#RF_Engine_TipMinThrottle = Minimum throttle
74+
#RF_Engine_TipIsp = Sea level and vacuum Isp
75+
#RF_Engine_TipMass = Engine mass
76+
#RF_Engine_TipGimbal = Gimbal range
77+
#RF_Engine_TipIgnitions = Ignitions
78+
#RF_Engine_TipUllage = Ullage requirement
79+
#RF_Engine_TipPressureFed = Pressure-fed
80+
#RF_Engine_TipRatedBurnTime = Rated burn time
81+
#RF_Engine_TipTestedBurnTime = Tested burn time (real-world test duration)
82+
#RF_Engine_TipIgnReliability = Ignition reliability (starting / max data)
83+
#RF_Engine_TipBurnNoData = Cycle reliability at 0 data
84+
#RF_Engine_TipBurnMaxData = Cycle reliability at max data
85+
#RF_Engine_TipExtraCost = Extra cost for this config
86+
#RF_Engine_TipActions = Switch and purchase actions
87+
#RF_Engine_TipRequires = Required technology
88+
#RF_Engine_TipSurvivalAtTime = Survival probability at <<1>> (starting / max data)
89+
#RF_Engine_TipTimeAtSurvival = Time to reach <<1>>% survival (starting / max data)
90+
5891
#RF_EngineRF_SymmetricAutocutoff = Симм. авто-остановка
5992
#RF_EngineRF_IgnitedFor = Зажигался в течение\u0020
6093
#RF_EngineRF_Tags = Метки

RealFuels/Localization/zh-cn.cfg

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,39 @@ Localization
5555
#RF_Engine_unlocktech = 解锁科技
5656
#RF_Engine_PayEntryCost = 支付研发成本
5757

58+
// Engine config table column headers (untranslated)
59+
#RF_Engine_ColName = Name
60+
#RF_Engine_ColMinThrottle = Min%
61+
#RF_Engine_ColRatedBurnTime = Rated (s)
62+
#RF_Engine_ColTestedBurnTime = Tested (s)
63+
#RF_Engine_ColIgnReliability = Ign Reliability
64+
#RF_Engine_ColBurnNoData = Burn No Data
65+
#RF_Engine_ColBurnMaxData = Burn Max Data
66+
#RF_Engine_ColExtraCost = Extra Cost
67+
#RF_Engine_ColSurvivalAtTime = Survival @ <<1>>
68+
#RF_Engine_ColTimeAtSurvival = Time @ <<1>>%
69+
70+
// Engine config table column tooltips (untranslated)
71+
#RF_Engine_TipName = Configuration name
72+
#RF_Engine_TipThrust = Rated thrust
73+
#RF_Engine_TipMinThrottle = Minimum throttle
74+
#RF_Engine_TipIsp = Sea level and vacuum Isp
75+
#RF_Engine_TipMass = Engine mass
76+
#RF_Engine_TipGimbal = Gimbal range
77+
#RF_Engine_TipIgnitions = Ignitions
78+
#RF_Engine_TipUllage = Ullage requirement
79+
#RF_Engine_TipPressureFed = Pressure-fed
80+
#RF_Engine_TipRatedBurnTime = Rated burn time
81+
#RF_Engine_TipTestedBurnTime = Tested burn time (real-world test duration)
82+
#RF_Engine_TipIgnReliability = Ignition reliability (starting / max data)
83+
#RF_Engine_TipBurnNoData = Cycle reliability at 0 data
84+
#RF_Engine_TipBurnMaxData = Cycle reliability at max data
85+
#RF_Engine_TipExtraCost = Extra cost for this config
86+
#RF_Engine_TipActions = Switch and purchase actions
87+
#RF_Engine_TipRequires = Required technology
88+
#RF_Engine_TipSurvivalAtTime = Survival probability at <<1>> (starting / max data)
89+
#RF_Engine_TipTimeAtSurvival = Time to reach <<1>>% survival (starting / max data)
90+
5891
#RF_EngineRF_SymmetricAutocutoff = 对称部件自动关停
5992
#RF_EngineRF_IgnitedFor = 点火时间\u0020
6093
#RF_EngineRF_Tags = 标签
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// RealFuels TestFlight UI Support
2+
// This patch copies TestFlight reliability values from TESTFLIGHT nodes into CONFIG nodes
3+
// so the RealFuels engine configuration UI can display them.
4+
// This runs after RealismOverhaul but before TESTFLIGHT nodes are deleted.
5+
6+
@PART[*]:HAS[@MODULE[Module*EngineConfigs]]:BEFORE[zTestFlight]
7+
8+
{
9+
@MODULE[Module*EngineConfigs]
10+
{
11+
// Copy reliability values for RealFuels UI display
12+
@CONFIG:HAS[@TESTFLIGHT:HAS[#ignitionReliabilityStart]] { &ignitionReliabilityStart = #$TESTFLIGHT/ignitionReliabilityStart$ }
13+
@CONFIG:HAS[@TESTFLIGHT:HAS[#ignitionReliabilityEnd]] { &ignitionReliabilityEnd = #$TESTFLIGHT/ignitionReliabilityEnd$ }
14+
@CONFIG:HAS[@TESTFLIGHT:HAS[#cycleReliabilityStart]] { &cycleReliabilityStart = #$TESTFLIGHT/cycleReliabilityStart$ }
15+
@CONFIG:HAS[@TESTFLIGHT:HAS[#cycleReliabilityEnd]] { &cycleReliabilityEnd = #$TESTFLIGHT/cycleReliabilityEnd$ }
16+
17+
// Copy burn time values for failure probability chart
18+
@CONFIG:HAS[@TESTFLIGHT:HAS[#ratedBurnTime]] { &ratedBurnTime = #$TESTFLIGHT/ratedBurnTime$ }
19+
@CONFIG:HAS[@TESTFLIGHT:HAS[#ratedContinuousBurnTime]] { &ratedContinuousBurnTime = #$TESTFLIGHT/ratedContinuousBurnTime$ }
20+
@CONFIG:HAS[@TESTFLIGHT:HAS[#testedBurnTime]] { &testedBurnTime = #$TESTFLIGHT/testedBurnTime$ }
21+
@CONFIG:HAS[@TESTFLIGHT:HAS[#overburnPenalty]] { &overburnPenalty = #$TESTFLIGHT/overburnPenalty$ }
22+
}
23+
}
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
using System;
2+
using System.Collections;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Reflection;
6+
using UnityEngine;
7+
8+
namespace RealFuels
9+
{
10+
/// <summary>
11+
/// Handles integration with B9PartSwitch and TestFlight mods.
12+
/// Manages B9PS module linking and TestFlight interop values.
13+
/// </summary>
14+
public class EngineConfigIntegrations
15+
{
16+
private readonly ModuleEngineConfigsBase _module;
17+
18+
// B9PartSwitch reflection fields
19+
protected static bool _b9psReflectionInitialized = false;
20+
protected static FieldInfo B9PS_moduleID;
21+
protected static MethodInfo B9PS_SwitchSubtype;
22+
protected static FieldInfo B9PS_switchInFlight;
23+
24+
public Dictionary<string, PartModule> B9PSModules;
25+
protected Dictionary<string, string> RequestedB9PSVariants = new Dictionary<string, string>();
26+
27+
public EngineConfigIntegrations(ModuleEngineConfigsBase module)
28+
{
29+
_module = module;
30+
InitializeB9PSReflection();
31+
}
32+
33+
#region TestFlight Integration
34+
35+
/// <summary>
36+
/// Updates TestFlight interop values with current configuration.
37+
/// </summary>
38+
public void UpdateTFInterops()
39+
{
40+
TestFlightWrapper.AddInteropValue(_module.part, _module.isMaster ? "engineConfig" : "vernierConfig", _module.configuration, "RealFuels");
41+
}
42+
43+
#endregion
44+
45+
#region B9PartSwitch Integration
46+
47+
/// <summary>
48+
/// Initializes reflection for B9PartSwitch if available.
49+
/// </summary>
50+
private void InitializeB9PSReflection()
51+
{
52+
if (_b9psReflectionInitialized || !Utilities.B9PSFound) return;
53+
B9PS_moduleID = Type.GetType("B9PartSwitch.CustomPartModule, B9PartSwitch")?.GetField("moduleID");
54+
B9PS_SwitchSubtype = Type.GetType("B9PartSwitch.ModuleB9PartSwitch, B9PartSwitch")?.GetMethod("SwitchSubtype");
55+
B9PS_switchInFlight = Type.GetType("B9PartSwitch.ModuleB9PartSwitch, B9PartSwitch")?.GetField("switchInFlight");
56+
_b9psReflectionInitialized = true;
57+
}
58+
59+
/// <summary>
60+
/// Loads all B9PartSwitch modules that are linked to configs.
61+
/// </summary>
62+
public void LoadB9PSModules()
63+
{
64+
IEnumerable<string> b9psModuleIDs = _module.configs
65+
.Where(cfg => cfg.HasNode("LinkB9PSModule"))
66+
.SelectMany(cfg => cfg.GetNodes("LinkB9PSModule"))
67+
.Select(link => link?.GetValue("name"))
68+
.Where(moduleID => moduleID != null)
69+
.Distinct();
70+
71+
B9PSModules = new Dictionary<string, PartModule>(b9psModuleIDs.Count());
72+
73+
foreach (string moduleID in b9psModuleIDs)
74+
{
75+
var module = ModuleEngineConfigsBase.GetSpecifiedModules(_module.part, string.Empty, -1, "ModuleB9PartSwitch", false)
76+
.FirstOrDefault(m => (string)B9PS_moduleID?.GetValue(m) == moduleID);
77+
if (module == null)
78+
Debug.LogError($"*RFMEC* B9PartSwitch module with ID {moduleID} was not found for {_module.part}!");
79+
else
80+
B9PSModules[moduleID] = module;
81+
}
82+
}
83+
84+
/// <summary>
85+
/// Hide the GUI for all `ModuleB9PartSwitch`s managed by RF.
86+
/// This is somewhat of a hack-ish approach...
87+
/// </summary>
88+
public void HideB9PSVariantSelectors()
89+
{
90+
if (B9PSModules == null) return;
91+
foreach (var module in B9PSModules.Values)
92+
{
93+
module.Fields["currentSubtypeTitle"].guiActive = false;
94+
module.Fields["currentSubtypeTitle"].guiActiveEditor = false;
95+
module.Fields["currentSubtypeIndex"].guiActive = false;
96+
module.Fields["currentSubtypeIndex"].guiActiveEditor = false;
97+
module.Events["ShowSubtypesWindow"].guiActive = false;
98+
module.Events["ShowSubtypesWindow"].guiActiveEditor = false;
99+
}
100+
}
101+
102+
/// <summary>
103+
/// Coroutine to hide B9PS in-flight selector after a frame delay.
104+
/// </summary>
105+
private IEnumerator HideB9PSInFlightSelector_Coroutine(PartModule module)
106+
{
107+
yield return null;
108+
module.Events["ShowSubtypesWindow"].guiActive = false;
109+
}
110+
111+
/// <summary>
112+
/// Requests B9PS variant changes for the given config.
113+
/// </summary>
114+
public void RequestB9PSVariantsForConfig(ConfigNode node)
115+
{
116+
if (B9PSModules == null || B9PSModules.Count == 0) return;
117+
RequestedB9PSVariants.Clear();
118+
if (node.GetNodes("LinkB9PSModule") is ConfigNode[] links)
119+
{
120+
foreach (ConfigNode link in links)
121+
{
122+
string moduleID = null, subtype = null;
123+
if (!link.TryGetValue("name", ref moduleID))
124+
Debug.LogError($"*RFMEC* Config `{_module.configurationDisplay}` of {_module.part} has a LinkB9PSModule specification without a name key!");
125+
if (!link.TryGetValue("subtype", ref subtype))
126+
Debug.LogError($"*RFMEC* Config `{_module.configurationDisplay}` of {_module.part} has a LinkB9PSModule specification without a subtype key!");
127+
if (moduleID != null && subtype != null)
128+
RequestedB9PSVariants[moduleID] = subtype;
129+
}
130+
}
131+
_module.StartCoroutine(ApplyRequestedB9PSVariants_Coroutine());
132+
}
133+
134+
/// <summary>
135+
/// Coroutine that applies requested B9PS variant changes after a frame delay.
136+
/// </summary>
137+
protected IEnumerator ApplyRequestedB9PSVariants_Coroutine()
138+
{
139+
yield return new WaitForEndOfFrame();
140+
141+
if (RequestedB9PSVariants.Count == 0) yield break;
142+
143+
foreach (var entry in B9PSModules)
144+
{
145+
string moduleID = entry.Key;
146+
PartModule module = entry.Value;
147+
148+
if (HighLogic.LoadedSceneIsFlight
149+
&& B9PS_switchInFlight != null
150+
&& !(bool)B9PS_switchInFlight.GetValue(module)) continue;
151+
152+
if (!RequestedB9PSVariants.TryGetValue(moduleID, out string subtypeName))
153+
{
154+
Debug.LogError($"*RFMEC* Config {_module.configurationDisplay} of {_module.part} does not specify a subtype for linked B9PS module with ID {moduleID}; defaulting to `{_module.configuration}`.");
155+
subtypeName = _module.configuration;
156+
}
157+
158+
B9PS_SwitchSubtype?.Invoke(module, new object[] { subtypeName });
159+
if (HighLogic.LoadedSceneIsFlight) _module.StartCoroutine(HideB9PSInFlightSelector_Coroutine(module));
160+
}
161+
162+
RequestedB9PSVariants.Clear();
163+
// Clear symmetry counterparts' queues since B9PS already handles symmetry.
164+
_module.DoForEachSymmetryCounterpart(mec => mec.Integrations.ClearRequestedB9PSVariants());
165+
}
166+
167+
/// <summary>
168+
/// Clears the requested B9PS variants queue.
169+
/// </summary>
170+
public void ClearRequestedB9PSVariants()
171+
{
172+
RequestedB9PSVariants.Clear();
173+
}
174+
175+
/// <summary>
176+
/// Updates B9PS variants based on current config.
177+
/// </summary>
178+
public void UpdateB9PSVariants() => RequestB9PSVariantsForConfig(_module.config);
179+
180+
#endregion
181+
}
182+
}

0 commit comments

Comments
 (0)