예제 #1
0
        private static void Postfix(ValveSideScreen __instance)
        {
            Debug.Log(" === FluidWarpMod_ValveSideScreen_OnSpawn Postfix === ");

            FieldInfo   fi0  = AccessTools.Field(typeof(ValveSideScreen), "unitsLabel");
            ConduitType type = FluidWarpMod_Utils.GetConduitType(__instance);

            if (type == (ConduitType)100 || type == (ConduitType)101)
            {
                ((LocText)fi0.GetValue(__instance)).text = "Ch.";
            }
        }
예제 #2
0
        private static void Postfix(ValveSideScreen __instance)
        {
            Debug.Log(" === FluidWarpMod_ValveSideScreen_SetTarget Postfix === ");

            FieldInfo fi3 = AccessTools.Field(typeof(ValveSideScreen), "minFlowLabel");
            FieldInfo fi4 = AccessTools.Field(typeof(ValveSideScreen), "maxFlowLabel");

            ConduitType type = FluidWarpMod_Utils.GetConduitType(__instance);

            if (type == (ConduitType)100 || type == (ConduitType)101)
            {
                ((LocText)fi3.GetValue(__instance)).text = "Ch.";
                ((LocText)fi4.GetValue(__instance)).text = "Ch.";
            }
        }
예제 #3
0
        private static bool Prefix(ValveSideScreen __instance, ref string __result)
        {
            Debug.Log(" === FluidWarpMod_ValveSideScreen_GetTitle Postfix === ");

            ConduitType type = FluidWarpMod_Utils.GetConduitType(__instance);

            if (type == (ConduitType)100 || type == (ConduitType)101)
            {
                __result = "Channel";
                return(false);
            }
            else
            {
                return(true);
            }
        }