Esempio n. 1
0
        public IEnumerable <Thing> ColonyThingsWillingToBuy(Pawn playerNegotiator)
        {
            using (IEnumerator <Thing> enumerator = TradeUtility.AllLaunchableThings(base.Map).GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    Thing t = enumerator.Current;
                    yield return(t);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            using (IEnumerator <Pawn> enumerator2 = TradeUtility.AllSellableColonyPawns(base.Map).GetEnumerator())
            {
                if (enumerator2.MoveNext())
                {
                    Pawn p = enumerator2.Current;
                    yield return((Thing)p);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            yield break;
IL_0154:
            /*Error near IL_0155: Unexpected return in MoveNext()*/;
        }
Esempio n. 2
0
        public IEnumerable <Thing> ColonyThingsWillingToBuy(Pawn playerNegotiator)
        {
            IEnumerable <Thing> items = from x in pawn.Map.listerThings.AllThings
                                        where x.def.category == ThingCategory.Item && TradeUtility.PlayerSellableNow(x) && !x.Position.Fogged(x.Map) && (((_003CColonyThingsWillingToBuy_003Ec__Iterator1) /*Error near IL_0042: stateMachine*/)._0024this.pawn.Map.areaManager.Home[x.Position] || x.IsInAnyStorage()) && ((_003CColonyThingsWillingToBuy_003Ec__Iterator1) /*Error near IL_0042: stateMachine*/)._0024this.ReachableForTrade(x)
                                        select x;

            using (IEnumerator <Thing> enumerator = items.GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    Thing t = enumerator.Current;
                    yield return(t);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            if (pawn.GetLord() != null)
            {
                using (IEnumerator <Pawn> enumerator2 = (from x in TradeUtility.AllSellableColonyPawns(pawn.Map)
                                                         where !x.Downed && ((_003CColonyThingsWillingToBuy_003Ec__Iterator1) /*Error near IL_011d: stateMachine*/)._0024this.ReachableForTrade(x)
                                                         select x).GetEnumerator())
                {
                    if (enumerator2.MoveNext())
                    {
                        Pawn p = enumerator2.Current;
                        yield return((Thing)p);

                        /*Error: Unable to find new state assignment for yield return*/;
                    }
                }
            }
            yield break;
IL_01b8:
            /*Error near IL_01b9: Unexpected return in MoveNext()*/;
        }
Esempio n. 3
0
 public IEnumerable <Thing> ColonyThingsWillingToBuy(Pawn playerNegotiator)
 {
     foreach (Thing t in TradeUtility.AllLaunchableThings(base.Map))
     {
         yield return(t);
     }
     foreach (Pawn p in TradeUtility.AllSellableColonyPawns(base.Map))
     {
         yield return(p);
     }
 }
Esempio n. 4
0
 public IEnumerable <Thing> ColonyThingsWillingToBuy(Pawn playerNegotiator)
 {
     foreach (Thing item in TradeUtility.AllLaunchableThingsForTrade(base.Map, this))
     {
         yield return(item);
     }
     foreach (Pawn item2 in TradeUtility.AllSellableColonyPawns(base.Map))
     {
         yield return(item2);
     }
 }
Esempio n. 5
0
        public IEnumerable <Thing> ColonyThingsWillingToBuy(Pawn playerNegotiator)
        {
            IEnumerable <Thing> enumerable = pawn.Map.listerThings.AllThings.Where((Thing x) => x.def.category == ThingCategory.Item && TradeUtility.PlayerSellableNow(x, pawn) && !x.Position.Fogged(x.Map) && (pawn.Map.areaManager.Home[x.Position] || x.IsInAnyStorage()) && ReachableForTrade(x));

            foreach (Thing item in enumerable)
            {
                yield return(item);
            }
            if (pawn.GetLord() != null)
            {
                foreach (Pawn item2 in from x in TradeUtility.AllSellableColonyPawns(pawn.Map)
                         where !x.Downed && ReachableForTrade(x)
                         select x)
                {
                    yield return(item2);
                }
            }
        }
Esempio n. 6
0
        public IEnumerable <Thing> ColonyThingsWillingToBuy(Pawn playerNegotiator)
        {
            IEnumerable <Thing> items = from x in this.pawn.Map.listerThings.AllThings
                                        where TradeUtility.EverTradeable(x.def) && x.def.category == ThingCategory.Item && !x.Position.Fogged(x.Map) && (this.$this.pawn.Map.areaManager.Home[x.Position] || x.IsInAnyStorage()) && TradeUtility.TradeableNow(x) && this.$this.ReachableForTrade(x)
                                        select x;

            foreach (Thing t in items)
            {
                yield return(t);
            }
            bool hasLord = this.pawn.GetLord() != null;

            if (hasLord)
            {
                foreach (Pawn p in from x in TradeUtility.AllSellableColonyPawns(this.pawn.Map)
                         where !x.Downed && this.$this.ReachableForTrade(x)
                         select x)
                {
                    yield return(p);
                }
            }
        }