using RimWorld;
using Verse;
using rjw;

namespace SCE
{
    public class PreceptComp_Taboo_Bestiality : PreceptComp_Taboo
    {
        public bool? venerated;

        protected override bool BrokeTabooInt(Pawn pawn, HistoryEvent ev, Precept precept)
        {
            if (!base.BrokeTabooInt(pawn, ev, precept))
            {
                return false;
            }

            if (!venerated.HasValue)
            {
                return true;
            }

            var props = ev.args.GetArg<SexProps>(SCEHistoryEventArgNames.SexProps);
            return !venerated.Value ^ precept.ideo.IsVeneratedAnimal(props.partner);
        }
    }
}