예제 #1
0
        public bool GeneratePreviewJob(CareerStatus status, CareerStatus.State state)
        {
            bool  flag               = status.GetStarRating() >= 5f || UnityEngine.Random.Range(0, 100) > 50;
            int   num                = LevelProgression.GetZeroIndexedLevel(state.m_kudos) + 1;
            int   minKudos           = (!flag) ? state.m_kudos : LevelProgression.GetThreshold(num);
            int   maxKudos           = (!flag) ? state.m_kudos : LevelProgression.GetThreshold(num + 1);
            float minStarRating      = (!flag) ? (status.GetStarRating() + 0.1f) : 0f;
            float maxStarRating      = (!flag) ? (status.GetStarRating() + 1f) : 0f;
            bool  includeStory       = false;
            bool  expandRatingSearch = false;
            Job   job                = status.m_career.GenerateJob(minKudos, maxKudos, minStarRating, maxStarRating, includeStory, state.m_completedJobs, status.GetCurrentJobDesc(), state.m_generatedJobs, expandRatingSearch);

            if (job != null)
            {
                ModLogs.Log("Budget from " + job.GetDesc().m_from + " value $" + job.m_budget);
                job.m_budget = job.m_budget + ((job.m_budget * percentage) / 100);
                status.AddJob(job);
                return(true);
            }
            return(false);
        }