Exemple #1
0
 public static Toil Drink(TargetIndex thingIndex)
 {
     return(Toils_Mizu.DrinkSomeone(thingIndex, (toil) =>
     {
         return () =>
         {
             if (!toil.actor.CurJob.GetTarget(thingIndex).HasThing)
             {
                 return null;
             }
             return toil.actor.CurJob.GetTarget(thingIndex).Thing;
         };
     }));
 }
Exemple #2
0
        public static Toil FeedToPatient(TargetIndex thingIndex, TargetIndex patientIndex)
        {
            return(Toils_Mizu.DrinkSomeone(thingIndex, (toil) =>
            {
                return () =>
                {
                    if (!toil.actor.CurJob.GetTarget(patientIndex).HasThing)
                    {
                        return null;
                    }

                    var patient = toil.actor.CurJob.GetTarget(patientIndex).Thing as Pawn;
                    if (patient == null)
                    {
                        return null;
                    }

                    return patient;
                };
            }));
        }