Ejemplo n.º 1
0
        public void NewEntry(byte cssID)
        {
            if (((RSTCNode)_resource).cssList.Children.Count >= 100 ||
                ((RSTCNode)_resource).randList.Children.Count >= 100)
            {
                return;
            }

            RSTCEntryNode node1 = new RSTCEntryNode
            {
                FighterID = cssID,
                _name     = BrawlLib.BrawlCrate.FighterNameGenerators.FromID(cssID,
                                                                             BrawlLib.BrawlCrate.FighterNameGenerators.cssSlotIDIndex, "+S")
            };

            ((RSTCNode)_resource).cssList.AddChild(node1);
            RSTCEntryNode node2 = new RSTCEntryNode
            {
                FighterID = cssID,
                _name     = BrawlLib.BrawlCrate.FighterNameGenerators.FromID(cssID,
                                                                             BrawlLib.BrawlCrate.FighterNameGenerators.cssSlotIDIndex, "+S")
            };

            ((RSTCNode)_resource).randList.AddChild(node2);
        }
Ejemplo n.º 2
0
        public void NewEntry(byte cssID)
        {
            if (((RSTCNode)_resource).cssList.entries >= 256 ||
                ((RSTCNode)_resource).randList.entries >= 256)
            {
                return;
            }

            RSTCEntryNode node1 = new RSTCEntryNode
            {
                FighterID = cssID,
                _name     = FighterNameGenerators.FromID(cssID,
                                                         FighterNameGenerators.cssSlotIDIndex, "+S")
            };

            ((RSTCNode)_resource).cssList.AddChild(node1);
            RSTCEntryNode node2 = new RSTCEntryNode
            {
                FighterID = cssID,
                _name     = FighterNameGenerators.FromID(cssID,
                                                         FighterNameGenerators.cssSlotIDIndex, "+S")
            };

            ((RSTCNode)_resource).randList.AddChild(node2);
        }
Ejemplo n.º 3
0
        public void SyncCSS()
        {
            while (((RSTCNode)_resource).cssList.HasChildren)
            {
                ((RSTCNode)_resource).cssList.RemoveChild(((RSTCNode)_resource).cssList.Children[0]);
            }

            foreach (ResourceNode r in ((RSTCNode)_resource).randList.Children)
            {
                RSTCEntryNode temp = new RSTCEntryNode
                {
                    FighterID = ((RSTCEntryNode)r).FighterID,
                    Name      = r.Name
                };
                ((RSTCNode)_resource).cssList.AddChild(temp);
            }
        }
Ejemplo n.º 4
0
        //public override string ExportFilter { get { return FileFilters.RSTCGroup; } }

        public void NewEntry()
        {
            if (_resource.Children.Count >= 100)
            {
                return;
            }

            RSTCEntryNode node = new RSTCEntryNode
            {
                FighterID = 0x0,
                _name     = "Mario"
            };

            _resource.AddChild(node);
            BaseWrapper w = FindResource(node, false);

            w.EnsureVisible();
            w.TreeView.SelectedNode = w;
        }
Ejemplo n.º 5
0
        public void SyncRandom()
        {
            while (((RSTCNode)_resource).randList.HasChildren)
            {
                ((RSTCNode)_resource).randList.RemoveChild(((RSTCNode)_resource).randList.Children[0]);
            }

            foreach (ResourceNode r in ((RSTCNode)_resource).cssList.Children)
            {
                // Disallow syncing of 0x28 (None) and 0x29 (Random)
                if (((RSTCEntryNode)r).FighterID != 0x29 && ((RSTCEntryNode)r).FighterID != 0x28)
                {
                    RSTCEntryNode temp = new RSTCEntryNode
                    {
                        FighterID = ((RSTCEntryNode)r).FighterID,
                        Name      = r.Name
                    };
                    ((RSTCNode)_resource).randList.AddChild(temp);
                }
            }
        }