public virtual mapTreeTerrain SeedTreeDataTerrain()
        {
            mapTreeTerrain mtRoot, mtEmpty, mtLand, mtWater;

            mtRoot = new mapTreeTerrain(mapConst.mapTreeNameTerrain, 0);


            mtEmpty = new mapTreeTerrain("Empty/Error", 0);
            mtLand  = new mapTreeTerrain("Land Terrain", 0);
            mtWater = new mapTreeTerrain("Water Terrain", 0);

            mtEmpty.AddChild(new mapTreeTerrain("Empty", 0));

            mtLand.AddChild(new mapTreeTerrain("Grass", 0));
            mtLand.AddChild(new mapTreeTerrain("Desert", 0));
            mtLand.AddChild(new mapTreeTerrain("Mountain", 0));
            mtLand.AddChild(new mapTreeTerrain("Hill", 0));
            mtLand.AddChild(new mapTreeTerrain("Forest", 0));
            mtLand.AddChild(new mapTreeTerrain("Mixed", 0));
            mtLand.AddChild(new mapTreeTerrain("Evergreen", 0));
            mtLand.AddChild(new mapTreeTerrain("Jungle", 0));
            mtLand.AddChild(new mapTreeTerrain("Snow", 0));
            mtLand.AddChild(new mapTreeTerrain("Badland", 0));
            mtLand.AddChild(new mapTreeTerrain("Other", 0));

            mtWater.AddChild(new mapTreeTerrain("Water", 0));

            mtRoot.AddChild(mtEmpty);
            mtRoot.AddChild(mtWater);
            mtRoot.AddChild(mtLand);
            return(mtRoot);
        }
        public static void InitmapTerrainTree(mapTreeTerrain mTree)
        {
            mapTreeTerrain mtEmpty, mtLand, mtWater;


            mtEmpty = new mapTreeTerrain("Empty/Error", 0);
            mtLand  = new mapTreeTerrain("Land Terrain", 0);
            mtWater = new mapTreeTerrain("Water Terrain", 0);

            mtEmpty.AddChild(new mapTreeTerrain("Empty", 0));
            mtLand.AddChild(new mapTreeTerrain("Grass", 0));
            mtLand.AddChild(new mapTreeTerrain("Desert", 0));
            mtWater.AddChild(new mapTreeTerrain("Water", 0));
            mtLand.AddChild(new mapTreeTerrain("Mountain", 0));
            mtLand.AddChild(new mapTreeTerrain("Hill", 0));
            mtLand.AddChild(new mapTreeTerrain("Forest", 0));
            mtLand.AddChild(new mapTreeTerrain("Mixed", 0));
            mtLand.AddChild(new mapTreeTerrain("Evergreen", 0));
            mtLand.AddChild(new mapTreeTerrain("Jungle", 0));
            mtLand.AddChild(new mapTreeTerrain("Snow", 0));
            mtLand.AddChild(new mapTreeTerrain("Badland", 0));
            mtLand.AddChild(new mapTreeTerrain("Other", 0));

            mTree.AddChild(mtEmpty);
            mTree.AddChild(mtWater);
            mTree.AddChild(mtLand);
        }
        public mapTerrainType(char val, string n, string nl, string resname, string importname, bool isTrans, int elev, int height, int stepc, Color bg, mapTreeTerrain tbase)
            : base(n, nl, resname, importname, isTrans, elev, height, stepc, bg, 0)
        {
            this.Value       = val;
            this.TerrainType = tbase;

            //this.PGHexType = pgtype;
            Debug.Print("Loaded TerrainType (via treeLoad) " + nl + " using resource" + resname + " Resultant Bitmap width:" + this.Tile.Size.Width + "height" + this.Tile.Size.Height);
        }
        //constructors

        public mapTileSetManager()
        {
            TerrainTypes = new List <mapTerrainType>();
            POITypes     = new List <mapPOIType>();
            mTreeTerrain = new mapTreeTerrain();
            mTreePOI     = new mapTreePOI();

            dictByChar            = new Dictionary <char, mapTerrainType>();
            dictByName            = new Dictionary <string, mapTerrainType>();
            dictByImportName      = new Dictionary <string, mapTerrainType>();
            dictTreeTerrainByName = new Dictionary <string, mapTreeTerrain>();
            dictTreePOIbyName     = new Dictionary <string, mapTreePOI>();

            POIdictByName       = new Dictionary <string, mapPOIType>();
            POIdictByImportName = new Dictionary <string, mapPOIType>();
        }
        public void Init(mapTreeTerrain mtree, mapTreePOI mPOI)
        {
            //Need mTreeTerrain to be possible to exist before creating other defaults
            if (mtree != null)
            {
                mTreeTerrain = mtree;
            }
            else
            {
                InitmapTerrainTree(mTreeTerrain);
            }

            foreach (mapTreeTerrain mt in mTreeTerrain.Descendants)
            {
                Debug.Print("Adding Name" + mt.Name + " Count of Dict" + dictTreeTerrainByName.Count);
                dictTreeTerrainByName.Add(mt.Name, mt);
            }


            InitMapTerrains(TerrainTypes, dictTreeTerrainByName);
            //build dictionaries
            foreach (mapTerrainType t in TerrainTypes)
            {
                dictByChar.Add(t.Value, t);
                dictByName.Add(t.LongName, t);

                if (!t.ImportName.Contains("|"))
                {
                    dictByImportName.Add(t.ImportName, t);
                }
                else
                {
                    var split = t.ImportName.Split('|');
                    foreach (string s in split)
                    {
                        dictByImportName.Add(s, t);
                    }
                }
            }

            if (mPOI != null)
            {
                mTreePOI = mPOI;
            }
            else
            {
                mTreePOI = this.SeedTreeDataPOI();
            }


            foreach (mapTreePOI mp in mTreePOI.Descendants)
            {
                Debug.Print("Adding Name" + mp.Name + " Count of Dict" + dictTreePOIbyName.Count);
                dictTreePOIbyName.Add(mp.Name, mp);
            }

            //InitPOITypes(POITypes);
            foreach (mapPOIType sp in POITypes)
            {
                POIdictByImportName.Add(sp.ImportName, sp);
                POIdictByName.Add(sp.LongName, sp);
            }
        }