Beispiel #1
0
        public IEnumerable <Thing> ColonyThingsWillingToBuy(Pawn playerNegotiator)
        {
            using (IEnumerator <Thing> enumerator = TradeUtility.AllLaunchableThingsForTrade(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()*/;
        }
Beispiel #2
0
 public static Map PlayerHomeMapWithMostLaunchableSilver()
 {
     return((from x in Find.Maps
             where x.IsPlayerHome
             select x).MaxBy((Map x) => (from t in TradeUtility.AllLaunchableThingsForTrade(x)
                                         where t.def == ThingDefOf.Silver
                                         select t).Sum((Thing t) => t.stackCount)));
 }
Beispiel #3
0
 public IEnumerable <Thing> ColonyThingsWillingToBuy(Pawn playerNegotiator)
 {
     foreach (Thing t in TradeUtility.AllLaunchableThingsForTrade(base.Map))
     {
         yield return(t);
     }
     foreach (Pawn p in TradeUtility.AllSellableColonyPawns(base.Map))
     {
         yield return(p);
     }
 }
Beispiel #4
0
 private static int AmountSendableSilver(Map map)
 {
     return((from t in TradeUtility.AllLaunchableThingsForTrade(map)
             where t.def == ThingDefOf.Silver
             select t).Sum((Thing t) => t.stackCount));
 }
Beispiel #5
0
 private static int <PlayerHomeMapWithMostLaunchableSilver> m__1(Map x)
 {
     return((from t in TradeUtility.AllLaunchableThingsForTrade(x)
             where t.def == ThingDefOf.Silver
             select t).Sum((Thing t) => t.stackCount));
 }
Beispiel #6
0
 public static bool ColonyHasEnoughSilver(Map map, int fee)
 {
     return((from t in TradeUtility.AllLaunchableThingsForTrade(map)
             where t.def == ThingDefOf.Silver
             select t).Sum((Thing t) => t.stackCount) >= fee);
 }