예제 #1
0
        public void FindFlowersInRange()
        {
            FlowersInRange = BeehiveHelper.FindFlowerSources(this);

/*
 *                      //check area around hive for flowers (flower, snowdrop, poppie)
 *
 *                      FlowersInRange = 0;
 *
 *                      Map map = Map;
 *
 *                      if( map == null )
 *                              return;
 *
 *                      IPooledEnumerable eable = map.GetItemsInRange( Location, Range);
 *
 *                      foreach ( Item item in eable )
 *                      {
 *                              string iName = item.ItemData.Name.ToUpper();
 *
 *                              if( iName.IndexOf("FLOWER") != -1 || iName.IndexOf("SNOWDROP") != -1 || iName.IndexOf("POPPIE") != -1 )
 *                                      FlowersInRange++;
 *                      }
 *
 *                      eable.Free();
 */
        }
예제 #2
0
        public void FindWaterInRange()
        {
            WaterInRange = BeehiveHelper.FindWaterSources(this);

/*
 *                      //check area around hive for water (WATER)
 *
 *                      WaterInRange = 0;
 *
 *                      Map map = Map;
 *
 *                      if( map == null )
 *                              return;
 *
 *                      IPooledEnumerable eable = map.GetItemsInRange( Location, Range );
 *
 *                      foreach ( Item item in eable )
 *                      {
 *                              string iName = item.ItemData.Name.ToUpper();
 *
 *                              if( iName.IndexOf("WATER") != -1 )
 *                                      WaterInRange++;
 *                      }
 *
 *                      eable.Free();
 */
        }