예제 #1
0
            public override bool Get(MiniSimDescription me, IMiniSimDescription actor, Dictionary <int, int> results)
            {
                int level = Genealogies.GetFamilyLevel(me.CASGenealogy);

                results[level] = level;
                return(true);
            }
예제 #2
0
        protected override void PrivatePerformAction(bool prompt)
        {
            try
            {
                Overwatch.Log("Cleanse The Dead");

                Dictionary <SimDescription, Pair <IMausoleum, Urnstone> > urnstones = new Dictionary <SimDescription, Pair <IMausoleum, Urnstone> >();
                CommonSpace.Helpers.CleanseTheDead.Retrieve(urnstones);

                List <SimDescription> choices = new List <SimDescription>();

                if (Overwatch.Settings.mCompressFamilyLevel > 0)
                {
                    foreach (SimDescription choice in urnstones.Keys)
                    {
                        if (Genealogies.GetFamilyLevel(choice.Genealogy) >= Overwatch.Settings.mCompressFamilyLevel)
                        {
                            choices.Add(choice);
                        }
                    }
                }
                else
                {
                    choices.AddRange(urnstones.Keys);
                }

                CommonSpace.Helpers.CleanseTheDead.Cleanse(choices, urnstones, true, Overwatch.Log);

                if ((choices.Count > 0) || (prompt))
                {
                    Overwatch.AlarmNotify(Common.Localize("CleanseTheDead:Complete", false, new object[] { choices.Count }));
                }
            }
            catch (Exception e)
            {
                Common.Exception(Name, e);
            }
        }