Inheritance: UICatalogResProvider
Exemple #1
0
        static void AddWallStyles()
        {
            var res = new UICatalogWallResProvider();

            for (int i = 0; i < WallStyleIDs.Length; i++)
            {
                var walls = Content.GameContent.Get.WorldWalls;
                var style = walls.GetWallStyle((ulong)WallStyleIDs[i]);
                _Catalog[7].Insert(0, new UICatalogElement
                {
                    Item = new ObjectCatalogItem()
                    {
                        Name     = style.Name,
                        Category = 7,
                        Price    = (uint)style.Price,
                    },
                    Special = new UISpecialCatalogElement
                    {
                        Control    = typeof(UIWallPlacer),
                        ResID      = (ulong)WallStyleIDs[i],
                        Res        = res,
                        Parameters = new List <int> {
                            WallStylePatterns[i], WallStyleIDs[i]
                        }                                                                    //pattern, style
                    }
                });
            }
        }
Exemple #2
0
        static void AddTerrainTools()
        {
            var res = new UICatalogWallResProvider();

            _Catalog[10].Insert(0, new UICatalogElement
            {
                Item = new ObjectCatalogItem()
                {
                    Name     = "Raise/Lower Terrain",
                    Category = 7,
                    Price    = 1,
                },
                Special = new UISpecialCatalogElement
                {
                    Control    = typeof(UITerrainRaiser),
                    ResID      = 0,
                    Res        = new UICatalogTerrainResProvider(),
                    Parameters = new List <int> {
                    }
                }
            });

            _Catalog[10].Insert(0, new UICatalogElement
            {
                Item = new ObjectCatalogItem()
                {
                    Name     = "Flatten Terrain",
                    Category = 7,
                    Price    = 1,
                },
                Special = new UISpecialCatalogElement
                {
                    Control    = typeof(UITerrainFlatten),
                    ResID      = 1,
                    Res        = new UICatalogTerrainResProvider(),
                    Parameters = new List <int> {
                    }
                }
            });

            _Catalog[10].Insert(0, new UICatalogElement
            {
                Item = new ObjectCatalogItem()
                {
                    Name     = "Grass Tool",
                    Category = 7,
                    Price    = 1,
                },
                Special = new UISpecialCatalogElement
                {
                    Control    = typeof(UIGrassPaint),
                    ResID      = 2,
                    Res        = new UICatalogTerrainResProvider(),
                    Parameters = new List <int> {
                    }
                }
            });
        }
Exemple #3
0
        private static void AddWallStyles()
        {
            var res = new UICatalogWallResProvider();

            for (int i = 0; i < WallStyleIDs.Length; i++)
            {
                _Catalog[7].Insert(0, new UICatalogElement
                {
                    Name = "Wall",
                    Category = 7,
                    Price = 0,
                    Special = new UISpecialCatalogElement
                    {
                        Control = typeof(UIWallPlacer),
                        ResID = (ulong)WallStyleIDs[i],
                        Res = res,
                        Parameters = new List<int> { WallStylePatterns[i], WallStyleIDs[i] } //pattern, style
                    }
                });
            }
        }