Ejemplo n.º 1
0
 public override void PopulateExamineList(List <WIExamineInfo> examine)
 {
     Props.Revealed = true;
     Props.NumTimesEncountered++;
     Props.EncounteredTimesOfYear |= WorldClock.SeasonCurrent;
     Plants.Examine(Props, examine);
 }
Ejemplo n.º 2
0
        public override void PushSelectedObjectToViewer()
        {
            //turn this into a string builder
            Color         plantColor = Colors.ColorFromString(mSelectedObject.CommonName, 100);
            List <string> detailText = new List <string>();

            mExamineInfo.Clear();

            Skill            examineSkill      = null;
            GenericWorldItem dopplegangerProps = null;

            if (Skills.Get.SkillByName("Gathering", out examineSkill))
            {
                bool showDetails = false;
                Plants.Examine(mSelectedObject, mExamineInfo);
                detailText.Add("Viewing season " + WorldClock.TimeOfYearToString(SelectedSeasonality));
                if (Flags.Check((uint)mSelectedObject.EncounteredTimesOfYear, (uint)SelectedSeasonality, Flags.CheckType.MatchAny) ||
                    examineSkill.State.NormalizedUsageLevel > Plants.MinimumGatheringSkillToRevealBasicProps)
                {
                    showDetails                   = true;
                    dopplegangerProps             = mPlantDoppleganger;
                    dopplegangerProps.Subcategory = mSelectedObject.Name;
                }
                else
                {
                    detailText.Add("(You don't know what this plant looks like during this time of year.)");
                }
                detailText.Add("_");
                for (int i = 0; i < mExamineInfo.Count; i++)
                {
                    if (examineSkill.State.NormalizedUsageLevel > mExamineInfo[i].RequiredSkillUsageLevel)
                    {
                        detailText.Add(mExamineInfo[i].StaticExamineMessage);
                    }
                    else
                    {
                        detailText.Add(mExamineInfo[i].ExamineMessageOnFail);
                    }
                }
                string finalDetailText = detailText.JoinToString("\n");
                GUIDetailsPage.Get.DisplayDetail(
                    this,
                    mSelectedObject.CommonName,
                    finalDetailText,
                    "PlantIcon",
                    Mats.Get.IconsAtlas,
                    plantColor,
                    Color.white,
                    dopplegangerProps);
                if (showDetails)
                {
                    GUIDetailsPage.Get.DisplayDopplegangerButton("Next Season", "OnClickNextSeason", gameObject);
                }
            }
        }
Ejemplo n.º 3
0
 public override void PopulateExamineList(List <WIExamineInfo> examine)
 {
     if (!HasPlantProps)
     {
         if (!Plants.Get.PlantProps(State.PlantName, ref Props))
         {
             Debug.LogError("Couldn't get plant props " + State.PlantName);
             return;
         }
     }
     Props.Revealed = true;
     Props.NumTimesEncountered++;
     Props.EncounteredTimesOfYear |= WorldClock.SeasonCurrent;
     Plants.Examine(Props, examine);
 }