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

                if (Household.AlienHousehold == null)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Alien household does not exist.");
                    return(false);
                }

                if (AlienUtilsEx.GetValidAliens() == null)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("No valid abductors.");
                    return(false);
                }

                if (AlienUtils.IsHouseboatAndNotDocked(target))
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Houseboat is not docked.");
                    return(false);
                }

                if (!AlienUtilsEx.CanASimBeAbducted(target))
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("No valid abductees.");
                    return(false);
                }

                return(true);
            }
예제 #2
0
        public override bool Run()
        {
            if (Target == null)
            {
                return(false);
            }

            List <SimDescription> aliens = AlienUtilsEx.GetValidAliens();
            Lot lot = Target.LotCurrent;

            if (aliens == null)
            {
                Common.DebugNotify("DEBUG - Abduct Sim: No valid aliens");
                return(false);
            }

            if (lot == null)
            {
                Common.DebugNotify("DEBUG - Abduct Sim: Target's current lot is null");
                return(false);
            }

            SimDescription alien = RandomUtil.GetRandomObjectFromList(aliens);

            AlienAbductionSituationEx.Create(alien, Target, lot);

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

            List <SimDescription> aliens    = AlienUtilsEx.GetValidAliens();
            List <Sim>            abductees = AlienUtilsEx.GetValidAbductees(Target);

            if (aliens == null)
            {
                Common.DebugNotify("DEBUG - Trigger Abduction: No valid aliens.");
                return(false);
            }

            if (abductees == null)
            {
                Common.DebugNotify("DEBUG - Trigger Abduction: No valid abductees.");
                return(false);
            }

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

            AlienAbductionSituationEx.Create(alien, abductee, Target);

            return(true);
        }
예제 #4
0
        public override bool Run()
        {
            if (Target == null)
            {
                return(false);
            }

            List <SimDescription> aliens = AlienUtilsEx.GetValidAliens();
            SimDescription        alien  = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);

            List <Sim> abductees = AlienUtilsEx.GetValidAbductees(Target);
            Sim        abductee  = RandomUtil.GetRandomObjectFromList <Sim>(abductees);

            AlienAbductionSituationEx.Create(alien, abductee, Target);

            return(true);
        }
예제 #5
0
            public override bool Test(Sim actor, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (!Aliens.Settings.Debugging)
                {
                    return(false);
                }

                if (Household.AlienHousehold == null)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Alien household is null.");
                    return(false);
                }

                if (AlienUtils.IsHouseboatAndNotDocked(target.LotCurrent))
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Target is on an undocked houseboat.");
                    return(false);
                }

                if (AlienUtilsEx.GetValidAliens() == null)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("No valid aliens.");
                    return(false);
                }

                if (!target.SimDescription.IsHuman)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Target is not human.");
                    return(false);
                }

                if (target.SimDescription.ChildOrBelow)
                {
                    greyedOutTooltipCallback = CreateTooltipCallback("Target is not teen or older.");
                    return(false);
                }

                return(true);
            }