Skip to content

Commit 1cbc0ed

Browse files
authored
Merge pull request #29 from rkunze/master
Add support for RevIVA
2 parents 187ceff + 09ab131 commit 1cbc0ed

File tree

1 file changed

+105
-8
lines changed

1 file changed

+105
-8
lines changed

GameData/ProbeControlRoom/MM_MC-Internal.cfg

Lines changed: 105 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
2-
@PART[*]:HAS[@MODULE[ModuleCommand],!INTERNAL[*]]:Final
1+
// Initial setup with default config
2+
// IVA mods providing alternative mission control layouts can modify this
3+
// node in any phase before LAST[ProbeControlRoom] to change the default setup
4+
PROBECONTROLROOM_CONFIG
35
{
6+
INTERNAL
7+
{
8+
name = MissionControl
9+
}
10+
411
MODULE
512
{
613
name = ProbeControlRoomPart
@@ -11,13 +18,103 @@
1118
name = RasterPropMonitorComputer
1219
}
1320

14-
INTERNAL
15-
{
16-
name = MissionControl
17-
}
18-
21+
MODULE:NEEDS[RevIVA]
22+
{
23+
name = ModuleIVASwitch
24+
internalName = MissionControl
25+
}
26+
MODULE:NEEDS[RevIVA]
27+
{
28+
name = ModuleB9PartSwitch
29+
moduleID = IVASwitch
30+
switcherDescription = IVA
31+
switcherDescriptionPlural = IVAs
32+
switchInFlight = true
33+
uiGroupName = IVASwitch
34+
uiGroupDisplayName = IVA Switch
35+
SUBTYPE {
36+
name = MissionControl
37+
primaryColor = White
38+
secondaryColor = White
39+
descriptionSummary = Default
40+
descriptionDetail = Use Mission Control layout from ProbeControlRoom.
41+
MODULE
42+
{
43+
IDENTIFIER { name = ModuleIVASwitch }
44+
DATA { internalName = MissionControl }
45+
}
46+
}
47+
}
48+
}
49+
50+
// RevIVA setup for known IVA mods
51+
@PROBECONTROLROOM_CONFIG:NEEDS[DE_IVAExtension] {
52+
@MODULE[ModuleB9PartSwitch] {
53+
+SUBTYPE[MissionControl] {
54+
@name = DE_MissionControl
55+
@primaryColor = Red
56+
@secondaryColor = White
57+
@descriptionSummary = DE IVA
58+
@descriptionDetail = Use Mission Control layout from DE IVA Extension
59+
@MODULE
60+
{
61+
@DATA { @internalName = DE_MissionControl }
62+
}
63+
}
64+
}
1965
}
2066

67+
@PROBECONTROLROOM_CONFIG:NEEDS[KSA] {
68+
@MODULE[ModuleB9PartSwitch] {
69+
+SUBTYPE[MissionControl] {
70+
@name = KSA_MissionControl
71+
@primaryColor = Blue
72+
@secondaryColor = White
73+
@descriptionSummary = KSA
74+
@descriptionDetail = Use Mission Control layout from KSA
75+
@MODULE
76+
{
77+
@DATA { @internalName = KSA_MissionControl }
78+
}
79+
}
80+
}
81+
}
82+
83+
@PROBECONTROLROOM_CONFIG:NEEDS[PCRIVAPLUS] {
84+
@MODULE[ModuleB9PartSwitch] {
85+
+SUBTYPE[MissionControl] {
86+
@name = PCRIVAPLUS_MissionControl_RETRO
87+
@primaryColor = Blue
88+
@secondaryColor = Red
89+
@descriptionSummary = Retro
90+
@descriptionDetail = Use Old school NASA-style layout from PCRIVAPLUS
91+
@MODULE
92+
{
93+
@DATA { @internalName = PCRIVAPLUS_MissionControl_RETRO }
94+
}
95+
}
96+
}
97+
}
98+
99+
// Add the mission control INTERNAL to every probe that does not yet have an INTERNAL
100+
@PART[*]:HAS[@MODULE[ModuleCommand],!INTERNAL[*]]:LAST[ProbeControlRoom]
101+
{
102+
#@PROBECONTROLROOM_CONFIG/MODULE[*] {}
103+
#@PROBECONTROLROOM_CONFIG/INTERNAL {}
104+
}
105+
106+
// Add the RevIVA support to any probe that has PCR support but no IVA switch.
107+
// Needed to support existing IVA mods that support PCR but not RevIVA
108+
@PART[*]:HAS[@MODULE[ProbeControlRoomPart],!MODULE[ModuleB9PartSwitch]:HAS[#moduleID[IVASwitch]]]:LAST[ProbeControlRoom]:NEEDS[RevIVA]
109+
{
110+
#@PROBECONTROLROOM_CONFIG/MODULE[ModuleB9PartSwitch]:HAS[#moduleID[IVASwitch]] {}
111+
#@PROBECONTROLROOM_CONFIG/MODULE[ModuleIVASwitch] {}
112+
}
113+
114+
115+
// Clean up the config node
116+
-PROBECONTROLROOM_CONFIG:LAST[ProbeControlRoom] {}
117+
21118
@INTERNAL:HAS[@MODEL:HAS[#model[ProbeControlRoom/Spaces/MissionControl/MissionControl]]&!PROP:HAS[@MODULE[CivilianKerbal]]]
22119
{
23120
!MODULE[InternalCameraSwitch],* {}
@@ -88,4 +185,4 @@
88185
kerbalName = Linus Kerman
89186
}
90187
}
91-
}
188+
}

0 commit comments

Comments
 (0)