Beispiel #1
0
        private static void Postfix(ValveSideScreen __instance)
        {
            Logger.LogFormat(" === FluidWarpMod_ValveSideScreen_SetTarget Postfix === ");

            ConduitType type = FluidWarpMod_Utils.GetConduitType(__instance);

            if (type == LiquidWarpConfig.CONDUIT_TYPE || type == GasWarpConfig.CONDUIT_TYPE)
            {
                ((LocText)minFlowLabelFI.GetValue(__instance)).text = "-Channel";
                ((LocText)maxFlowLabelFI.GetValue(__instance)).text = "+Channel";
            }
        }
Beispiel #2
0
        private static void Postfix(ValveSideScreen __instance, float newValue)
        {
            ConduitType type = FluidWarpMod_Utils.GetConduitType(__instance);

            if ((type == LiquidWarpConfig.CONDUIT_TYPE || type == GasWarpConfig.CONDUIT_TYPE))
            {
                if (newValue == 10f)
                {
                    ((LocText)unitsLabelFI.GetValue(__instance)).text = FluidWarpMod_Utils.OFF_LABEL;
                }
                else
                {
                    ((LocText)unitsLabelFI.GetValue(__instance)).text = FluidWarpMod_Utils.CHANNEL_LABEL;
                }
            }
        }
Beispiel #3
0
        private static void Postfix(ValveSideScreen __instance)
        {
            Logger.LogFormat(" === FluidWarpMod_ValveSideScreen_OnSpawn Postfix === ");

            ConduitType type = FluidWarpMod_Utils.GetConduitType(__instance);

            if (type == LiquidWarpConfig.CONDUIT_TYPE || type == GasWarpConfig.CONDUIT_TYPE)
            {
                if ((float)((KNumberInputField)numberInputFI.GetValue(__instance)).currentValue == 10f)
                {
                    ((LocText)unitsLabelFI.GetValue(__instance)).text = FluidWarpMod_Utils.OFF_LABEL;
                }
                else
                {
                    ((LocText)unitsLabelFI.GetValue(__instance)).text = FluidWarpMod_Utils.CHANNEL_LABEL;
                }
            }
        }
Beispiel #4
0
        private static bool Prefix(SideScreenContent __instance, ref string __result)
        {
            Logger.LogFormat(" === FluidWarpMod_SideScreenContent_GetTitle Postfix === ");

            if (!(__instance is ValveSideScreen))
            {
                return(true);
            }

            ConduitType type = FluidWarpMod_Utils.GetConduitType((ValveSideScreen)__instance);

            if (type == LiquidWarpConfig.CONDUIT_TYPE || type == GasWarpConfig.CONDUIT_TYPE)
            {
                __result = "Channel";
                return(false);
            }
            else
            {
                return(true);
            }
        }