
////////////////////////////////////////
//                                    //
//   Generated by CEO's YAAAG - V1.2  //
// (Yet Another Arya Addon Generator) //
//                                    //
////////////////////////////////////////
using System;
using Server;
using Server.Items;

namespace Server.Items
{
	public class MuleShackAddon : BaseAddon
	{
        private static int[,] m_AddOnSimpleComponents = new int[,] {
			  {1257, -1, -1, 4}, {1257, -1, 0, 4}, {1257, -1, 1, 4}// 1	2	3	
			, {1257, 0, -2, 4}, {1257, 0, 0, 4}, {1257, 0, 2, 4}// 4	5	6	
			, {1257, 1, -1, 4}, {1257, 1, 0, 4}, {1257, 1, 1, 4}// 7	8	9	
			, {1257, 1, 2, 4}, {1335, 2, 0, 4}, {1336, 2, -1, 4}// 10	11	12	
			, {1336, 3, 0, 4}, {1338, 2, 1, 4}, {1338, -2, 1, 4}// 13	14	15	
			, {1338, -2, 0, 4}, {1337, -2, -1, 4}, {1337, 0, -1, 4}// 16	17	18	
			, {1338, 0, 1, 4}, {1338, 1, -2, 4}, {1338, -1, 2, 4}// 19	20	21	
			, {149, -2, 2, 4}, {149, 1, 2, 4}, {154, 2, 2, 4}// 22	23	26	
			, {148, -3, -1, 0}, {148, -3, 0, 4}, {148, -3, 1, 4}// 27	28	29	
			, {148, -3, 2, 4}, {155, -3, -2, 4}, {156, -2, -3, 4}// 30	31	32	
			, {149, 1, -3, 4}, {149, 0, -3, 4}, {8626, 2, -3, 7}// 33	34	36	
			, {8642, 3, -2, 4}, {8643, 3, -3, 4}, {8641, 3, -1, 4}// 37	38	39	
			, {2324, -2, -2, 4}, {2324, 3, 1, 4}, {2324, 2, -2, 4}// 40	41	42	
			, {2323, 0, 0, 4}, {2323, 1, -1, 4}, {11156, -1, 2, 24}// 43	44	45	
			, {11156, -1, 1, 24}, {11157, -1, 0, 24}, {11157, -2, 2, 24}// 46	47	48	
			, {11157, -2, 1, 23}, {11157, -3, -1, 16}, {11160, -1, -1, 24}// 49	50	51	
			, {11160, -3, -2, 14}, {3892, -1, -2, 4}, {3892, -2, 0, 4}// 52	53	54	
			, {3892, 0, 0, 4}, {3892, 0, -2, 4}, {2324, 2, 0, 4}// 55	56	58	
			, {2324, -1, 0, 4}, {2324, 0, -1, 4}// 59	60	
		};

 
            
		public override BaseAddonDeed Deed
		{
			get
			{
				return new MuleShackAddonDeed();
			}
		}

		[ Constructable ]
		public MuleShackAddon()
		{

            for (int i = 0; i < m_AddOnSimpleComponents.Length / 4; i++)
                AddComponent( new AddonComponent( m_AddOnSimpleComponents[i,0] ), m_AddOnSimpleComponents[i,1], m_AddOnSimpleComponents[i,2], m_AddOnSimpleComponents[i,3] );


			AddComplexComponent( (BaseAddon) this, 152, -1, 2, 4, 0, 1, "", 1);// 24
			AddComplexComponent( (BaseAddon) this, 152, 0, 2, 4, 0, 1, "", 1);// 25
			AddComplexComponent( (BaseAddon) this, 152, -1, -3, 4, 0, 1, "", 1);// 35
			AddComplexComponent( (BaseAddon) this, 3707, 1, -2, 4, 0, -1, "a wash tub", 1);// 57
			AddComplexComponent( (BaseAddon) this, 5453, 2, 3, 4, 0, -1, "Rainbarrel", 1);// 61

		}

		public MuleShackAddon( Serial serial ) : base( serial )
		{
		}

        private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource)
        {
            AddComplexComponent(addon, item, xoffset, yoffset, zoffset, hue, lightsource, null, 1);
        }

        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);
        }

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( 0 ); // Version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
		}
	}

	public class MuleShackAddonDeed : BaseAddonDeed
	{
		public override BaseAddon Addon
		{
			get
			{
				return new MuleShackAddon();
			}
		}

		[Constructable]
		public MuleShackAddonDeed()
		{
			Name = "MuleShack";
		}

		public MuleShackAddonDeed( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( 0 ); // Version
		}

		public override void	Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
		}
	}
}