Exemple #1
0
 internal NgbhItems(NgbhSlotList parent)
 {
     this.parent = parent;
     if (parent != null)
     {
         ngbh = parent.Parent;
     }
     list = new ArrayList();
 }
Exemple #2
0
        public NgbhSlots Clone(Ngbh newparent)
        {
            NgbhSlots ret = new NgbhSlots(newparent, type);

            foreach (NgbhSlot s in list)
            {
                ret.Add(s);
            }

            return(ret);
        }
Exemple #3
0
        void DeleteMemories(uint inst, uint guid, SimPe.Interfaces.Files.IPackageFile pkg, SimPe.PackedFiles.Wrapper.ExtSDesc victim)
        {
            SimPe.Interfaces.Files.IPackedFileDescriptor[] pfds = pkg.FindFiles(0x4E474248);
            foreach (SimPe.Interfaces.Files.IPackedFileDescriptor pfd in pfds)
            {
                SimPe.Plugin.Ngbh n = new Ngbh(null);
                n.ProcessData(pfd, pkg);

                SimPe.Plugin.Collections.NgbhSlots slots = new SimPe.Plugin.Collections.NgbhSlots(n, Data.NeighborhoodSlots.Sims);
                foreach (NgbhSlot s in n.Sims)
                {
                    if (s.SlotID != inst)
                    {
                        slots.Add(s);
                        SimPe.Plugin.Collections.NgbhItems list = new SimPe.Plugin.Collections.NgbhItems(s);
                        foreach (NgbhItem i in s.ItemsA)
                        {
                            if (i.SimID != guid && i.SimInstance != inst && i.OwnerInstance != inst)
                            {
                                list.Add(i);
                            }
                        }
                        s.ItemsA = list;

                        list = new SimPe.Plugin.Collections.NgbhItems(s);
                        foreach (NgbhItem i in s.ItemsB)
                        {
                            if (i.SimID != guid && i.SimInstance != inst && i.OwnerInstance != inst)
                            {
                                list.Add(i);
                            }
                        }

                        s.ItemsB = list;
                    }
                }

                n.Sims = slots;

                n.SynchronizeUserData();
            }
        }
Exemple #4
0
 internal NgbhSlots(Ngbh parent, Data.NeighborhoodSlots type)
 {
     list        = new ArrayList();
     this.parent = parent;
     this.type   = type;
 }