public override void OnSingleClick(Mobile from)
        {
            string meadType;

            if (this.Name == null)
            {
                if (m_Crafter != null)
                {
                    this.LabelTo(from, "{0} Brewery", m_Crafter.Name);
                }
                else
                {
                    this.LabelTo(from, "Mead");
                }
            }
            else
            {
                this.LabelTo(from, "{0}", this.Name);
            }

            meadType = BrewingResources.GetName(m_Variety);

            if (m_Quality == MeadQuality.Exceptional)
            {
                this.LabelTo(from, "Black Label {0} Mead", meadType);
            }
            else
            {
                this.LabelTo(from, "{0}", meadType);
            }
        }
Beispiel #2
0
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            Quality = (CoffeeQuality)quality;
            if (Quality == CoffeeQuality.Exceptional)
            {
                Crafter = from;
            }
            Item[] items = from.Backpack.FindItemsByType(typeof(BreweryLabelMaker));
            if (items.Length != 0)
            {
                foreach (BreweryLabelMaker lm in items)
                {
                    if (lm.BreweryName != null)
                    {
                        this.Name = lm.BreweryName;
                        break;
                    }
                }
            }

            Type resourceType = typeRes;

            if (resourceType == null)
            {
                resourceType = craftItem.Resources.GetAt(0).ItemType;
            }
            Variety = BrewingResources.GetFromType(resourceType);
            CraftContext context = craftSystem.GetContext(from);

            Hue = 0;
            return(quality);
        }
Beispiel #3
0
        public BaseHops(HopsVariety variety, int amount) : base(0x1AA2)
        {
            Stackable = true;
            Weight    = 0.1;
            Hue       = BrewingResources.GetHue(variety);

            m_Variety = variety;
        }
Beispiel #4
0
 public override void AddNameProperty(ObjectPropertyList list)
 {
     if (Amount > 1)
     {
         list.Add(1050039, "{0}\t{1}", Amount, "Bunches of " + BrewingResources.GetName(m_Variety) + " Cones");                 // ~1_NUMBER~ ~2_ITEMNAME~
     }
     else
     {
         list.Add("Bunch of " + BrewingResources.GetName(m_Variety) + " Cones");
     }
 }
Beispiel #5
0
 public override void OnSingleClick(Mobile from)
 {
     if (Amount > 1)
     {
         LabelTo(from, "{0} Hops Bunches : {1}", BrewingResources.GetName(m_Variety), Amount);
     }
     else
     {
         LabelTo(from, "{0} Hops Bunch", BrewingResources.GetName(m_Variety));
     }
 }
Beispiel #6
0
        public HopsVarietyInfo(int hue, int number, string name, HopsVariety variety, params Type[] varietyTypes)
        {
            m_Hue          = hue;
            m_Number       = number;
            m_Name         = name;
            m_Variety      = variety;
            m_VarietyTypes = varietyTypes;

            for (int i = 0; i < varietyTypes.Length; ++i)
            {
                BrewingResources.RegisterType(varietyTypes[i], variety);
            }
        }
Beispiel #7
0
        public override void AddNameProperties(ObjectPropertyList list)
        {
            base.AddNameProperties(list);
            string aleType;

            aleType = BrewingResources.GetName(m_Variety);
            if (m_Quality == AleQuality.Exceptional)
            {
                list.Add(1060847, "Black Label\t{0}", aleType);
            }
            else
            {
                list.Add(1060847, "\t{0}", aleType);
            }
        }
Beispiel #8
0
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            Held = 75;

            Quality = (CiderQuality)quality;

            if (makersMark)
            {
                Crafter = from;
            }

            Item[] items = from.Backpack.FindItemsByType(typeof(BreweryLabelMaker));

            if (items.Length != 0)
            {
                foreach (BreweryLabelMaker lm in items)
                {
                    if (lm.BreweryName != null)
                    {
                        this.Name = lm.BreweryName;
                        break;
                    }
                }
            }

            Type resourceType = typeRes;

            if (resourceType == null)
            {
                resourceType = craftItem.Ressources.GetAt(0).ItemType;
            }

            Variety = BrewingResources.GetFromType(resourceType);

            CraftContext context = craftSystem.GetContext(from);

            Hue = 0;

            BottleDuration = 7.0;
            AllowBottling  = false;
            m_Start        = DateTime.Now;

            return(quality);
        }
