private static void OpenShipInfo(GenericShip ship) { if (RuleSet.Instance.IsSquadBuilderLocked) { Messages.ShowError("This part of squad builder is disabled"); return; } CurrentSquadBuilderShip = CurrentSquadList.GetShips().Find(n => n.Instance == ship); MainMenu.CurrentMainMenu.ChangePanel("ShipSlotsPanel"); }
private static bool ValidateUpgradePostChecks(PlayerNo playerNo) { bool result = true; SquadList squadList = GetSquadList(playerNo); foreach (var shipHolder in squadList.GetShips()) { foreach (var upgradeHolder in shipHolder.Instance.UpgradeBar.GetUpgradesAll()) { if (!upgradeHolder.IsAllowedForSquadBuilderPostCheck(squadList)) { return(false); } } } return(result); }
private static bool ValidateShipAiReady(PlayerNo playerNo) { bool result = true; SquadList aiSquadlist = GetSquadList(playerNo); if (aiSquadlist.PlayerType == typeof(HotacAiPlayer)) { foreach (var shipConfig in aiSquadlist.GetShips()) { if (shipConfig.Instance.HotacManeuverTable == null) { Messages.ShowError("AI for " + shipConfig.Instance.Type + " is not ready. It can be controlled only by human."); return(false); } } } return(result); }
private static void OpenShipInfo(GenericShip ship) { CurrentSquadBuilderShip = CurrentSquadList.GetShips().Find(n => n.Instance == ship); MainMenu.CurrentMainMenu.ChangePanel("ShipSlotsPanel"); }