예제 #1
0
        protected override bool TargetAllow(SimDescription target)
        {
            if (!Romances.Allow(this, Sim, target))
            {
                return(false);
            }
            if (MarriageBaseScenario.TestForChildBlock(Sim, target))
            {
                IncStat("Child Are Married");
                return(false);
            }
            else
            {
                SimData targetData = GetData(target);

                if (targetData.HasAnyValue <ArrangedMarriageCasteOption, CasteOptions>())
                {
                    if (!targetData.Contains <ArrangedMarriageCasteOption>(GetData(Sim).Castes))
                    {
                        IncStat("Target Caste Fail");
                        return(false);
                    }
                }
            }

            return(base.TargetAllow(target));
        }