diff --git a/RasterPropMonitor/Core/RasterPropMonitor.cs b/RasterPropMonitor/Core/RasterPropMonitor.cs index 6ddbdd7d..99d7b6d5 100644 --- a/RasterPropMonitor/Core/RasterPropMonitor.cs +++ b/RasterPropMonitor/Core/RasterPropMonitor.cs @@ -91,6 +91,8 @@ public class RasterPropMonitor: InternalModule private int loopsWithoutInitCounter = 0; private bool startupFailed = false; + private bool ourPodIsTransparent = false; + private enum Script { Normal, @@ -246,6 +248,9 @@ public void Start() audioOutput = JUtil.SetupIVASound(internalProp, buttonClickSound, buttonClickVolume, false); + // One last thing to make sure of: If our pod is transparent, we're always active. + ourPodIsTransparent = JUtil.IsPodTransparent(part); + // And if the try block never completed, startupComplete will never be true. startupComplete = true; } catch { @@ -541,7 +546,7 @@ public override void OnUpdate() return; } - if (!JUtil.UserIsInPod(part)) + if (!ourPodIsTransparent && !JUtil.UserIsInPod(part)) return; // Screenshots need to happen in at this moment, because otherwise they may miss. diff --git a/RasterPropMonitor/Core/UtilityFunctions.cs b/RasterPropMonitor/Core/UtilityFunctions.cs index 0311f575..9bb17679 100644 --- a/RasterPropMonitor/Core/UtilityFunctions.cs +++ b/RasterPropMonitor/Core/UtilityFunctions.cs @@ -231,6 +231,16 @@ public static void SetCameraCullingMaskForIVA(string cameraName, bool flag) } + public static bool IsPodTransparent(Part thatPart) + { + foreach (PartModule thatModule in thatPart.Modules) { + if (thatModule is JSITransparentPod) { + return true; + } + } + return false; + } + public static void SetMainCameraCullingMaskForIVA(bool flag) { SetCameraCullingMaskForIVA("Camera 00", flag); diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index 14fc9638..3862092c 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -17,7 +17,7 @@ // Now this is the actual version number with build number. // As I release newer ones, I'll bump them manually. // Build number is altered automatically. -[assembly: AssemblyFileVersion("0.18.1.1")] +[assembly: AssemblyFileVersion("0.18.1.3")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing.