internal void <> m__0() { SoundDefOf.Tick_High.PlayOneShotOnCamera(null); SettlementProximityGoodwillUtility.CheckConfirmSettle(this.map.Tile, delegate { SettleInExistingMapUtility.Settle(this.map); }); }
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); }
internal void <> m__1() { SettleInExistingMapUtility.Settle(this.map); }