Ejemplo n.º 1
0
        public bool CanAddToBuildQueue(ProductionButtonType buttonType)
        {
            if (UnderConstruction)
            {
                return(false);
            }

            // total build queue count including scheduled commands
            int queueCount = BuildQueue.Count + Player.Me.CountScheduledStructureCommands(this);

            return(queueCount < MAX_QUEUE_SIZE);
        }
Ejemplo n.º 2
0
        public void AddToBuildQueue(ProductionButtonType buttonType, short id)
        {
            BuildQueue.Add(new BuildQueueItem(buttonType, id, buttonType.BuildTime));

            if (BuildQueue.Count == 1)
            {
                BuildUnitButtonType unitButtonType = BuildQueue[0].Type as BuildUnitButtonType;
                if (unitButtonType != null)
                {
                    if (Player.Players[Team].CurrentSupply + unitButtonType.UnitType.SupplyCost <= Player.Players[Team].MaxSupply)
                    {
                        Player.Players[Team].CurrentSupply += unitButtonType.UnitType.SupplyCost;
                        BuildQueue[0].Started = true;
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public BuildQueueItem(ProductionButtonType commandType, short id, int buildTime)
 {
     Type = commandType;
     ID = id;
     BuildTime = buildTime;
 }
Ejemplo n.º 4
0
        public bool CanAddToBuildQueue(ProductionButtonType buttonType)
        {
            if (UnderConstruction)
                return false;

            // total build queue count including scheduled commands
            int queueCount = BuildQueue.Count + Player.Me.CountScheduledStructureCommands(this);

            if (queueCount < MAX_QUEUE_SIZE)
            {
                /*if (queueCount == 1)
                {
                    BuildUnitButtonType unitButtonType = BuildQueue[0].Type as BuildUnitButtonType;
                    if (unitButtonType != null)
                    {
                        //Player.Players[Team].CurrentSupply += unitButtonType.UnitType.SupplyCost;
                        if (Player.Players[Team].CurrentSupply + unitButtonType.UnitType.SupplyCost <= Player.Players[Team].MaxSupply)
                        {
                        }
                    }
                }*/

                return true;
            }

            return false;
        }
Ejemplo n.º 5
0
        public void AddToBuildQueue(ProductionButtonType buttonType, short id)
        {
            BuildQueue.Add(new BuildQueueItem(buttonType, id, buttonType.BuildTime));

                if (BuildQueue.Count == 1)
                {
                    BuildUnitButtonType unitButtonType = BuildQueue[0].Type as BuildUnitButtonType;
                    if (unitButtonType != null)
                    {
                        if (Player.Players[Team].CurrentSupply + unitButtonType.UnitType.SupplyCost <= Player.Players[Team].MaxSupply)
                        {
                            Player.Players[Team].CurrentSupply += unitButtonType.UnitType.SupplyCost;
                            BuildQueue[0].Started = true;
                        }
                    }
                }
        }
Ejemplo n.º 6
0
 public BuildQueueItem(ProductionButtonType commandType, short id, int buildTime)
 {
     Type      = commandType;
     ID        = id;
     BuildTime = buildTime;
 }