public override IEnumerable <Gizmo> GetCaravanGizmos(Caravan caravan) { if (this.CanTradeNow && CaravanVisitUtility.SettlementVisitedNow(caravan) == this) { yield return(CaravanVisitUtility.TradeCommand(caravan)); } if (CaravanArrivalAction_OfferGifts.CanOfferGiftsTo(caravan, this)) { yield return(FactionGiftUtility.OfferGiftsCommand(caravan, this)); } foreach (Gizmo g in base.GetCaravanGizmos(caravan)) { yield return(g); } if (this.Attackable) { yield return(new Command_Action { icon = SettlementBase.AttackCommand, defaultLabel = "CommandAttackSettlement".Translate(), defaultDesc = "CommandAttackSettlementDesc".Translate(), action = delegate { SettlementUtility.Attack(caravan, this.$this); } }); } }
public override IEnumerable <Gizmo> GetCaravanGizmos(Caravan caravan) { if (CanTradeNow && CaravanVisitUtility.SettlementVisitedNow(caravan) == this) { yield return(CaravanVisitUtility.TradeCommand(caravan, base.Faction, TraderKind)); } if ((bool)CaravanArrivalAction_OfferGifts.CanOfferGiftsTo(caravan, this)) { yield return(FactionGiftUtility.OfferGiftsCommand(caravan, this)); } foreach (Gizmo caravanGizmo in base.GetCaravanGizmos(caravan)) { yield return(caravanGizmo); } if (Attackable) { Command_Action command_Action = new Command_Action(); command_Action.icon = AttackCommand; command_Action.defaultLabel = "CommandAttackSettlement".Translate(); command_Action.defaultDesc = "CommandAttackSettlementDesc".Translate(); command_Action.action = delegate { SettlementUtility.Attack(caravan, this); }; yield return(command_Action); } }
public override IEnumerable <Gizmo> GetCaravanGizmos(Caravan caravan) { if (this.CanTradeNow) { yield return(CaravanVisitUtility.TradeCommand(caravan)); } if (base.GetComponent <CaravanRequestComp>() != null && base.GetComponent <CaravanRequestComp>().ActiveRequest) { yield return(CaravanVisitUtility.FulfillRequestCommand(caravan)); } }
public override IEnumerable <Gizmo> GetCaravanGizmos(Caravan caravan) { _003CGetCaravanGizmos_003Ec__Iterator1 _003CGetCaravanGizmos_003Ec__Iterator = (_003CGetCaravanGizmos_003Ec__Iterator1) /*Error near IL_0040: stateMachine*/; if (CanTradeNow && CaravanVisitUtility.SettlementVisitedNow(caravan) == this) { yield return((Gizmo)CaravanVisitUtility.TradeCommand(caravan)); /*Error: Unable to find new state assignment for yield return*/; } if ((bool)CaravanArrivalAction_OfferGifts.CanOfferGiftsTo(caravan, this)) { yield return((Gizmo)FactionGiftUtility.OfferGiftsCommand(caravan, this)); /*Error: Unable to find new state assignment for yield return*/; } using (IEnumerator <Gizmo> enumerator = base.GetCaravanGizmos(caravan).GetEnumerator()) { if (enumerator.MoveNext()) { Gizmo g = enumerator.Current; yield return(g); /*Error: Unable to find new state assignment for yield return*/; } } if (Attackable) { yield return((Gizmo) new Command_Action { icon = AttackCommand, defaultLabel = "CommandAttackSettlement".Translate(), defaultDesc = "CommandAttackSettlementDesc".Translate(), action = delegate { SettlementUtility.Attack(caravan, _003CGetCaravanGizmos_003Ec__Iterator._0024this); } }); /*Error: Unable to find new state assignment for yield return*/; } yield break; IL_022e: /*Error near IL_022f: Unexpected return in MoveNext()*/; }
public override IEnumerable <Gizmo> GetCaravanGizmos(Caravan caravan) { if (this.CanTradeNow) { yield return((Gizmo)CaravanVisitUtility.TradeCommand(caravan)); /*Error: Unable to find new state assignment for yield return*/; } if (base.GetComponent <CaravanRequestComp>() == null) { yield break; } if (!base.GetComponent <CaravanRequestComp>().ActiveRequest) { yield break; } yield return((Gizmo)CaravanVisitUtility.FulfillRequestCommand(caravan)); /*Error: Unable to find new state assignment for yield return*/; }