コード例 #1
0
ファイル: Seed.cs プロジェクト: alucardxlx/Shards-of-Nagash
        private int GetLabel(out string args)
        {
            PlantHueInfo hueInfo = PlantHueInfo.GetInfo(this.m_PlantHue);

            int title = PlantTypeInfo.GetBonsaiTitle(this.m_PlantType);

            if (title == 0) // Not a bonsai
            {
                title = hueInfo.Name;
            }
            if (this.m_PlantType == PlantType.CocoaTree)
            {
                title = 1080529;
            }

            int label;

            if (this.Amount == 1)
            {
                label = this.m_ShowType ? 1061917 : 1060838; // ~1_COLOR~ ~2_TYPE~ seed : ~1_val~ seed
            }
            else
            {
                label = this.m_ShowType ? 1113492 : 1113490; // ~1_amount~ ~2_color~ ~3_type~ seeds : ~1_amount~ ~2_val~ seeds
            }
            if (hueInfo.IsBright())
            {
                ++label;
            }

            StringBuilder ab = new StringBuilder();

            if (this.Amount != 1)
            {
                ab.Append(this.Amount);
                ab.Append('\t');
            }

            ab.Append('#');
            ab.Append(title);

            if (this.m_ShowType)
            {
                PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(this.m_PlantType);

                ab.Append("\t#");
                ab.Append(typeInfo.Name);
            }

            args = ab.ToString();

            return(label);
        }
コード例 #2
0
ファイル: Seed.cs プロジェクト: mguerine/runuo-ws
        public override void AddNameProperty(ObjectPropertyList list)
        {
            PlantHueInfo hueInfo = PlantHueInfo.GetInfo(m_PlantHue);

            int title = PlantTypeInfo.GetBonsaiTitle(m_PlantType);

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

            if (m_ShowType)
            {
                PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
                list.Add(hueInfo.IsBright() ? 1061918 : 1061917, String.Concat("#", title.ToString(), "\t#", typeInfo.Name.ToString()));                     // [bright] ~1_COLOR~ ~2_TYPE~ seed
            }
            else
            {
                list.Add(hueInfo.IsBright() ? 1060839 : 1060838, String.Concat("#", title.ToString()));                     // [bright] ~1_val~ seed
            }
        }
コード例 #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 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)
                {
                    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
                {
                    // 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);

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