示例#1
0
        protected string GetDetails()
        {
            List <Item> choices = new List <Item>();

            IEnumerable <SimPersonality> personalities = SP::NRaas.StoryProgression.Main.Personalities.AllPersonalities;

            foreach (SimPersonality personality in personalities)
            {
                if (personality.IsLeaderless)
                {
                    continue;
                }

                choices.Add(new Item(personality));
            }

            CommonSelection <Item> .Results results = new CommonSelection <Item>(Name, choices).SelectMultiple();

            string msg = null;

            foreach (Item choice in results)
            {
                SimPersonality personality = choice.Value;

                msg += Common.NewLine + personality.GetLocalizedName();

                if (personality.Me != null)
                {
                    msg += Common.Localize(GetTitlePrefix() + ":Leader", personality.Me.IsFemale, personality.IsFemaleLocalization(), new object[] { personality.Me });
                }
                else
                {
                    msg += Common.Localize(GetTitlePrefix() + ":NoLeader", personality.IsFemaleLocalization());
                }

                int memberCount = personality.GetClanMembers(false).Count;
                if (memberCount > 0)
                {
                    msg += Common.Localize(GetTitlePrefix() + ":Members", personality.IsFemaleLocalization(), new object[] { memberCount });
                }

                Dictionary <SimDescription, bool> opponents = new Dictionary <SimDescription, bool>();

                foreach (SimPersonality opponent in personalities)
                {
                    if (opponent.IsOpposing(personality))
                    {
                        foreach (SimDescription sim in opponent.GetClanMembers(true))
                        {
                            if (opponents.ContainsKey(sim))
                            {
                                continue;
                            }

                            opponents.Add(sim, true);
                        }
                    }
                }

                if (opponents.Count > 0)
                {
                    msg += Common.Localize(GetTitlePrefix() + ":Opposing", personality.IsFemaleLocalization(), new object[] { opponents.Count });
                }

                msg += Common.NewLine;
            }

            return(msg);
        }
示例#2
0
 public Item(SimPersonality personality)
     : base(personality.GetTitlePrefix(SP::NRaas.StoryProgressionSpace.ManagerProgressionBase.PrefixType.Pure), personality.GetLocalizedName(), personality.GetClanMembers(true).Count)
 {
 }