private static bool Prefix(ref Valve __instance, float amount, ref ValveBase ___valveBase, ref float ___desiredFlow)
        {
            if (!CustomizeBuildingsState.StateManager.State.NoDupeValves)
            {
                return(true);
            }

            ___desiredFlow = Mathf.Clamp(amount, 0.0f, ___valveBase.MaxFlow);

            KSelectable component = __instance.GetComponent <KSelectable>();

            component.ToggleStatusItem(Db.Get().BuildingStatusItems.PumpingLiquidOrGas, ___desiredFlow >= 0.0, (object)___valveBase.AccumulatorHandle);

            __instance.UpdateFlow();
            return(false);
        }