Пример #1
0
        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");
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
 private static void OpenShipInfo(GenericShip ship)
 {
     CurrentSquadBuilderShip = CurrentSquadList.GetShips().Find(n => n.Instance == ship);
     MainMenu.CurrentMainMenu.ChangePanel("ShipSlotsPanel");
 }