Пример #1
0
        public int GetLabel(out string args)
        {
            PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
            PlantHueInfo  hueInfo  = PlantHueInfo.GetInfo(m_PlantHue);

            int title;

            if (m_ShowType || typeInfo.PlantCategory == PlantCategory.Default)
            {
                if (typeInfo.PlantCategory >= PlantCategory.Common && typeInfo.PlantCategory <= PlantCategory.Exotic)
                {
                    title = (int)typeInfo.PlantCategory;
                }
                else
                {
                    title = hueInfo.Name;
                }
            }
            else
            {
                title = (int)typeInfo.PlantCategory;
            }

            if (Amount == 1)
            {
                if (m_ShowType)
                {
                    args = string.Format("#{0}\t#{1}", title, typeInfo.Name);
                    return(typeInfo.GetSeedLabel(hueInfo));
                }
                else
                {
                    args = string.Format("#{0}", title);
                    return(hueInfo.IsBright() ? 1060839 : 1060838); // [bright] ~1_val~ seed
                }
            }
            else
            {
                if (m_ShowType)
                {
                    args = string.Format("{0}\t#{1}\t#{2}", Amount, title, typeInfo.Name);
                    return(typeInfo.GetSeedLabelPlural(hueInfo));
                }
                else
                {
                    args = string.Format("{0}\t#{1}", Amount, title);
                    return(hueInfo.IsBright() ? 1113491 : 1113490); // ~1_amount~ [bright] ~2_val~ seeds
                }
            }
        }