private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name)
 {
     AddonComponent ac;
     ac = new AddonComponent(item);
     if (name != null)
         ac.Name = name;
     if (hue != 0)
         ac.Hue = hue;
     if (lightsource != -1)
         ac.Light = (LightType) lightsource;
     addon.AddComponent(ac, xoffset, yoffset, zoffset);
 }
 private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
 {
     AddonComponent ac;
     ac = new AddonComponent(item);
     if (name != null && name.Length > 0)
         ac.Name = name;
     if (hue != 0)
         ac.Hue = hue;
     if (amount > 1)
     {
         ac.Stackable = true;
         ac.Amount = amount;
     }
     if (lightsource != -1)
         ac.Light = (LightType) lightsource;
     addon.AddComponent(ac, xoffset, yoffset, zoffset);
 }
Example #3
0
        private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
        {
            AddonComponent ac;

            ac = new AddonComponent(item);
            if (name != null && name.Length > 0)
            {
                ac.Name = name;
            }
            if (hue != 0)
            {
                ac.Hue = hue;
            }
            if (amount > 1)
            {
                ac.Stackable = true;
                ac.Amount    = amount;
            }
            if (lightsource != -1)
            {
                ac.Light = (LightType)lightsource;
            }
            addon.AddComponent(ac, xoffset, yoffset, zoffset);
        }