Esempio n. 1
0
        // Token: 0x06000085 RID: 133 RVA: 0x00004F68 File Offset: 0x00003168
        public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            Thing  f      = null;
            JobDef useDef = null;

            if (AQUtility.AddOrRemove(t, out bool Add, out ThingDef fAddDef, out bool Remove))
            {
                if (Add)
                {
                    f = AQUtility.GetClosestFishInBag(pawn, fAddDef, t);
                    if (f != null)
                    {
                        useDef = DefDatabase <JobDef> .GetNamed("AQManagingAdd", false);
                    }
                }
                else if (Remove)
                {
                    useDef = DefDatabase <JobDef> .GetNamed("AQManagingRemove", false);
                }
            }
            Job newJob = null;

            if (useDef != null)
            {
                newJob = new Job(useDef, t, f);
            }
            return(newJob);
        }
Esempio n. 2
0
 // Token: 0x06000084 RID: 132 RVA: 0x00004F20 File Offset: 0x00003120
 public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false)
 {
     return(pawn.CanReserveAndReach(t, PathEndMode.Touch, Danger.None, 1, -1, null, false) && AQUtility.AddOrRemove(t, out bool Add, out ThingDef fdef, out bool Remove) && ((Add && AQUtility.GetClosestFishInBag(pawn, fdef, t) != null) || Remove));
 }