public void Delete(BlockAnnihilationOrder order)
 {
     if (destroyed)
     {
         return;
     }
     else
     {
         destroyed = true;
     }
     PrepareWorkbuildingForDestruction(order.GetStructureOrder());
     if (subscribedToUpdate)
     {
         GameMaster.realMaster.labourUpdateEvent -= LabourUpdate;
         subscribedToUpdate = false;
     }
     if (planes != null)
     {
         PlaneAnnihilationOrder pao = order.GetPlaneOrder();
         foreach (var p in planes)
         {
             p.Value.Annihilate(pao);
         }
     }
     Destroy(gameObject);
 }
示例#2
0
    public void Delete(BlockAnnihilationOrder order)
    {
        if (destroyed)
        {
            return;
        }
        else
        {
            destroyed = true;
        }
        var so = order.GetStructureOrder();

        PrepareBuildingForDestruction(so);
        if (so.doSpecialChecks)
        {
            GameMaster.realMaster.colonyController.storage.RemoveWarehouse(this);
        }
        //
        if (planes != null)
        {
            var po = order.GetPlaneOrder();
            foreach (var p in planes)
            {
                p.Value.Annihilate(po);
            }
        }
        //
        Destroy(gameObject);
    }
示例#3
0
 /// <summary>
 /// Don not use directly, use chunk.DeleteBlock() instead
 /// </summary>
 public void Annihilate(BlockAnnihilationOrder order)
 {
     //#block annihilate
     if (destroyed | GameMaster.sceneClearing)
     {
         return;
     }
     else
     {
         destroyed = true;
     }
     extension?.Annihilate(order);
     if (mainStructure != null)
     {
         if (mainStructureIsABlocker)
         {
             if (!order.chunkClearing)
             {
                 mainStructure.SectionDeleted(pos);
             }
         }
         else
         {
             mainStructure.Annihilate(StructureAnnihilationOrder.ChunkClearing);
         }
         mainStructure = null;
     }
 }
示例#4
0
 public void Delete(BlockAnnihilationOrder order)
 {
     if (!destroyed)
     {
         Annihilate(order);
     }
 }
示例#5
0
    public void Delete(BlockAnnihilationOrder bo)
    {
        if (destroyed)
        {
            return;
        }
        else
        {
            destroyed = true;
        }
        if (subscribedToUpdate)
        {
            GameMaster.realMaster.everydayUpdate -= EverydayUpdate;
            subscribedToUpdate = false;
        }
        var so = bo.GetStructureOrder();

        if (so.doSpecialChecks)
        {
            hotels.Remove(this);
        }
        PrepareBuildingForDestruction(so);
        if (so.doSpecialChecks && lodgersCount > 0)
        {
            DistributeLodgers(lodgersCount);
        }
        basement = null;
        Destroy(gameObject);
    }
    } // no multimaterial planes

    public void Delete(BlockAnnihilationOrder order)
    {
        if (destroyed)
        {
            return;
        }
        else
        {
            destroyed = true;
        }
        PrepareStructureForDestruction(order.GetStructureOrder());
        upperPlane?.Annihilate(order.GetPlaneOrder());
        basement = null;
        Destroy(gameObject);
    }
示例#7
0
 /// <summary>
 /// Do not use directly, use chunk.DeleteBlock
 /// </summary>
 public void Annihilate(BlockAnnihilationOrder order)
 {
     if (!destroyed)
     {
         destroyed = true;
     }
     if (planes != null)
     {
         var pao = order.GetPlaneOrder();
         foreach (var px in planes)
         {
             px.Value.Annihilate(pao);
         }
     }
 }
示例#8
0
    }//no multimaterial planes

    public void Delete(BlockAnnihilationOrder order)
    {
        if (destroyed)
        {
            return;
        }
        else
        {
            destroyed = true;
        }
        var so = order.GetStructureOrder();

        PrepareBuildingForDestruction(so);
        if (planes != null)
        {
            var po = order.GetPlaneOrder();
            foreach (var p in planes)
            {
                p.Value.Annihilate(po);
            }
        }
        Destroy(gameObject);
    }