Inheritance: Common.FunctionTask
コード例 #1
0
        public static void Add(SimDescription sim, MiniSimDescription miniSim)
        {
            sChecks.Add(new Check(sim, miniSim));

            if (sTask == null)
            {
                sTask = new AgingCheckTask();            
                sTask.AddToSimulator();
            }
        }
コード例 #2
0
ファイル: AgingCheckTask.cs プロジェクト: pepoluan/NRaas
        public static void Add(SimDescription sim, MiniSimDescription miniSim)
        {
            sChecks.Add(new Check(sim, miniSim));

            if (sTask == null)
            {
                sTask = new AgingCheckTask();
                sTask.AddToSimulator();
            }
        }
コード例 #3
0
ファイル: SimDescriptionEx.cs プロジェクト: pepoluan/NRaas
        public static void MergeTravelInformation(SimDescription ths, MiniSimDescription msd, Dictionary <ulong, SimDescription> allSims)
        {
            Common.StringBuilder msg = new Common.StringBuilder("MergeTravelInformation " + ths.FullName + Common.NewLine);

            msg += "A";
            Traveler.InsanityWriteLog(msg);

            foreach (MiniRelationship relationship in msd.MiniRelationships)
            {
                SimDescription y = null;
                if (!allSims.TryGetValue(relationship.SimDescriptionId, out y))
                {
                    y = SimDescription.Find(relationship.SimDescriptionId);
                }

                if (y != null)
                {
                    Relationship unsafely = null;

                    try
                    {
                        unsafely = Relationship.GetUnsafely(ths, y);
                    }
                    catch (Exception e)
                    {
                        Common.Exception(ths, e);
                    }

                    if (unsafely != null)
                    {
                        float change = relationship.Value - unsafely.LTR.Liking;
                        if (change != 0f)
                        {
                            unsafely.LTR.UpdateLiking(change);
                        }
                        RomanceVisibilityState.MergeTravelInformationOnTravelBackHome(relationship, unsafely);
                    }
                }
            }

            msg += "B";
            Traveler.InsanityWriteLog(msg);

            ths.CASGenealogy = msd.CASGenealogy;

            AgingCheckTask.Add(ths, msd);

            msg += "C";
            Traveler.InsanityWriteLog(msg);
        }
コード例 #4
0
 public void OnWorldQuit()
 {
     sTask = null;
     sChecks.Clear();
 }
コード例 #5
0
 public void OnWorldQuit()
 {
     sTask = null;
     sChecks.Clear();
 }