mannyzhou5 / evolutionchamber

Automatically exported from code.google.com/p/evolutionchamber
0 stars 0 forks source link

Workers mining gas before the associated hatchery had completed #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Fixed a minor issue where a workers could start mining from an extractor before 
the associated hatchery had completed building.

Original issue reported on code.google.com by nafets...@gmail.com on 16 Nov 2010 at 1:07

Attachments:

GoogleCodeExporter commented 9 years ago
In EcActionMineGas.java, the patch replaces this:

    @Override
    public boolean isPossible(EcBuildOrder s)
    {
        if ((s.dronesOnGas+s.dronesGoingOnGas) >= 3*s.gasExtractors)
            return false;
        if (s.dronesOnMinerals == 0)
            return false;
        return true;
    }

with this:

    @Override
    public boolean isPossible(EcBuildOrder s)
    {
        if ((s.dronesOnGas + s.dronesGoingOnGas) >= 3 * (s.gasExtractors - 2 * s.hatcheriesBuilding))
            return false;
        if (s.dronesOnMinerals == 0 || s.settings.pullThreeWorkersOnly && s.dronesOnMinerals < 3)
            return false;
        return true;
    }

This looks like a good change to me.

Original comment by mike.angstadt on 16 Nov 2010 at 10:11

GoogleCodeExporter commented 9 years ago
Fixed / Commited in r189

Original comment by nafets...@gmail.com on 5 Dec 2010 at 5:32