private void PickResourceSite(PointOfInterestTemplate poiTemplate, List <PointOfInterestDefinition> createdPOIs, List <HexPos> availableSpots)
        {
            bool   flag          = false;
            int    num           = 20;
            string propertyValue = poiTemplate.GetPropertyValue("ResourceName");

            do
            {
                num--;
                HexPos hexPos = availableSpots.First <HexPos>();
                availableSpots.RemoveAt(0);
                Region region = base.Context.Regions[base.Context.RegionData[hexPos.Row, hexPos.Column]];
                PointOfInterestDefinition pointOfInterestDefinition = this.MakeNewPOI(hexPos, poiTemplate, 1);
                this.Influence.AddSpot(hexPos);
                if (pointOfInterestDefinition != null)
                {
                    createdPOIs.Add(pointOfInterestDefinition);
                    Dictionary <int, int> dictionary = this.CreatedSites[propertyValue];
                    int landMassIndex = region.LandMassIndex;
                    int num2          = dictionary[landMassIndex];
                    dictionary[landMassIndex] = num2 + 1;
                    region.Resources.Add(pointOfInterestDefinition);
                    flag = true;
                }
            }while (!flag && num > 0 && availableSpots.Count > 0);
        }
 public PointOfInterest(PointOfInterestDefinition pointOfInterestDefinition, GameEntityGUID guid, Region region) : base("PointOfInterest#" + guid)
 {
     this.PointOfInterestDefinition = pointOfInterestDefinition;
     this.GUID   = guid;
     this.Region = region;
     this.lastLineOfSightRange         = this.LineOfSightVisionRange;
     this.LineOfSightActive            = true;
     this.LineOfSightDirty             = true;
     this.QuestStepsUsedBy             = new List <StaticString>();
     base.Refreshed                   += this.PointOfInterest_Refreshed;
     this.Interaction                  = new PointOfInterestInteraction();
     this.AffinityMapping              = StaticString.Empty;
     SeasonManager.DustDepositsToggle += this.DustDepositsToggleEventHandler;
 }