示例#1
0
            public override bool Test(Sim actor, Lot target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (!Abductor.Settings.mDebugging)
                {
                    return(false);
                }

                if (Household.AlienHousehold == null || Household.AlienHousehold.NumMembers == 0)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Alien Household Null or Empty");
                    return(false);
                }

                if (AlienUtilsEx.GetAliens() == null)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("No Valid Aliens");
                    return(false);
                }

                if (AlienUtils.IsHouseboatAndNotDocked(target))
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Houseboat Not Docked");
                    return(false);
                }

                if (AlienUtilsEx.GetAbductees(target) == null)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("No Valid Abductees");
                    return(false);
                }

                return(true);
            }
示例#2
0
        public override bool Run()
        {
            List <SimDescription> aliens = AlienUtilsEx.GetAliens();

            if (aliens == null)
            {
                Logger.Append("Debug - Trigger Alien Abduction: No Aliens");
                return(false);
            }

            List <Sim> abductees = AlienUtilsEx.GetAbductees(Target);

            if (abductees == null)
            {
                Logger.Append("Debug - Trigger Alien Abduction: No Abductees");
                return(false);
            }

            Sim            abductee = RandomUtil.GetRandomObjectFromList <Sim>(abductees);
            SimDescription alien    = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);

            if (!AlienUtilsEx.CanSimBeAbducted(abductee))
            {
                Logger.Append("Debug - Trigger Alien Abduction: Can't Abduct Sim");
                return(false);
            }

            AlienAbductionSituationEx.Create(alien, abductee, Target);

            return(true);
        }
示例#3
0
        public override bool Run()
        {
            if (Target == null)
            {
                return(false);
            }

            List <SimDescription> aliens    = AlienUtilsEx.GetAliens();
            List <Sim>            abductees = AlienUtilsEx.GetAbductees(Target);

            SimDescription alien    = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);
            Sim            abductee = RandomUtil.GetRandomObjectFromList <Sim>(abductees);

            AlienAbductionSituationEx.Create(alien, abductee, Target);

            return(true);
        }