using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RimWorld;
using Verse;
using UnityEngine;
using RimWorld.Planet;

namespace ErinsWildlifeLetter
{
    public class UpdateNotice : MapComponent
    {

       
       
        public UpdateNotice(Map map) : base(map)
        {

        }

        

        public override void MapComponentTick()
        {
            base.MapComponentTick();
            if (!Current.Game.GetComponent<UpdateNoticeGlobal>().sentUpdateLetterGlobal)
            {
                if (ModLister.HasActiveModWithName("Erin's Critter Collection")||ModLister.HasActiveModWithName("Forest Critters"))
                {
                   
                    Find.LetterStack.ReceiveLetter("Erin_UpdateLetterLabel".Translate(), "Erin_UpdateLetterText".Translate(), DefDatabase<LetterDef>.GetNamed("Erin_UpdateLetter"));

                }
                Current.Game.GetComponent<UpdateNoticeGlobal>().sentUpdateLetterGlobal = true;
            }

           
        }


    }


}

