void LabourResult()
    {
        float totalResources = 0;

        actionLabel         = "";
        bool?[,] pillarsMap = new bool?[8, 8];
        for (int a = 0; a < 8; a++)
        {
            for (int b = 0; b < 8; b++)
            {
                pillarsMap[a, b] = null;
            }
        }
        int placesToWork = 64;
        List <ScalableHarvestableResource> unfinishedPillars = new List <ScalableHarvestableResource>();

        if (workObject.cellsStatus != 0)
        {
            int i = 0;
            while (i < workObject.surfaceObjects.Count)
            {
                ScalableHarvestableResource shr = workObject.surfaceObjects[i] as ScalableHarvestableResource;
                if (shr == null)
                {
                    workObject.surfaceObjects[i].Annihilate(false);
                }
                else
                {
                    if (shr.resourceCount == ScalableHarvestableResource.MAX_VOLUME)
                    {
                        placesToWork--;
                        pillarsMap[shr.innerPosition.x / 2, shr.innerPosition.z / 2] = true;
                        totalResources += ScalableHarvestableResource.MAX_VOLUME;
                    }
                    else
                    {
                        pillarsMap[shr.innerPosition.x / 2, shr.innerPosition.z / 2] = false;
                        totalResources += shr.resourceCount;
                        unfinishedPillars.Add(shr);
                    }
                }
                i++;
            }
        }

        if (placesToWork == 0)
        {
            actionLabel = Localization.GetActionLabel(LocalizationActionLabels.BlockCompleted);
            workObject.ClearSurface(false); // false так как все равно его удаляем
            workObject.myChunk.ReplaceBlock(workObject.pos, BlockType.Cube, rtype.ID, rtype.ID, false);
            StopWork();
        }
        else
        {
            int pos = (int)(placesToWork * Random.value);
            int n   = 0;
            for (int a = 0; a < 8; a++)
            {
                for (int b = 0; b < 8; b++)
                {
                    if (pillarsMap[a, b] == true)
                    {
                        continue;
                    }
                    else
                    {
                        if (n == pos)
                        {
                            ScalableHarvestableResource shr = null;
                            float count = BUILDING_SPEED * workflow;
                            if (pillarsMap[a, b] == false)
                            {
                                foreach (ScalableHarvestableResource fo in unfinishedPillars)
                                {
                                    if (fo.innerPosition.x / 2 == a & fo.innerPosition.z / 2 == b)
                                    {
                                        shr = fo;
                                        break;
                                    }
                                }
                                if (count > ScalableHarvestableResource.MAX_VOLUME - shr.resourceCount)
                                {
                                    count = ScalableHarvestableResource.MAX_VOLUME - shr.resourceCount;
                                }
                            }
                            else
                            {
                                shr = Structure.GetStructureByID(Structure.RESOURCE_STICK_ID) as ScalableHarvestableResource;
                                shr.SetBasement(workObject, new PixelPosByte(a * 2, b * 2));
                            }
                            count = GameMaster.colonyController.storage.GetResources(rtype, count);
                            if (count == 0)
                            {
                                // if (showOnGUI) actionLabel = Localization.GetAnnouncementString(GameAnnouncements.NotEnoughResources);
                            }
                            else
                            {
                                totalResources += count;
                                shr.AddResource(rtype, count);
                            }
                            actionLabel += string.Format("{0:0.##}", totalResources / (float)CubeBlock.MAX_VOLUME * 100f) + '%';
                            return;
                        }
                        else
                        {
                            n++;
                        }
                    }
                }
            }
        }
    }
    override protected void LabourResult(int iterations)
    {
        if (iterations < 1)
        {
            return;
        }
        workflow   -= iterations;
        actionLabel = "";
        int length = PlaneExtension.INNER_RESOLUTION / ScalableHarvestableResource.RESOURCE_STICK_RECT_SIZE;

        bool?[,] pillarsMap = new bool?[length, length]; // true - full pillar, false - unfinished, null - no pillar
        for (int a = 0; a < length; a++)
        {
            for (int b = 0; b < length; b++)
            {
                pillarsMap[a, b] = null;
            }
        }
        int maxPillarsCount = length * length;
        int emptyPositions  = maxPillarsCount;

        int finishedPillarsCount = 0, totalResourcesCount = 0, deletedStructures = 0;
        var unfinishedPillarsList       = new List <ScalableHarvestableResource>();
        ScalableHarvestableResource shr = null;
        PlaneExtension pe = workplace.FORCED_GetExtension(); // создаем запросом, так как все равно понадобится

        while (iterations > 0)
        {
            iterations--;
            if (pe.fulfillStatus != FullfillStatus.Empty)
            { // на поверхности есть какие-то структуры
                byte maxVolume = ScalableHarvestableResource.MAX_STICK_VOLUME;
                int  i         = 0;
                var  strs      = pe.GetStructuresList();

                while (i < strs.Count)
                {
                    shr = strs[i] as ScalableHarvestableResource;
                    if (shr != null)
                    {
                        if (shr.mainResource != rtype)
                        {
                            shr.Harvest();
                        }
                        else
                        {
                            if (shr.resourceCount == maxVolume)
                            {
                                finishedPillarsCount++;
                                pillarsMap[shr.surfaceRect.x / ScalableHarvestableResource.RESOURCE_STICK_RECT_SIZE, shr.surfaceRect.z / ScalableHarvestableResource.RESOURCE_STICK_RECT_SIZE] = true;
                            }
                            else
                            {
                                unfinishedPillarsList.Add(shr);
                                pillarsMap[shr.surfaceRect.x / ScalableHarvestableResource.RESOURCE_STICK_RECT_SIZE, shr.surfaceRect.z / ScalableHarvestableResource.RESOURCE_STICK_RECT_SIZE] = false;
                                totalResourcesCount += shr.resourceCount;
                            }
                        }
                    }
                    else
                    {
                        Structure s = strs[i];
                        if (s.isArtificial)
                        {
                            s.Annihilate(StructureAnnihilationOrder.GrindedByWorksite);
                            return;
                        }
                        else
                        {
                            if (s.ID == Structure.PLANT_ID)
                            {
                                (s as Plant).Harvest(false);
                            }
                            else
                            {
                                s.Annihilate(StructureAnnihilationOrder.GrindedByWorksite);
                            }
                            deletedStructures++;
                            if (deletedStructures >= 4)
                            {
                                break;                         // не больше 4-х удалений за тик
                            }
                        }
                    }
                    i++;
                }
            }
            shr = null;

            if (finishedPillarsCount == maxPillarsCount)
            {
                if (iterations == 0)
                {
                    actionLabel = Localization.GetActionLabel(LocalizationActionLabels.BlockCompleted);
                }
                var cpos = workplace.pos;
                switch (workplace.faceIndex)
                {
                case Block.FWD_FACE_INDEX: cpos = new ChunkPos(cpos.x, cpos.y, cpos.z + 1); break;

                case Block.RIGHT_FACE_INDEX: cpos = new ChunkPos(cpos.x + 1, cpos.y, cpos.z); break;

                case Block.BACK_FACE_INDEX: cpos = new ChunkPos(cpos.x, cpos.y, cpos.z - 1); break;

                case Block.LEFT_FACE_INDEX: cpos = new ChunkPos(cpos.x - 1, cpos.y, cpos.z); break;

                case Block.UP_FACE_INDEX: cpos = new ChunkPos(cpos.x, cpos.y + 1, cpos.z); break;

                case Block.DOWN_FACE_INDEX: cpos = new ChunkPos(cpos.x, cpos.y - 1, cpos.z); break;
                }
                workplace.myChunk.AddBlock(cpos, rtype.ID, false, true);
                pe.ClearSurface(PlaneAnnihilationOrder.BlockbuildingPartsReplacement);
                StopWork(true);
                return;
            }
            else
            {
                totalResourcesCount += finishedPillarsCount * ScalableHarvestableResource.MAX_STICK_VOLUME;
                int   unfinishedCount     = unfinishedPillarsList.Count;
                byte  resourceNeeded      = ScalableHarvestableResource.RESOURCES_PER_LEVEL;
                float resourceTaken       = colony.storage.GetResources(rtype, resourceNeeded);
                bool  newContainerCreated = false;

                if (unfinishedCount + finishedPillarsCount < maxPillarsCount)
                {
                    if (Random.value > 0.5f && resourceTaken == resourceNeeded) // creating new container
                    {
                        var emptyPositionsIndexes = new List <int>();
                        for (int x = 0; x < length; x++)
                        {
                            for (int z = 0; z < length; z++)
                            {
                                if (pillarsMap[x, z] == null)
                                {
                                    emptyPositionsIndexes.Add(x * length + z);
                                }
                            }
                        }
                        int epcount = emptyPositionsIndexes.Count;
                        if (epcount > 0)
                        {
                            int combinedIndex = emptyPositionsIndexes[Random.Range(0, epcount)];
                            ScalableHarvestableResource.Create(rtype, resourceNeeded, workplace,
                                                               new PixelPosByte(
                                                                   (combinedIndex / length) * ScalableHarvestableResource.RESOURCE_STICK_RECT_SIZE,
                                                                   (combinedIndex % length) * ScalableHarvestableResource.RESOURCE_STICK_RECT_SIZE)
                                                               );
                            newContainerCreated = true;
                        }
                        emptyPositionsIndexes = null;
                    }
                }
                // докидываем в существующий
                if (unfinishedCount > 0)
                {
                    if (newContainerCreated)
                    {
                        resourceTaken = colony.storage.GetResources(rtype, resourceNeeded);
                    }
                    if (resourceTaken > 1)
                    {
                        shr           = unfinishedPillarsList[Random.Range(0, unfinishedCount)];
                        resourceTaken = shr.AddResource(rtype, resourceTaken);
                        if (resourceTaken > 0)
                        {
                            colony.storage.AddResource(rtype, resourceTaken);
                        }
                    }
                    else
                    {
                        if (showOnGUI && iterations == 0)
                        {
                            actionLabel = Localization.GetAnnouncementString(GameAnnouncements.NotEnoughResources);
                        }
                    }
                }
            }
        }
    }