Beispiel #1
0
            internal static void Postfix(ConduitFlowVisualizer __instance, int cell, ConduitFlow ___flowManager, bool ___showContents, ref Color32 __result)
            {
                Pressurized pressure = Integration.GetPressurizedAt(cell, (ConduitType)conduitType.GetValue(___flowManager));

                if (!Pressurized.IsDefault(pressure))
                {
                    __result = ___showContents ? pressure.Info.FlowOverlayTint : pressure.Info.FlowTint;
                }
            }
Beispiel #2
0
            internal static void Prefix(ConduitFlowVisualizer __instance, int cell, ref float conductivity, ConduitFlow ___flowManager)
            {
                Pressurized pressure = Integration.GetPressurizedAt(cell, (ConduitType)conduitType.GetValue(___flowManager));

                if (!Pressurized.IsDefault(pressure))
                {
                    conductivity = 1f;
                }
            }
        //If the mass originates from a pressurized conduit, change the mass to fit within the default range.
        private static float ModifyApparentMass(float originalMass, int cell, ConduitType type)
        {
            try
            {
                Pressurized pressure = Integration.GetPressurizedAt(cell, type);
                if (!Pressurized.IsDefault(pressure))
                {
                    return(originalMass / pressure.Info.IncreaseMultiplier);
                }

                return(originalMass);
            }
            catch (Exception e)
            {
                Debug.LogError($"[Pressurized] Error caught in ModifyApparentMass ->\n{e.Message}");
            }
            return(originalMass);
        }