diff --git a/GameData/FreeIva/Mk2Expansion/M2X_Passthrough.cfg b/GameData/FreeIva/Mk2Expansion/M2X_Passthrough.cfg index f2cd5ed6..0b9937b3 100644 --- a/GameData/FreeIva/Mk2Expansion/M2X_Passthrough.cfg +++ b/GameData/FreeIva/Mk2Expansion/M2X_Passthrough.cfg @@ -14,6 +14,12 @@ FreeIva_AutoPassThrough_VolumeScalar = -0.25 } +// Mk2Rebalance changes the names of the bottom nodes on this part +@PART[M2X_625tricoupler]:HAS[~FreeIva_AutoPassThrough&#node_stack_bottom03]:FOR[FreeIva] +{ + FreeIva_AutoPassThrough_NodeB = bottom03 +} + @PART[M2X_625tricoupler|M2X_UST|M2X_InverterFuselage|M2X_SlantAdapterS]:HAS[~FreeIva_AutoPassThrough]:FOR[FreeIva] { FreeIva_AutoPassThrough = true diff --git a/GameData/FreeIva/Mk2Expansion/M2X_linearTricoupler.cfg b/GameData/FreeIva/Mk2Expansion/M2X_linearTricoupler.cfg index ed06f8e7..78cccb8d 100644 --- a/GameData/FreeIva/Mk2Expansion/M2X_linearTricoupler.cfg +++ b/GameData/FreeIva/Mk2Expansion/M2X_linearTricoupler.cfg @@ -1,4 +1,6 @@ -@PART[M2X_linearTricoupler]:HAS[!MODULE[ModuleFreeIva]]:FOR[FreeIva] +// NOTE: Mk2Rebalance also changes the names of these nodes, but to something different. So only change them if they haven't already been changed +// Even with auto-detection we still need to rename these because otherwise the lookup by name fails when there are multiple "bottom" nodes +@PART[M2X_linearTricoupler]:HAS[!MODULE[ModuleFreeIva]&#node_stack_bottom_01]:FOR[FreeIva] { // when KSP loads the part, it splits these keys by underscore and only takes the 3rd token. // So, the part ends up with 3 attachnodes named "bottom" and we can't tell hatches which one they belong to @@ -6,7 +8,10 @@ node_stack_bottom02 = #$node_stack_bottom_02$ -node_stack_bottom_01 = delete -node_stack_bottom_02 = delete - +} + +@PART[M2X_linearTricoupler]:HAS[!MODULE[ModuleFreeIva]]:FOR[FreeIva] +{ FreeIva_AutoPassThrough_InternalName = FreeIva_M2X_linearTricoupler_IVA } @@ -30,12 +35,6 @@ INTERNAL name = Hatch_Plane position = 0, 0, -0.76 rotation = -3.09086197e-08, -0.707106709, -0.707106829, -3.09086197e-08 - - MODULE - { - name = HatchConfig - attachNodeId = top - } } PROP @@ -43,12 +42,6 @@ INTERNAL name = Hatch_Plane position = 0, 0, 0.875 rotation = 0.707106888, 6.18172535e-08, 0, -0.70710665 - - MODULE - { - name = HatchConfig - attachNodeId = bottom - } } PROP @@ -56,12 +49,6 @@ INTERNAL name = FreeIva_Hatch_Round_Size0 position = -1.223489, 0, 0.876697361 rotation = 0.707106829, 0, 0, -0.707106709 - - MODULE - { - name = HatchConfig - attachNodeId = bottom01 - } } PROP @@ -69,12 +56,6 @@ INTERNAL name = FreeIva_Hatch_Round_Size0 position = 1.223489, 0, 0.876697361 rotation = 0.707106829, 0, 0, -0.707106709 - - MODULE - { - name = HatchConfig - attachNodeId = bottom02 - } } } diff --git a/GameData/FreeIva/Patches/AutoPassThrough.cfg b/GameData/FreeIva/Patches/AutoPassThrough.cfg index 870f7c17..bf016ea1 100644 --- a/GameData/FreeIva/Patches/AutoPassThrough.cfg +++ b/GameData/FreeIva/Patches/AutoPassThrough.cfg @@ -133,15 +133,22 @@ B9_TANK_TYPE } } -// step 3.1: if the part doesn't have resources, just set it up directly for passthrough +// step 3.1: determine the node names to use when applying passthrough +@PART:HAS[#FreeIva_AutoPassThrough[true]&~FreeIva_AutoPassThrough_InternalName]:FOR[zzz_FreeIva] +{ + &FreeIva_AutoPassThrough_NodeA = top + &FreeIva_AutoPassThrough_NodeB = bottom +} + +// step 3.2: if the part doesn't have resources, just set it up directly to be traversible // with passthrough... @PART:HAS[#FreeIva_AutoPassThrough[true]&~FreeIva_AutoPassThrough_FuelSwitchID&!RESOURCE&~FreeIva_AutoPassThrough_InternalName]:FOR[zzz_FreeIva] { MODULE { name = ModuleFreeIva - passThroughNodeA = top - passThroughNodeB = bottom + passThroughNodeA = #$/FreeIva_AutoPassThrough_NodeA$ + passThroughNodeB = #$/FreeIva_AutoPassThrough_NodeB$ } } // ...or with a named internal @@ -356,8 +363,8 @@ B9_TANK_TYPE } DATA { - passThroughNodeA = top - passThroughNodeB = bottom + passThroughNodeA = #$/FreeIva_AutoPassThrough_NodeA$ + passThroughNodeB = #$/FreeIva_AutoPassThrough_NodeB$ } } } @@ -412,8 +419,8 @@ B9_TANK_TYPE } DATA { - passThroughNodeA = top - passThroughNodeB = bottom + passThroughNodeA = #$/FreeIva_AutoPassThrough_NodeA$ + passThroughNodeB = #$/FreeIva_AutoPassThrough_NodeB$ } } } diff --git a/KSPBuildTools b/KSPBuildTools index 13cfee96..28379a3f 160000 --- a/KSPBuildTools +++ b/KSPBuildTools @@ -1 +1 @@ -Subproject commit 13cfee96fc9fdbc13f3c92e4571cf47698179f0e +Subproject commit 28379a3fbb5b3ff45c57293e761aa2736dbf8cf7