public override IEnumerable <IncidentTargetTagDef> IncidentTargetTags() { using (IEnumerator <IncidentTargetTagDef> enumerator = base.IncidentTargetTags().GetEnumerator()) { if (enumerator.MoveNext()) { IncidentTargetTagDef type2 = enumerator.Current; yield return(type2); /*Error: Unable to find new state assignment for yield return*/; } } if (hibernatableIncidentTargets != null && hibernatableIncidentTargets.Count > 0) { using (HashSet <IncidentTargetTagDef> .Enumerator enumerator2 = hibernatableIncidentTargets.GetEnumerator()) { if (enumerator2.MoveNext()) { IncidentTargetTagDef type = enumerator2.Current; yield return(type); /*Error: Unable to find new state assignment for yield return*/; } } } yield break; IL_016b: /*Error near IL_016c: Unexpected return in MoveNext()*/; }
public virtual IEnumerable <IncidentTargetTagDef> IncidentTargetTags() { if (def.IncidentTargetTags != null) { using (List <IncidentTargetTagDef> .Enumerator enumerator = def.IncidentTargetTags.GetEnumerator()) { if (enumerator.MoveNext()) { IncidentTargetTagDef type2 = enumerator.Current; yield return(type2); /*Error: Unable to find new state assignment for yield return*/; } } } for (int i = 0; i < comps.Count; i++) { using (IEnumerator <IncidentTargetTagDef> enumerator2 = comps[i].IncidentTargetTags().GetEnumerator()) { if (enumerator2.MoveNext()) { IncidentTargetTagDef type = enumerator2.Current; yield return(type); /*Error: Unable to find new state assignment for yield return*/; } } } yield break; IL_01a4: /*Error near IL_01a5: Unexpected return in MoveNext()*/; }
public IEnumerable <IncidentDef> GetAllIncidentDefs() { IncidentTargetTagDef targetDef = GetTargetTag(); if (targetDef == null) { return(Enumerable.Empty <IncidentDef>()); } return(DefDatabase <IncidentDef> .AllDefs.Where(e => e.TargetTagAllowed(targetDef))); }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; switch (num) { case 0u: this.$current = IncidentTargetTagDefOf.World; if (!this.$disposing) { this.$PC = 1; } return(true); case 1u: this.$PC = -1; break; } return(false); }
public override IEnumerable <IncidentTargetTagDef> IncidentTargetTags() { using (IEnumerator <IncidentTargetTagDef> enumerator = base.IncidentTargetTags().GetEnumerator()) { if (enumerator.MoveNext()) { IncidentTargetTagDef type = enumerator.Current; yield return(type); /*Error: Unable to find new state assignment for yield return*/; } } if (base.Faction != Faction.OfPlayer) { yield return(IncidentTargetTagDefOf.Map_Misc); /*Error: Unable to find new state assignment for yield return*/; } yield return(IncidentTargetTagDefOf.Map_PlayerHome); /*Error: Unable to find new state assignment for yield return*/; IL_0119: /*Error near IL_011a: Unexpected return in MoveNext()*/; }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; bool flag = false; switch (num) { case 0u: enumerator = base.< IncidentTargetTags > __BaseCallProxy0().GetEnumerator(); num = 4294967293u; break; case 1u: break; case 2u: goto IL_110; case 3u: goto IL_110; default: return(false); } try { switch (num) { } if (enumerator.MoveNext()) { type = enumerator.Current; this.$current = type; if (!this.$disposing) { this.$PC = 1; } flag = true; return(true); } } finally { if (!flag) { if (enumerator != null) { enumerator.Dispose(); } } } if (base.Faction == Faction.OfPlayer) { this.$current = IncidentTargetTagDefOf.Map_PlayerHome; if (!this.$disposing) { this.$PC = 2; } } else { this.$current = IncidentTargetTagDefOf.Map_Misc; if (!this.$disposing) { this.$PC = 3; } } return(true); IL_110: this.$PC = -1; return(false); }