public override IEnumerable <Gizmo> GetGizmos() { using (IEnumerator <Gizmo> enumerator = base.GetGizmos().GetEnumerator()) { if (enumerator.MoveNext()) { Gizmo g = enumerator.Current; yield return(g); /*Error: Unable to find new state assignment for yield return*/; } } if (!base.HasMap) { yield break; } if (Find.WorldSelector.SingleSelectedObject != this) { yield break; } yield return((Gizmo)SettleInExistingMapUtility.SettleCommand(base.Map, true)); /*Error: Unable to find new state assignment for yield return*/; IL_010d: /*Error near IL_010e: Unexpected return in MoveNext()*/; }
internal void <> m__0() { SoundDefOf.Tick_High.PlayOneShotOnCamera(null); SettlementProximityGoodwillUtility.CheckConfirmSettle(this.map.Tile, delegate { SettleInExistingMapUtility.Settle(this.map); }); }
public override IEnumerable <Gizmo> GetGizmos() { foreach (Gizmo gizmo in base.GetGizmos()) { yield return(gizmo); } if (base.HasMap && Find.WorldSelector.SingleSelectedObject == this) { yield return(SettleInExistingMapUtility.SettleCommand(base.Map, requiresNoEnemies: true)); } }
public override IEnumerable <Gizmo> GetGizmos() { foreach (Gizmo g in this.< GetGizmos > __BaseCallProxy3()) { yield return(g); } if (base.HasMap && Find.WorldSelector.SingleSelectedObject == this) { yield return(SettleInExistingMapUtility.SettleCommand(base.Map, true)); } yield break; }
public static Command SettleCommand(Map map, bool requiresNoEnemies) { Command_Settle command_Settle = new Command_Settle(); command_Settle.defaultLabel = "CommandSettle".Translate(); command_Settle.defaultDesc = "CommandSettleDesc".Translate(); command_Settle.icon = SettleUtility.SettleCommandTex; command_Settle.action = delegate { SoundDefOf.Tick_High.PlayOneShotOnCamera(null); SettlementProximityGoodwillUtility.CheckConfirmSettle(map.Tile, delegate { SettleInExistingMapUtility.Settle(map); }); }; if (SettleUtility.PlayerSettlementsCountLimitReached) { if (Prefs.MaxNumberOfPlayerSettlements > 1) { command_Settle.Disable("CommandSettleFailReachedMaximumNumberOfBases".Translate()); } else { command_Settle.Disable("CommandSettleFailAlreadyHaveBase".Translate()); } } if (!command_Settle.disabled) { if (map.mapPawns.FreeColonistsCount == 0) { command_Settle.Disable("CommandSettleFailNoColonists".Translate()); } else if (requiresNoEnemies) { foreach (IAttackTarget current in map.attackTargetsCache.TargetsHostileToColony) { if (GenHostility.IsActiveThreatToPlayer(current)) { command_Settle.Disable("CommandSettleFailEnemies".Translate()); break; } } } } return(command_Settle); }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; bool flag = false; switch (num) { case 0u: enumerator = base.< GetGizmos > __BaseCallProxy0().GetEnumerator(); num = 4294967293u; break; case 1u: break; case 2u: goto IL_108; default: return(false); } try { switch (num) { } if (enumerator.MoveNext()) { g = enumerator.Current; this.$current = g; if (!this.$disposing) { this.$PC = 1; } flag = true; return(true); } } finally { if (!flag) { if (enumerator != null) { enumerator.Dispose(); } } } if (!base.HasMap || Find.WorldSelector.SingleSelectedObject != this) { goto IL_108; } this.$current = SettleInExistingMapUtility.SettleCommand(base.Map, false); if (!this.$disposing) { this.$PC = 2; } return(true); IL_108: this.$PC = -1; return(false); }
internal void <> m__1() { SettleInExistingMapUtility.Settle(this.map); }