Esempio n. 1
0
 public RareItem(RareEntry entry)
     : base(entry.ItemID)
 {
     Hue  = entry.Hue;
     Name = entry.Name;
     RaresFile.AddScriptAttachments(this, entry.ScriptFiles);
 }
Esempio n. 2
0
        public RareAddon(string name, string sourcefile)
        {
            Name       = name;
            SourceFile = sourcefile;
            RareAddonEntry rareAddonEntry = RareSystem.GetRareAddonEntry(name, sourcefile);

            if (rareAddonEntry == null)
            {
                // specification in file not found
                Delete();
                return;
            }
            foreach (RareAddonComponentEntry component in rareAddonEntry.Components)
            {
                AddonComponent newAddonComponent = new AddonComponent(component.ItemID)
                {
                    Hue     = component.Hue,
                    Visible = component.Visible
                };
                AddComponent(newAddonComponent, component.X, component.Y, component.Z);
            }
            RaresFile.AddScriptAttachments(this, rareAddonEntry.ScriptFiles);
        }