示例#1
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);
        }
示例#2
0
            public override bool Test(Sim actor, Lot target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (!Aliens.Settings.Debugging)
                {
                    return(false);
                }

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

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

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

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

                return(true);
            }
示例#3
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);
        }