コード例 #1
0
        public virtual mapTreePOI SeedTreeDataPOI()
        {
            mapTreePOI mtRoot, mtResourceMod, mtPOI, mtTravelMod, mtEventMod;

            mtRoot        = new mapTreePOI(mapConst.mapTreeNamePOI, 0);
            mtResourceMod = new mapTreePOI("Resource Modifiers", 0);
            mtTravelMod   = new mapTreePOI("Travel Modifiers", 0);
            mtEventMod    = new mapTreePOI("Event Modifiers", 0);
            mtPOI         = new mapTreePOI("Places of Interest", 0);


            //Events
            mtEventMod.POITypes.Add(new mapPOIType("Battle", "Battle", "poi_battle", "Battle", 0, 1));
            mtEventMod.POITypes.Add(new mapPOIType("Fleet", "Fleet", "poi_fleet", "Sailship", 0, 1));
            mtEventMod.POITypes.Add(new mapPOIType("Wreck", "Ship Wreck", "poi_shipwreck", "Shipwreck", 0, 1));
            mtEventMod.POITypes.Add(new mapPOIType("Warcamp", "Warcamp", "poi_warcamp", "Primitive", 0, 1));
            mtEventMod.POITypes.Add(new mapPOIType("Lair", "Lair", "poi_lair", "Monster Lair", 0, 1));

            //Resources
            mtResourceMod.POITypes.Add(new mapPOIType("Oasis", "Oasis", "poi_oasis", "Oasis", 0, 1));
            mtResourceMod.POITypes.Add(new mapPOIType("Gold", "Gold", "poi_gold", "Resource", 0, 1));
            mtResourceMod.POITypes.Add(new mapPOIType("Windmill", "Windmill", "poi_windmill", "Windmill", 0, 1));
            mtResourceMod.POITypes.Add(new mapPOIType("Skull", "Skull", "poi_crossbones", "Bad Magic Source", 0, 1));
            mtResourceMod.POITypes.Add(new mapPOIType("Fish", "Fish", "poi_fish", "Fishing", 0, 1));

            //Travel
            mtTravelMod.POITypes.Add(new mapPOIType("Bridge", "Bridge", "poi_bridge", "Bridge", +2, 1));

            //POIs
            mtPOI.POITypes.Add(new mapPOIType("Mine", "Mine", "poi_mine", "Mines", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Village", "Village", "poi_village", "Village", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Port", "Port", "poi_port", "Port", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Castle", "Castle", "poi_castle", "Castle", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Tower", "Tower", "poi_tower", "Tower", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Keep", "Keep", "poi_keep", "Fort", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Camp", "Camp", "poi_camp", "Campsite", 0, 1));

            mtPOI.POITypes.Add(new mapPOIType("Tents", "Tents", "poi_tents", "Tee-pee", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Idol", "Idol", "poi_idol", "Totem", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Ruins", "Ruins", "poi_village_ruins", "Ruins", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Ruins-City", "Ruined City", "poi_town_ruins", "Ruined City", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Cave", "Cave", "poi_cave", "Cave", 0, 1));

            mtPOI.POITypes.Add(new mapPOIType("Monolith", "Monolith", "poi_obelisk", "Monolith", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Landmark", "Landmark", "poi_henge", "Landmark", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Pyramid", "Pyramid", "poi_pyramid", "Pyramid", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Shrine", "Shrine", "poi_shrine", "Shrine", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Palace", "Palace", "poi_palace", "Palace", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Temple", "Temple", "poi_temple", "Temple", 0, 1));
            mtPOI.POITypes.Add(new mapPOIType("Tomb", "Tombstone", "poi_tombstone", "Tombstone", 0, 1));

            mtRoot.AddChild(mtPOI);
            mtRoot.AddChild(mtResourceMod);
            mtRoot.AddChild(mtTravelMod);
            mtRoot.AddChild(mtEventMod);
            return(mtRoot);
        }
コード例 #2
0
        //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>();
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 public mapPOIType(string n, string nl, string resname, string importname, int stepc, int priority, mapTreePOI tPOI)
     : base(n, nl, resname, importname, true, 0, 0, stepc, Color.White, priority)
 {
     Debug.Print("Loaded POI by TreeLoad using treeleaf:" + tPOI.Name);
     this.POIGroup = tPOI;
 }