예제 #1
0
        public override void OnSingleClick(Mobile from)
        {
            if (m_PlantStatus >= PlantStatus.DeadTwigs)
            {
                base.OnSingleClick(from);
            }
            else if (m_PlantStatus >= PlantStatus.FullGrownPlant)
            {
                PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);

                if (m_PlantStatus < PlantStatus.DecorativePlant)
                {
                    if (typeInfo.ContainsPlant)
                    {
                        LabelTo(from, string.Format("{0} {1} {2}", m_PlantSystem.GetLocalizedHealth(), PlantHue.ToString().ToLower(), PlantType.ToString().ToLower()));
                    }
                    else
                    {
                        LabelTo(from, string.Format("{0} bright {1} {2} plant", m_PlantSystem.GetLocalizedHealth(), PlantHue.ToString().ToLower(), PlantType.ToString().ToLower()));
                    }
                }
                else
                {
                    LabelTo(from, string.Format("Decorative {0} {1}", PlantHue.ToString().ToLower(), PlantType.ToString().ToLower()));
                }
            }
            else if (m_PlantStatus >= PlantStatus.Seed)
            {
                if (m_ShowType)
                {
                    PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);

                    if (typeInfo.ContainsPlant && m_PlantStatus == PlantStatus.Plant)
                    {
                        LabelTo(from, string.Format("Bowl of {0} dirt with a {1} {2} {3}", m_PlantSystem.GetLocalizedDirtStatus().ToLower(), m_PlantSystem.GetLocalizedHealth().ToLower(), PlantHue.ToString().ToLower(), PlantType.ToString().ToLower()));
                    }
                    else
                    {
                        LabelTo(from, string.Format("Bowl of {0} dirt with a {1} {2} {3} {4}", m_PlantSystem.GetLocalizedDirtStatus().ToLower(), m_PlantSystem.GetLocalizedHealth().ToLower(), PlantHue.ToString().ToLower(), GetLocalizedPlantStatus().ToLower(), PlantType.ToString().ToLower()));
                    }
                }
                else
                {
                    LabelTo(from, string.Format("Bowl of {0} dirt with a {1} {2} {3}", m_PlantSystem.GetLocalizedDirtStatus().ToLower(), m_PlantSystem.GetLocalizedHealth().ToLower(), PlantHue.ToString().ToLower(), GetLocalizedPlantStatus().ToLower()));
                }
            }
            else
            {
                LabelTo(from, string.Format("Bowl of {0} dirt ", m_PlantSystem.GetLocalizedDirtStatus().ToLower()));
            }
        }
