コード例 #1
0
        private IEnumerable <Building_AncientCryptosleepCasket> UnopenedCasketsInGroup()
        {
            yield return(this);

            if (groupID != -1)
            {
                foreach (Thing item in base.Map.listerThings.ThingsOfDef(ThingDefOf.AncientCryptosleepCasket))
                {
                    Building_AncientCryptosleepCasket building_AncientCryptosleepCasket = item as Building_AncientCryptosleepCasket;
                    if (building_AncientCryptosleepCasket.groupID == groupID && !building_AncientCryptosleepCasket.contentsKnown)
                    {
                        yield return(building_AncientCryptosleepCasket);
                    }
                }
            }
        }
        private IEnumerable <Building_AncientCryptosleepCasket> UnopenedCasketsInGroup()
        {
            yield return(this);

            if (this.groupID != -1)
            {
                foreach (Thing t in base.Map.listerThings.ThingsOfDef(ThingDefOf.AncientCryptosleepCasket))
                {
                    Building_AncientCryptosleepCasket casket = t as Building_AncientCryptosleepCasket;
                    if (casket.groupID == this.groupID && !casket.contentsKnown)
                    {
                        yield return(casket);
                    }
                }
            }
            yield break;
        }
            public bool MoveNext()
            {
                uint num = (uint)this.$PC;

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

                switch (num)
                {
                case 0u:
                    this.$current = this;
                    if (!this.$disposing)
                    {
                        this.$PC = 1;
                    }
                    return(true);

                case 1u:
                    if (this.groupID == -1)
                    {
                        goto IL_131;
                    }
                    enumerator = base.Map.listerThings.ThingsOfDef(ThingDefOf.AncientCryptosleepCasket).GetEnumerator();
                    num        = 4294967293u;
                    break;

                case 2u:
                    break;

                default:
                    return(false);
                }
                try
                {
                    switch (num)
                    {
                    case 2u:
IL_104:
                        break;
                    }
                    if (enumerator.MoveNext())
                    {
                        t      = enumerator.Current;
                        casket = (t as Building_AncientCryptosleepCasket);
                        if (casket.groupID == this.groupID && !casket.contentsKnown)
                        {
                            this.$current = casket;
                            if (!this.$disposing)
                            {
                                this.$PC = 2;
                            }
                            flag = true;
                            return(true);
                        }
                        goto IL_104;
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        ((IDisposable)enumerator).Dispose();
                    }
                }
IL_131:
                this.$PC = -1;
                return(false);
            }
 private static IEnumerable <Thing> < EjectContents > m__0(Building_AncientCryptosleepCasket c)
 {
     return(c.innerContainer);
 }