Example #1
0
 private void SendColonists()
 {
     if (completed)
     {
         return;
     }
     if (anchorBasement.colonistsArrived >= COLONISTS_SEND_LIMIT)
     {
         if (colony.storage.GetResourceCount(COST_RESOURCE_ID) >= COLONISTS_SEND_COST)
         {
             if (hexBuilder.totalHousing > hexBuilder.colonistsCount)
             {
                 anchorBasement.GetColonists(COLONISTS_SEND_LIMIT);
                 colony.storage.GetResources(COST_RESOURCE_ID, COLONISTS_SEND_COST);
                 hexBuilder.AddColonist();
                 colony.RemoveCitizens(COLONISTS_SEND_LIMIT, false);
                 settleWindow.Refresh();
             }
             else
             {
                 AnnouncementCanvasController.MakeImportantAnnounce(localizer.notEnoughLivingSpace);
             }
         }
         else
         {
             AnnouncementCanvasController.MakeImportantAnnounce(localizer.notEnoughSuppliesMsg);
         }
     }
     else
     {
         AnnouncementCanvasController.MakeImportantAnnounce(localizer.notEnoughColonistsMsg);
     }
 }
Example #2
0
 private void RemoveLodgers(byte x)
 {
     if (x == 0 | lodgersCount == 0)
     {
         return;
     }
     if (lodgersCount >= x)
     {
         lodgersCount -= x;
         colony.RemoveCitizens(x, false);
     }
     else
     {
         colony.RemoveCitizens(lodgersCount, false);
         lodgersCount = 0;
     }
 }