Beispiel #1
0
            public override bool Test(Sim a, WeddingArch target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                try
                {
                    SimDescription partner = a.Partner;
                    if (partner == null)
                    {
                        return(false);
                    }
                    Sim createdSim = partner.CreatedSim;
                    if ((createdSim == null) || !a.IsEngaged)
                    {
                        return(false);
                    }
                    if (createdSim.LotCurrent != target.LotCurrent)
                    {
                        greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(WeddingArch.LocalizeString(a.IsFemale, "FianceNotOnLot", new object[] { createdSim }));
                        return(false);
                    }

                    string reason;
                    if (!CommonSocials.CanGetRomantic(a, createdSim, false, false, true, ref greyedOutTooltipCallback, out reason))
                    {
                        return(false);
                    }

                    return(CommonSocials.CanGetMarriedNow(a, createdSim, isAutonomous, false, ref greyedOutTooltipCallback));
                }
                catch (Exception e)
                {
                    Common.Exception(a, target, e);
                    return(false);
                }
            }