Beispiel #9
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            {
                m_Variety = ( HopsVariety )reader.ReadInt();
                break;
            }

            case 0:
            {
                HopsInfo info;

                switch (reader.ReadInt())
                {
                case 0: info = HopsInfo.BitterHops; break;

                case 1: info = HopsInfo.SnowHops; break;

                case 2: info = HopsInfo.ElvenHops; break;

                case 3: info = HopsInfo.SweetHops; break;

                default: info = null; break;
                }

                m_Variety = BrewingResources.GetFromHopsInfo(info);
                break;
            }
            }
        }
Beispiel #10
0
        public override void OnSingleClick(Mobile from)
        {
            base.OnSingleClick(from);
            int    number;
            string aleType;

            if (this.Name == null)
            {
                if (m_Crafter != null)
                {
                    this.LabelTo(from, "{0} Brewery", m_Crafter.Name);
                }
                else
                {
                    this.LabelTo(from, "Cheap Ale");
                }
            }
            else
            {
                this.LabelTo(from, "{0}", this.Name);
            }
            aleType = BrewingResources.GetName(m_Variety);
            if (m_Quality == AleQuality.Exceptional)
            {
                this.LabelTo(from, "Black Label {0}", aleType);
            }
            else
            {
                this.LabelTo(from, "{0}", aleType);
            }
            if (m_Held <= 0)
            {
                number = 502246;
            }
            else if (m_Held < 5)
            {
                number = 502248;
            }
            else if (m_Held < 10)
            {
                number = 502249;
            }
            else if (m_Held < 18)
            {
                number = 502250;
            }
            else if (m_Held < 25)
            {
                number = 502251;
            }
            else if (m_Held < 32)
            {
                number = 502252;
            }
            else if (m_Held < 38)
            {
                number = 502254;
            }
            else if (m_Held < 45)
            {
                number = 502253;
            }
            else if (m_Held < 56)
            {
                number = 502255;
            }
            else if (m_Held < 64)
            {
                number = 502256;
            }
            else if (m_Held < 75)
            {
                number = 502257;
            }
            else
            {
                number = 502258;
            }
            this.LabelTo(from, number);
        }
Beispiel #11
0
        public override void OnSingleClick(Mobile from)
        {
            base.OnSingleClick(from);

            int    number;
            string meadType;

            if (this.Name == null)
            {
                if (m_Crafter != null)
                {
                    this.LabelTo(from, "{0} Brewery", m_Crafter.Name);
                }
                else
                {
                    this.LabelTo(from, "Cheap Mead");
                }
            }
            else
            {
                this.LabelTo(from, "{0}", this.Name);
            }

            meadType = BrewingResources.GetName(m_Variety);

            if (m_Quality == MeadQuality.Exceptional)
            {
                this.LabelTo(from, "Black Label {0}", meadType);
            }
            else
            {
                this.LabelTo(from, "{0}", meadType);
            }

            if (m_Held <= 0)
            {
                number = 502246;                 // The keg is empty.
            }
            else if (m_Held < 5)
            {
                number = 502248;                 // The keg is nearly empty.
            }
            else if (m_Held < 10)
            {
                number = 502249;                 // The keg is not very full.
            }
            else if (m_Held < 18)
            {
                number = 502250;                 // The keg is about one quarter full.
            }
            else if (m_Held < 25)
            {
                number = 502251;                 // The keg is about one third full.
            }
            else if (m_Held < 32)
            {
                number = 502252;                 // The keg is almost half full.
            }
            else if (m_Held < 38)
            {
                number = 502254;                 // The keg is approximately half full.
            }
            else if (m_Held < 45)
            {
                number = 502253;                 // The keg is more than half full.
            }
            else if (m_Held < 56)
            {
                number = 502255;                 // The keg is about three quarters full.
            }
            else if (m_Held < 64)
            {
                number = 502256;                 // The keg is very full.
            }
            else if (m_Held < 75)
            {
                number = 502257;                 // The liquid is almost to the top of the keg.
            }
            else
            {
                number = 502258;                 // The keg is completely full.
            }
            this.LabelTo(from, number);
        }