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()*/; }
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))); }
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); } }
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)); }
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)); }
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); }