public static void ListenerPostfix(Pawn pawn, Thing t, bool forced, ref bool __result, WorkGiver_FeedPatient __instance)
 {
     Utils.genericPostFixExtraCrafterDoctorJobs(pawn, t, forced, ref __result, __instance);
 }
            public static bool ListenerPrefix(Pawn pawn, Thing t, bool forced, ref bool __result, WorkGiver_FeedPatient __instance)
            {
                if (!(t is Pawn pawn2) || !pawn2.IsAndroidTier())
                {
                    return(true);
                }

                var cas = pawn2.TryGetComp <CompAndroidState>();

                if (cas == null)
                {
                    return(true);
                }

                if (!cas.connectedLWPNActive || cas.connectedLWPN == null)
                {
                    return(true);
                }

                __result = false;
                return(false);
            }
Example #3
0
            public static bool ListenerPrefix(Pawn pawn, Thing t, bool forced, ref bool __result, WorkGiver_FeedPatient __instance)
            {
                //On va en plus checker si le eater est pas un android chargé sur un wireless powergrid pas de feed patients co
                Pawn pawn2 = t as Pawn;

                if (pawn2 != null && pawn2.IsAndroidTier())
                {
                    CompAndroidState cas = pawn2.TryGetComp <CompAndroidState>();
                    if (cas != null)
                    {
                        if (cas.connectedLWPNActive && cas.connectedLWPN != null)
                        {
                            __result = false;
                            return(false);
                        }
                    }
                }
                return(true);
            }