예제 #2
0
        public override void AddNameProperty(ObjectPropertyList list)
        {
            if (m_PlantStatus >= PlantStatus.DecorativePlant)
            {
                base.AddNameProperty(list);
            }
            else if (m_PlantStatus >= PlantStatus.FullGrownPlant)
            {
                PlantHueInfo  hueInfo  = PlantHueInfo.GetInfo(m_PlantHue);
                PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
                string        args     = string.Format("#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedHealth(), hueInfo.Name, typeInfo.Name);

                if (typeInfo.ContainsPlant)
                {
                    // a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~
                    list.Add(hueInfo.IsBright() ? 1061891 : 1061889, args);
                }
                else
                {
                    // a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~ plant
                    list.Add(hueInfo.IsBright() ? 1061892 : 1061890, args);
                }
            }
            else if (m_PlantStatus >= PlantStatus.Seed)
            {
                PlantHueInfo hueInfo = PlantHueInfo.GetInfo(m_PlantHue);
                string       args    = string.Format("#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth(), hueInfo.Name);

                if (m_ShowType)
                {
                    PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
                    args += "\t#" + typeInfo.Name.ToString();

                    if (typeInfo.ContainsPlant && m_PlantStatus == PlantStatus.Plant)
                    {
                        // a bowl of ~1_val~ dirt with a ~2_val~ [bright] ~3_val~ ~4_val~
                        list.Add(hueInfo.IsBright() ? 1060832 : 1060831, args);
                    }
                    else
                    {
                        // a bowl of ~1_val~ dirt with a ~2_val~ [bright] ~3_val~ ~4_val~ ~5_val~
                        list.Add(hueInfo.IsBright() ? 1061887 : 1061888, args + "\t#" + GetLocalizedPlantStatus().ToString());
                    }
                }
                else
                {
                    // a bowl of ~1_val~ dirt with a ~2_val~ [bright] ~3_val~ ~4_val~
                    list.Add(hueInfo.IsBright() ? 1060832 : 1060831, args + "\t#" + GetLocalizedPlantStatus().ToString());
                }
            }
            else
            {
                list.Add(1060830, "#" + m_PlantSystem.GetLocalizedDirtStatus());                 // a bowl of ~1_val~ dirt
            }
        }
예제 #3
0
        public override void AddNameProperty(ObjectPropertyList list)
        {
            if (m_PlantStatus >= PlantStatus.DeadTwigs)
            {
                base.AddNameProperty(list);
            }
            else if (m_PlantStatus >= PlantStatus.FullGrownPlant)
            {
                PlantHueInfo  hueInfo  = PlantHueInfo.GetInfo(m_PlantHue);
                PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);

                int title = PlantTypeInfo.GetBonsaiTitle(m_PlantType);
                if (title == 0)                   // Not a bonsai
                {
                    title = hueInfo.Name;
                }

                if (m_PlantStatus < PlantStatus.DecorativePlant)
                {
                    if (m_PlantType == PlantType.SugarCanes)
                    {
                        string args = string.Format("#{0}", m_PlantSystem.GetLocalizedHealth());
                        list.Add(1094702, args);
                    }
                    else
                    {
                        string args = string.Format("#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedHealth(), title, typeInfo.Name);

                        if (typeInfo.ContainsPlant)
                        {
                            // a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~
                            list.Add(hueInfo.IsBright() ? 1061891 : 1061889, args);
                        }
                        else
                        {
                            // a ~1_HEALTH~ [bright] ~2_COLOR~ ~3_NAME~ plant
                            list.Add(hueInfo.IsBright() ? 1061892 : 1061890, args);
                        }
                    }
                }
                else
                {
                    if (m_PlantType == PlantType.SugarCanes)
                    {
                        list.Add(1094703);
                    }
                    else if (title == 1080528)
                    {
                        // a decorative ~2_TYPE~
                        list.Add(1080539, string.Format("#{0}\t#{1}", title, typeInfo.Name));
                    }
                    else
                    {
                        // a decorative ~1_COLOR~ ~2_TYPE~ plant
                        list.Add(hueInfo.IsBright() ? 1074267 : 1070973, string.Format("#{0}\t#{1}", title, typeInfo.Name));
                    }
                }
            }
            else if (m_PlantStatus >= PlantStatus.Seed)
            {
                PlantHueInfo hueInfo = PlantHueInfo.GetInfo(m_PlantHue);

                int title = PlantTypeInfo.GetBonsaiTitle(m_PlantType);
                if (title == 0)                   // Not a bonsai
                {
                    title = hueInfo.Name;
                }

                string args = string.Format("#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth(), title);

                // 7.0.12.0 cliloc change
                args = String.Concat("#1150435\t", args); // TODO: Change to plant container type when implemented

                if (m_ShowType)
                {
                    PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
                    args += "\t#" + typeInfo.Name.ToString();

                    if (typeInfo.ContainsPlant && m_PlantStatus == PlantStatus.Plant)
                    {
                        // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
                        list.Add(hueInfo.IsBright() ? 1060832 : 1060831, args);
                    }
                    else
                    {
                        // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~ ~6_val~
                        list.Add(hueInfo.IsBright() ? 1061887 : 1061888, args + "\t#" + this.GetLocalizedPlantStatus().ToString());
                    }
                }
                else
                {
                    // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
                    list.Add(hueInfo.IsBright() ? 1060832 : 1060831, args + "\t#" + this.GetLocalizedPlantStatus().ToString());
                }
            }
            else
            {
                string args = "#" + m_PlantSystem.GetLocalizedDirtStatus();

                // 7.0.12.0 cliloc change
                args = String.Concat("#1150435\t", args); // TODO: Change to plant container type when implemented

                list.Add(1060830, args);                  // a ~1_val~ of ~2_val~ dirt
            }
        }
예제 #4
0
        public override LocalizedText GetNameProperty()
        {
            if (m_PlantStatus >= PlantStatus.DeadTwigs)
            {
                return(new LocalizedText(1027069));                  // twigs
            }
            else if (m_PlantStatus < PlantStatus.Seed)
            {
                string args = String.Format("#{0}\t#{1}", GetLocalizedContainerType(), m_PlantSystem.GetLocalizedDirtStatus());

                return(new LocalizedText(1060830, args));                  // a ~1_val~ of ~2_val~ dirt
            }
            else
            {
                PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
                PlantHueInfo  hueInfo  = PlantHueInfo.GetInfo(m_PlantHue);

                if (m_PlantStatus >= PlantStatus.DecorativePlant)
                {
                    return(new LocalizedText(typeInfo.GetPlantLabelDecorative(hueInfo), String.Format("#{0}\t#{1}", hueInfo.Name, typeInfo.Name)));
                }
                else if (m_PlantStatus >= PlantStatus.FullGrownPlant)
                {
                    return(new LocalizedText(typeInfo.GetPlantLabelFullGrown(hueInfo), String.Format("#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedHealth(), hueInfo.Name, typeInfo.Name)));
                }
                else
                {
                    string args = String.Format("#{0}\t#{1}\t#{2}", GetLocalizedContainerType(), m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth());

                    if (m_ShowType)
                    {
                        args += String.Format("\t#{0}\t#{1}\t#{2}", hueInfo.Name, typeInfo.Name, GetLocalizedPlantStatus());

                        if (m_PlantStatus == PlantStatus.Plant)
                        {
                            return(new LocalizedText(typeInfo.GetPlantLabelPlant(hueInfo), args));
                        }
                        else
                        {
                            return(new LocalizedText(typeInfo.GetPlantLabelSeed(hueInfo), args));
                        }
                    }
                    else
                    {
                        args += String.Format("\t#{0}\t#{1}", (typeInfo.PlantCategory == PlantCategory.Default) ? hueInfo.Name : (int)typeInfo.PlantCategory, GetLocalizedPlantStatus());

                        return(new LocalizedText(hueInfo.IsBright() ? 1060832 : 1060831, args));                          // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
                    }
                }
            }
        }
예제 #5
0
        public override void AddNameProperty(ObjectPropertyList list)
        {
            if (m_PlantStatus >= PlantStatus.DeadTwigs)
            {
                base.AddNameProperty(list);
            }
            else if (m_PlantStatus < PlantStatus.Seed)
            {
                string args;

                if (ShowContainerType)
                {
                    args = String.Format("#{0}\t#{1}", GetLocalizedContainerType(), m_PlantSystem.GetLocalizedDirtStatus());
                }
                else
                {
                    args = String.Format("#{0}", m_PlantSystem.GetLocalizedDirtStatus());
                }

                list.Add(1060830, args);                   // a ~1_val~ of ~2_val~ dirt
            }
            else
            {
                PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
                PlantHueInfo  hueInfo  = PlantHueInfo.GetInfo(m_PlantHue);

                if (m_PlantStatus >= PlantStatus.DecorativePlant)
                {
                    list.Add(typeInfo.GetPlantLabelDecorative(hueInfo), String.Format("#{0}\t#{1}", hueInfo.Name, typeInfo.Name));
                }
                else if (m_PlantStatus >= PlantStatus.FullGrownPlant)
                {
                    list.Add(typeInfo.GetPlantLabelFullGrown(hueInfo), String.Format("#{0}\t#{1}\t#{2}", m_PlantSystem.GetLocalizedHealth(), hueInfo.Name, typeInfo.Name));
                }
                else
                {
                    string args;

                    if (ShowContainerType)
                    {
                        args = String.Format("#{0}\t#{1}\t#{2}", GetLocalizedContainerType(), m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth());
                    }
                    else
                    {
                        args = String.Format("#{0}\t#{1}", m_PlantSystem.GetLocalizedDirtStatus(), m_PlantSystem.GetLocalizedHealth());
                    }

                    if (m_ShowType)
                    {
                        args += String.Format("\t#{0}\t#{1}\t#{2}", hueInfo.Name, typeInfo.Name, GetLocalizedPlantStatus());

                        if (m_PlantStatus == PlantStatus.Plant)
                        {
                            list.Add(typeInfo.GetPlantLabelPlant(hueInfo), args);
                        }
                        else
                        {
                            list.Add(typeInfo.GetPlantLabelSeed(hueInfo), args);
                        }
                    }
                    else
                    {
                        args += String.Format("\t#{0}\t#{1}", typeInfo.PlantCategory == PlantCategory.Default ? hueInfo.Name : (int)typeInfo.PlantCategory, GetLocalizedPlantStatus());

                        list.Add(hueInfo.IsBright() ? 1060832 : 1060831, args);                           // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
                    }
                }
            }
        }