Exemple #1
0
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            Quality = (JuiceQuality)quality;
            if (makersMark)
            {
                Crafter = from;
            }
            Item[] items = from.Backpack.FindItemsByType(typeof(FarmLabelMaker));
            if (items.Length != 0)
            {
                foreach (FarmLabelMaker lm in items)
                {
                    if (lm.FarmName != null)
                    {
                        this.Name = lm.FarmName;
                        break;
                    }
                }
            }

            Type resourceType = typeRes;

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

            Hue = 0;
            return(quality);
        }
Exemple #2
0
        public override void OnSingleClick(Mobile from)
        {
            string JuiceType;

            if (this.Name == null)
            {
                if (m_Crafter != null)
                {
                    this.LabelTo(from, "{0} Farms", m_Crafter.Name);
                }
                else
                {
                    this.LabelTo(from, "Bottle of Juice");
                }
            }
            else
            {
                this.LabelTo(from, "{0} Farms", this.Name);
            }
            JuiceType = JuicingResources.GetName(m_Variety);
            if (m_Quality == JuiceQuality.Exceptional)
            {
                this.LabelTo(from, "Premium {0} Juice", JuiceType);
            }
            else
            {
                this.LabelTo(from, "{0} Juice", JuiceType);
            }
        }
Exemple #3
0
        public FruitsVarietyInfo(int hue, int number, string name, FruitsVariety 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)
            {
                JuicingResources.RegisterType(varietyTypes[i], variety);
            }
        }
Exemple #4
0
        public override void AddNameProperties(ObjectPropertyList list)
        {
            base.AddNameProperties(list);
            string JuiceType;

            JuiceType = JuicingResources.GetName(m_Variety);
            if (m_Quality == JuiceQuality.Exceptional)
            {
                list.Add(1060847, "Premium\t{0}", JuiceType);
            }
            else
            {
                list.Add(1060847, "\t{0}", JuiceType);
            }
        }
Exemple #5
0
        public override void AddNameProperty(ObjectPropertyList list)
        {
            string JuiceType;

            JuiceType = JuicingResources.GetName(m_Variety);
            if (this.Name == null)
            {
                if (m_Crafter != null)
                {
                    list.Add(m_Crafter.Name + " Farms");
                }
                else
                {
                    list.Add("Bottle of Juice");
                }
            }
            else
            {
                list.Add(this.Name + " Farms");
            }
        }
Exemple #6
0
        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            Held    = 75;
            Quality = (JuiceQuality)quality;
            if (Quality == JuiceQuality.Exceptional)
            {
                Crafter = from;
            }
            Item[] items = from.Backpack.FindItemsByType(typeof(FarmLabelMaker));
            if (items.Length != 0)
            {
                foreach (FarmLabelMaker lm in items)
                {
                    if (lm.FarmName != null)
                    {
                        this.Name = lm.FarmName;
                        break;
                    }
                }
            }

            Type resourceType = typeRes;

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

            Hue            = 0;
            BottleDuration = 1.0;
            AllowBottling  = false;
            m_Start        = DateTime.UtcNow;
            return(quality);
        }
        public override void OnSingleClick(Mobile from)
        {
            base.OnSingleClick(from);

            int    number;
            string JuiceType;

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

            JuiceType = JuicingResources.GetName(m_Variety);

            if (m_Quality == JuiceQuality.Exceptional)
            {
                this.LabelTo(from, "Fresh {0}", JuiceType);
            }
            else
            {
                this.LabelTo(from, "{0}", JuiceType);
            }

            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);
        }
Exemple #8
0
        public override void OnSingleClick(Mobile from)
        {
            base.OnSingleClick(from);

            int    number;
            string JuiceType;

            if (this.Name == null)
            {
                if (m_Crafter != null)
                {
                    this.LabelTo(from, "{0} Farms", m_Crafter.Name);
                }
                else
                {
                    this.LabelTo(from, "Juice");
                }
            }
            else
            {
                this.LabelTo(from, "{0}", this.Name);
            }
            JuiceType = JuicingResources.GetName(m_Variety);
            if (m_Quality == JuiceQuality.Exceptional)
            {
                this.LabelTo(from, "Premium {0}", JuiceType);
            }
            else
            {
                this.LabelTo(from, "{0}", JuiceType);
            }
            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);
        }