Example #1
0
            public override bool Test(Sim a, AthleticGameObject target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (isAutonomous)
                {
                    if (TrainableSim.Service != null)
                    {
                        return(false);
                    }
                }

                if (SkillBasedCareerBooter.GetSkillBasedCareer(a, SkillNames.Athletic) == null)
                {
                    return(false);
                }

                if ((!target.CanObjectTrainSim() || (a.SkillManager.GetSkillLevel(SkillNames.Athletic) >= AthleticGameObject.TrainSim.AthleticSkillLevelGate)) || ((target.ActorsUsingMe.Count != 0x0) || isAutonomous))
                {
                    return(false);
                }

                if (target.Cardio)
                {
                    return(AthleticGameObject.WorkOut.CardioSingleton.CreateInstance(target, TrainableSim, a.InheritedPriority(), false, true).Test());
                }
                return(AthleticGameObject.WorkOut.StrengthSingleton.CreateInstance(target, TrainableSim, a.InheritedPriority(), false, true).Test());
            }
Example #2
0
            public override bool Test(Sim a, AthleticGameObject target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (isAutonomous)
                {
                    if (TrainableSim.Service != null) return false;
                }

                if (SkillBasedCareerBooter.GetSkillBasedCareer(a, SkillNames.Athletic) == null)
                {
                    return false;
                }

                if ((!target.CanObjectTrainSim() || (a.SkillManager.GetSkillLevel(SkillNames.Athletic) >= AthleticGameObject.TrainSim.AthleticSkillLevelGate)) || ((target.ActorsUsingMe.Count != 0x0) || isAutonomous))
                {
                    return false;
                }

                if (target.Cardio)
                {
                    return AthleticGameObject.WorkOut.CardioSingleton.CreateInstance(target, TrainableSim, a.InheritedPriority(), false, true).Test();
                }
                return AthleticGameObject.WorkOut.StrengthSingleton.CreateInstance(target, TrainableSim, a.InheritedPriority(), false, true).Test();
            }
Example #3
0
        public static bool TestObject(AthleticGameObject obj)
        {
            if (obj.InUse)
            {
                return(false);
            }

            if (!obj.CanObjectTrainSim())
            {
                return(false);
            }

            if (obj.LotCurrent == null)
            {
                return(false);
            }

            if (!obj.InWorld)
            {
                return(false);
            }

            return(true);
        }