示例#1
0
        // Methods
        public static OmniJournal CreateOutOfWorld(OmniJournalData data, SimDescription Actor)
        {
            OmniJournal journal = ObjectCreation.CreateObject(0x6694B72C99D44369, ProductVersion.BaseGame, null) as OmniJournal;

            if (journal == null)
            {
                return(null);
            }

            journal.Data            = data.Clone();
            journal.mJournalEdition = data.CurrentEdition + SimClock.ElapsedCalendarDays();
            journal.Data.ID         = data.ID + journal.mJournalEdition;

            Career career = Actor.Occupation as Career;

            if (career != null)
            {
                journal.mBookCareer = career.SharedData.Name;
            }

            journal.mBookLevelId  = Actor.Occupation.CareerLevel;
            journal.mBookId       = journal.Data.ID;
            journal.mOwner        = Actor;
            journal.mUpdatedToday = true;
            journal.SetGeometryState(journal.Data.GeometryState);
            journal.SetMaterial(journal.Data.MaterialState);
            return(journal);
        }
示例#2
0
        public void UpdateJournal(Career job)
        {
            if (!mUpdatedToday)
            {
                if (job.SharedData == null)
                {
                    return;
                }

                mUpdatedToday = true;
                OmniJournalData data = OmniJournalData.GetJournalData(job.SharedData.Name, job.CareerLevel);

                if (data != null)
                {
                    data = data.Clone();
                    if (data != null)
                    {
                        mJournalEdition = data.CurrentEdition + SimClock.ElapsedCalendarDays();
                        base.Data       = data;
                        base.Data.ID    = data.ID + mJournalEdition;
                        base.BookId     = base.Data.ID;

                        mBookCareer  = job.SharedData.Name;
                        mBookLevelId = job.CareerLevel;
                    }
                }
            }
        }
示例#3
0
 public override void OnLoad()
 {
     try
     {
         OmniJournalData data = OmniJournalData.GetJournalData(mBookCareer, mBookLevelId);
         if (data != null)
         {
             base.Data    = data.Clone();
             base.Data.ID = base.Data.ID + this.mJournalEdition;
         }
     }
     catch (Exception e)
     {
         Common.Exception(mBookCareer + " - " + mBookLevelId, e);
     }
 }