public bool MoveNext()
            {
                uint num = (uint)this.$PC;

                this.$PC = -1;
                bool flag = false;

                switch (num)
                {
                case 0u:
                    enumerator = PawnsFinder.AllMaps_FreeColonistsSpawned.GetEnumerator();
                    num        = 4294967293u;
                    break;

                case 1u:
                    break;

                default:
                    return(false);
                }
                try
                {
                    switch (num)
                    {
                    case 1u:
IL_A7:
                        break;
                    }
                    if (enumerator.MoveNext())
                    {
                        col = enumerator.Current;
                        if (col.workSettings.WorkIsActive(WorkTypeDefOf.Hunting) && WorkGiver_HunterHunt.HasShieldAndRangedWeapon(col))
                        {
                            this.$current = col;
                            if (!this.$disposing)
                            {
                                this.$PC = 1;
                            }
                            flag = true;
                            return(true);
                        }
                        goto IL_A7;
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                this.$PC = -1;
                return(false);
            }
예제 #2
0
 public override AlertReport GetReport()
 {
     foreach (Pawn item in PawnsFinder.AllMaps_FreeColonistsSpawned)
     {
         if (item.workSettings.WorkIsActive(WorkTypeDefOf.Hunting) && !WorkGiver_HunterHunt.HasHuntingWeapon(item) && !item.Downed)
         {
             return(item);
         }
     }
     return(false);
 }
예제 #3
0
 private Pawn BadHunter()
 {
     foreach (Pawn item in PawnsFinder.AllMaps_FreeColonistsSpawned)
     {
         if (item.workSettings.WorkIsActive(WorkTypeDefOf.Hunting) && WorkGiver_HunterHunt.HasShieldAndRangedWeapon(item))
         {
             return(item);
         }
     }
     return(null);
 }
예제 #4
0
 public override bool ShouldSkip(Pawn pawn)
 {
     if (!WorkGiver_HunterHunt.HasHuntingWeapon(pawn))
     {
         return(true);
     }
     if (WorkGiver_HunterHunt.HasShieldAndRangedWeapon(pawn))
     {
         return(true);
     }
     return(false);
 }
            public bool MoveNext()
            {
                uint num = (uint)this.$PC;

                this.$PC = -1;
                bool flag = false;

                switch (num)
                {
                case 0u:
                    enumerator = PawnsFinder.AllMaps_FreeColonistsSpawned.GetEnumerator();
                    num        = 4294967293u;
                    break;

                case 1u:
                    break;

                default:
                    return(false);
                }
                try
                {
                    switch (num)
                    {
                    }
                    while (enumerator.MoveNext())
                    {
                        p = enumerator.Current;
                        if (p.workSettings.WorkIsActive(WorkTypeDefOf.Hunting) && !WorkGiver_HunterHunt.HasHuntingWeapon(p) && !p.Downed)
                        {
                            this.$current = p;
                            if (!this.$disposing)
                            {
                                this.$PC = 1;
                            }
                            flag = true;
                            return(true);
                        }
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                this.$PC = -1;
                return(false);
            }
예제 #6
0
 public override bool ShouldSkip(Pawn pawn, bool forced = false)
 {
     return(!WorkGiver_HunterHunt.HasHuntingWeapon(pawn) || WorkGiver_HunterHunt.HasShieldAndRangedWeapon(pawn));
 }