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

            if (FluidWarpMod_Utils.IsWarpGate(valveBase))
            {
                ((LocText)minFlowLabelFI.GetValue(__instance)).text = "-Channel";
                ((LocText)maxFlowLabelFI.GetValue(__instance)).text = "+Channel";
            }
        }
Beispiel #2
0
 private static void Postfix(ValveSideScreen __instance, float newValue)
 {
     if (FluidWarpMod_Utils.IsWarpGate(FluidWarpMod_Utils.GetValveBaseFromScreen(__instance)))
     {
         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 === ");

            if (FluidWarpMod_Utils.IsWarpGate(FluidWarpMod_Utils.GetValveBaseFromScreen(__instance)))
            {
                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);
            }

            if (FluidWarpMod_Utils.IsWarpGate(FluidWarpMod_Utils.GetValveBaseFromScreen((ValveSideScreen)__instance)))
            {
                __result = "Channel";
                return(false);
            }
            else
            {
                return(true);
            }
        }