예제 #1
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                if (!manager.GetValue <ManagerCareer.AssignSelfEmployedOption, bool>())
                {
                    return(false);
                }
            }

            if ((mRequiredObjects == null) || (mRequiredObjects.Count == 0))
            {
                return(true);
            }

            if (newLot != null)
            {
                foreach (GameObject obj in newLot.GetObjects <GameObject>())
                {
                    if (Matches(obj.GetType()))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
예제 #2
0
        public bool Satisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                Occupation career = CareerManager.GetStaticOccupation(mCareer);
                if (career == null) return false;

                if ((GameUtils.IsFutureWorld()) && (!career.AvailableInFutureWorld)) return false;

                if (sim.IsEP11Bot)
                {
                    if (!sim.HasTrait(TraitNames.ProfessionalChip))
                    {
                        return false;
                    }
                }

                if (sim.CreatedSim != null)
                {
                    if ((sim.Occupation == null) || (sim.Occupation.Guid != mCareer))
                    {
                        GreyedOutTooltipCallback greyedOutTooltipCallback = null;
                        if (!career.CanAcceptCareer(sim.CreatedSim.ObjectId, ref greyedOutTooltipCallback)) return false;
                    }
                }
            }

            return PrivateSatisfies(manager, sim, newLot, inspecting);
        }
예제 #3
0
        protected override bool Allow(SimDescription sim)
        {
            Occupation job = Occupation;

            if (!ManagerCareer.ValidCareer(job))
            {
                IncStat("Invalid");
                return(false);
            }
            else if (sim.Service != null)
            {
                IncStat("On Call");
                return(false);
            }
            else if (sim.Genealogy == null)
            {
                IncStat("No Gene");
                return(false);
            }
            else if (SimTypes.IsDead(sim))
            {
                IncStat("Dead");
                return(false);
            }

            return(base.Allow(sim));
        }
예제 #4
0
        protected override bool AllowHouse(Household house)
        {
            if (ManagerCareer.HasSkillCareer(Sim, SkillNames.Handiness))
            {
                return(true);
            }

            if (ManagerCareer.HasSkillCareer(Household.ActiveHousehold, SkillNames.Handiness))
            {
                return(false);
            }

            bool succcess = false;

            foreach (SimDescription sim in HouseholdsEx.All(house))
            {
                if (ManagerFriendship.AreEnemies(sim, Sim, -25))
                {
                    return(false);
                }

                if (ManagerFriendship.AreFriends(sim, Sim, 25))
                {
                    succcess = true;
                }
            }

            return(succcess);
        }
예제 #5
0
        public static void Add <Type>(List <ITone> list, List <ITone> tones)
            where Type : class, ITone
        {
            if (tones == null)
            {
                return;
            }

            foreach (ITone displaytone in tones)
            {
                Type tone = displaytone as Type;
                if (tone != null)
                {
                    CareerTone careerTone = tone as CareerTone;
                    if (careerTone != null)
                    {
                        if (!ManagerCareer.VerifyTone(careerTone))
                        {
                            continue;
                        }
                    }

                    list.Add(tone as ITone);
                }
            }
        }
예제 #6
0
        protected override bool Allow(SimDescription sim)
        {
            if (!base.Allow(sim))
            {
                return(false);
            }

            if (!(sim.Occupation is Career))
            {
                IncStat("Not Career");
                return(false);
            }
            else if (!ManagerCareer.ValidCareer(sim.Occupation))
            {
                IncStat("No Career");
                return(false);
            }
            else if (sim.Occupation is Retired)
            {
                IncStat("Retired");
                return(false);
            }

            return(base.Allow(sim));
        }
예제 #7
0
        protected override bool Allow(SimDescription sim)
        {
            if (!ManagerCareer.ValidCareer(sim.Occupation))
            {
                IncStat("No Job");
                return(false);
            }
            else if (sim.Household == null)
            {
                IncStat("Homeless");
                return(false);
            }
            else if (SimTypes.IsSpecial(sim))
            {
                IncStat("Special");
                return(false);
            }
            else if (!Careers.Allow(this, sim))
            {
                IncStat("Careers Denied");
                return(false);
            }

            return(base.Allow(sim));
        }
예제 #8
0
        protected bool HasMetric(SimDescription sim)
        {
            if (ManagerCareer.HasSkillCareer(sim, SkillNames.Guitar))
            {
                return(sim.Occupation.CareerLevel >= (Music.LevelToGetPaidForConcerts - 3));
            }

            Career job = sim.Occupation as Career;

            if (job != null)
            {
                if (job.CurLevel == null)
                {
                    return(false);
                }

                foreach (PerfMetric metric in job.CurLevel.Metrics)
                {
                    if (metric is Music.MetricConcertsPerformed)
                    {
                        return(metric.CalcMetric(job) < 3);
                    }
                }
            }

            return(false);
        }
예제 #9
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            bool singedOutfit = false;

            try
            {
                if (Sim.CreatedSim.CurrentOutfitCategory == OutfitCategories.Singed)
                {
                    singedOutfit = true;
                }
            }
            catch (Exception e)
            {
                Common.DebugException(Sim, e);

                IncStat("Exception");
            }

            if (Sim.CreatedSim != null)
            {
                Sim.CreatedSim.BuffManager.RemoveElement(BuffNames.Singed);
                Sim.CreatedSim.BuffManager.RemoveElement(BuffNames.SingedElectricity);
            }

            if (singedOutfit)
            {
                ManagerSim.ChangeOutfit(Manager, Sim, OutfitCategories.Everyday);

                ManagerCareer.PerformStylistHelp(this, frame);
            }
            return(true);
        }
예제 #10
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            List <SimDescription> members = new List <SimDescription>(House.AllSimDescriptions);

            foreach (SimDescription sim in members)
            {
                if (sim.AssignedRole != null)
                {
                    if (!ManagerCareer.IsRegisterInstalled())
                    {
                        IncStat("Not Register");
                        return(true);
                    }

                    House.Remove(sim);

                    Household.NpcHousehold.Add(sim);

                    IncStat("Role Moved");
                }
            }

            if (HouseholdsEx.NumSims(House) == 0)
            {
                IncStat("House Empty");
                return(true);
            }

            return(false);
        }
예제 #11
0
        protected override bool ConfigureInteraction(RabbitHole.RabbitHoleInteraction <Sim, RabbitHole> wk, List <ITone> allTones)
        {
            if (ChatOnly)
            {
                // Search for the Meet new People tone
                foreach (ITone displaytone in allTones)
                {
                    MeetCoworkersTone careertone = displaytone as MeetCoworkersTone;
                    if (careertone == null)
                    {
                        continue;
                    }

                    if (ManagerCareer.VerifyTone(careertone))
                    {
                        try
                        {
                            wk.CurrentITone = careertone;
                            return(true);
                        }
                        catch (Exception e)
                        {
                            Common.DebugException(careertone.Name(), e);

                            wk.CurrentITone = null;
                        }
                    }
                    break;
                }

                // Search for the Hang with Coworkers tone
                foreach (ITone displaytone in allTones)
                {
                    HangWithCoworkersTone careertone = displaytone as HangWithCoworkersTone;
                    if (careertone == null)
                    {
                        continue;
                    }

                    if (ManagerCareer.VerifyTone(careertone))
                    {
                        try
                        {
                            wk.CurrentITone = careertone;
                            return(true);
                        }
                        catch (Exception e)
                        {
                            Common.DebugException(careertone.Name(), e);

                            wk.CurrentITone = null;
                        }
                    }
                    break;
                }
            }

            return(base.ConfigureInteraction(wk, allTones));
        }
예제 #12
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting) return true;

            if (sim.Occupation is Retired) return false;

            return (Sims3.Gameplay.Queries.CountObjects<AdminstrationCenter>() > 0);
        }
예제 #13
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting)
            {
                return(true);
            }

            return(ManagerSituation.FindRabbitHole(RabbitHoleType.PoliceStation) != null);
        }
예제 #14
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            Sim sim = Sim.CreatedSim;

            if (sim == null)
            {
                Sims.Instantiate(Sim, null, false);

                sim = Sim.CreatedSim;
            }

            if (sim == null)
            {
                IncStat("Hibernating");
                return(false);
            }

            Career job = Occupation as Career;

            Careers.VerifyTone(job);

            if (!ManagerCareer.ValidCareer(job))
            {
                IncStat("Career Invalidated");
                return(false);
            }

            InteractionInstance instance = GetWorkInteraction(job);

            if (instance == null)
            {
                IncStat("No Interaction");
                return(false);
            }
            else if (!Test(sim, instance.InteractionDefinition))
            {
                return(false);
            }
            else
            {
                if (sim.InteractionQueue.Add(instance))
                {
                    if (GetValue <AllowGoHomePushOption, bool>(Sim))
                    {
                        Manager.AddAlarm(new GoHomePushScenario(Sim));
                    }
                }
                else
                {
                    IncStat("Failure");
                }

                mReport = PostSlackerWarning();
                return(true);
            }
        }
예제 #15
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting) return true;

            if (sim.Occupation is Retired) return false;

            if (sim.Elder) return false;

            return (ManagerSituation.FindLotType(CommercialLotSubType.kEP2_FireStation) != null);
        }
예제 #16
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting) return true;
            
            if (sim.Occupation is Retired) return false;

            CareerLocation location = Career.FindClosestCareerLocation(sim, mCareer);
            if (location == null) return false;

            return true;
        }
예제 #17
0
        protected static void DropNonMatchingStudents(ManagerCareer manager, Common.IStatGenerator stats, Lot lot)
        {
            LotOptions lotOptions = manager.GetLotOptions(lot);

            foreach (RabbitHole hole in lot.GetObjects <RabbitHole>())
            {
                if (hole.CareerLocations == null)
                {
                    continue;
                }

                foreach (CareerLocation location in hole.CareerLocations.Values)
                {
                    if (location == null)
                    {
                        continue;
                    }

                    if (location.Career is School)
                    {
                        if (location.Workers == null)
                        {
                            continue;
                        }

                        foreach (SimDescription sim in new List <SimDescription>(location.Workers))
                        {
                            try
                            {
                                if (!lotOptions.AllowCastes(stats, sim))
                                {
                                    if (sim.CareerManager != null)
                                    {
                                        if (sim.CareerManager.School != null)
                                        {
                                            sim.CareerManager.School.LeaveJobNow(Career.LeaveJobReason.kJobBecameInvalid);
                                        }

                                        sim.CareerManager.School = null;
                                    }

                                    manager.Scenarios.Post(new ScheduledAssignSchoolScenario(sim));
                                }
                            }
                            catch (Exception e)
                            {
                                Common.Exception(sim, e);
                            }
                        }
                    }
                }
            }
        }
예제 #18
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting)
            {
                return(true);
            }

            if (sim.Occupation is Retired)
            {
                return(false);
            }

            return(Sims3.Gameplay.Queries.CountObjects <AdminstrationCenter>() > 0);
        }
예제 #19
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting)
            {
                return(true);
            }

            if (sim.Occupation is Retired)
            {
                return(false);
            }

            return(ManagerSituation.FindRabbitHole(RabbitHoleType.ScienceLab) != null);
        }
예제 #20
0
        protected override bool Allow(SimDescription sim)
        {
            if (Event.Career == null)
            {
                IncStat("No Career");
                return(false);
            }
            else if (!ManagerCareer.ValidCareer(Event.Career))
            {
                IncStat("No Job");
                return(false);
            }

            return(base.Allow(sim));
        }
예제 #21
0
        protected override bool Allow(SimDescription sim)
        {
            if (!Careers.Allow(this, sim))
            {
                IncStat("User Denied");
                return(false);
            }
            else if (!ManagerCareer.ValidCareer(sim.Occupation))
            {
                IncStat("No Career");
                return(false);
            }

            return(base.Allow(sim));
        }
예제 #22
0
        protected override bool Allow()
        {
            if (!GetValue <Option, bool> ())
            {
                return(false);
            }

            if (ManagerCareer.HasSkillCareer(Household.ActiveHousehold, SkillNames.Handiness))
            {
                IncStat("Active Repairman");
                return(false);
            }

            return(base.Allow());
        }
예제 #23
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            bool formalOutfit = false;

            try
            {
                if (Sim.CreatedSim.CurrentOutfitCategory == OutfitCategories.Formalwear)
                {
                    formalOutfit = true;
                }
            }
            catch (Exception e)
            {
                Common.DebugException(Sim, e);

                IncStat("Exception");
                return(false);
            }

            if (formalOutfit)
            {
                if (Party.IsInvolvedInAnyTypeOfParty(Sim.CreatedSim))
                {
                    IncStat("Party");
                    return(false);
                }
                else if (Sim.CreatedSim.CurrentInteraction is ICountsAsWorking)
                {
                    IncStat("Working");
                    return(false);
                }
                else if (PromSituation.IsHeadedToProm(Sim.CreatedSim))
                {
                    IncStat("Heading To Prom");
                    return(false);
                }
                else if (ManagerSituation.HasInteraction(Sim, PromSituation.GoToProm.Singleton))
                {
                    IncStat("At Prom");
                    return(false);
                }

                ManagerSim.ChangeOutfit(Manager, Sim, OutfitCategories.Everyday);

                ManagerCareer.PerformStylistHelp(this, frame);
            }
            return(true);
        }
예제 #24
0
파일: ManagerLot.cs 프로젝트: yakoder/NRaas
        public bool PassesHomeInspection(Common.IStatGenerator stats, Lot lot, ICollection <SimDescription> sims, FindLotFlags flags)
        {
            if (lot == null)
            {
                return(false);
            }

            Dictionary <HomeInspection.Reason, bool> existingResults = new Dictionary <HomeInspection.Reason, bool>();

            if (sims != null)
            {
                Dictionary <Household, bool> houses = new Dictionary <Household, bool>();

                foreach (SimDescription sim in sims)
                {
                    if ((sim.Household != null) && (!houses.ContainsKey(sim.Household)))
                    {
                        houses.Add(sim.Household, true);

                        if (sim.LotHome != null)
                        {
                            foreach (HomeInspection.Result result in new HomeInspection(sim.LotHome).Satisfies(HouseholdsEx.All(sim.Household)))
                            {
                                existingResults[result.mReason] = true;
                            }
                        }
                    }

                    if (sim.Occupation != null)
                    {
                        if (((flags & FindLotFlags.InspectCareerItems) == FindLotFlags.InspectCareerItems) && (GetValue <CareerObjectInspectionOption, bool>()))
                        {
                            DreamJob job = ManagerCareer.GetDreamJob(sim.Occupation.Guid);
                            if (job != null)
                            {
                                if (!job.Satisfies(Careers, sim, lot, true))
                                {
                                    stats.IncStat("Career Inspection Fail");
                                    return(false);
                                }
                            }
                        }
                    }
                }
            }

            return(PassesHomeInspection(stats, lot, existingResults.Keys, new HomeInspection(lot).Satisfies(sims), flags));
        }
예제 #25
0
            protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
            {
                if (base.PrivateSatisfies(manager, sim, newLot, inspecting))
                {
                    return(true);
                }

                if (!inspecting)
                {
                    return(Inventories.InventoryFindAll <Computer>(sim).Count > 0);
                }
                else
                {
                    return(false);
                }
            }
예제 #26
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting)
            {
                return(true);
            }

            if (sim.Occupation is Retired)
            {
                return(false);
            }

            if (sim.Elder)
            {
                return(false);
            }

            return(ManagerSituation.FindLotType(CommercialLotSubType.kEP2_FireStation) != null);
        }
예제 #27
0
            protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
            {
                if (base.PrivateSatisfies(manager, sim, newLot, inspecting))
                {
                    return(true);
                }

                RockBand skill = sim.SkillManager.GetSkill <RockBand>(SkillNames.RockBand);

                if (skill != null)
                {
                    if (!skill.HasBandInfo())
                    {
                        return(false);
                    }
                }

                return(false);
            }
예제 #28
0
        protected override bool Allow(SimDescription sim)
        {
            Career career = sim.Occupation as Career;

            if (career == null)
            {
                IncStat("No Job");
                return(false);
            }
            else if (career.CurLevel == null)
            {
                IncStat("No Level");
                return(false);
            }
            else if (career.CurLevel.LastLevel == null)
            {
                IncStat("First Level");
                return(false);
            }
            else if (career.CurLevel.LastLevel.NextLevels.Count <= 1)
            {
                IncStat("Not Branch");
                return(false);
            }

            if ((!GetValue <PromptOption, bool>()) || (!Careers.MatchesAlertLevel(Sim)))
            {
                List <DreamJob> dreams = ManagerCareer.GetDreamJob(Sim);
                if (dreams.Count == 0)
                {
                    IncStat("No Dream");
                    return(false);
                }
                else if (!DreamJob.Contains(dreams, career.Guid))
                {
                    IncStat("Wrong Job");
                    return(false);
                }
            }

            return(base.Allow(sim));
        }
예제 #29
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting)
            {
                return(true);
            }

            if (sim.Occupation is Retired)
            {
                return(false);
            }

            CareerLocation location = Career.FindClosestCareerLocation(sim, mCareer);

            if (location == null)
            {
                return(false);
            }

            return(true);
        }
예제 #30
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                if (sim.Occupation is Retired)
                {
                    return(false);
                }

                if (ManagerSituation.FindRabbitHole(RabbitHoleType.CityHall) == null)
                {
                    return(false);
                }
            }

            if ((newLot == null) || (newLot.CountObjects <DraftingTable>() == 0))
            {
                return(false);
            }

            return(true);
        }
예제 #31
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                if (sim.Occupation is Retired)
                {
                    return(false);
                }

                if (ManagerSituation.FindLotType(CommercialLotSubType.kEP2_Salon) == null)
                {
                    return(false);
                }
            }

            if ((newLot == null) || (newLot.CountObjects <DraftingTable>() == 0))
            {
                return(false);
            }

            return(true);
        }
예제 #32
0
        public bool Satisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                Occupation career = CareerManager.GetStaticOccupation(mCareer);
                if (career == null)
                {
                    return(false);
                }

                if ((GameUtils.IsFutureWorld()) && (!career.AvailableInFutureWorld))
                {
                    return(false);
                }

                if (sim.IsEP11Bot)
                {
                    if (!sim.HasTrait(TraitNames.ProfessionalChip))
                    {
                        return(false);
                    }
                }

                if (sim.CreatedSim != null)
                {
                    if ((sim.Occupation == null) || (sim.Occupation.Guid != mCareer))
                    {
                        GreyedOutTooltipCallback greyedOutTooltipCallback = null;
                        if (!career.CanAcceptCareer(sim.CreatedSim.ObjectId, ref greyedOutTooltipCallback))
                        {
                            return(false);
                        }
                    }
                }
            }

            return(PrivateSatisfies(manager, sim, newLot, inspecting));
        }
예제 #33
0
        protected override ICollection <SimDescription> GetSims()
        {
            List <SimDescription> allSims = ManagerSim.Matching(HouseholdsEx.Humans(mHouse), CASAgeGenderFlags.Teen | CASAgeGenderFlags.YoungAdult | CASAgeGenderFlags.Adult | CASAgeGenderFlags.Elder);
            List <SimDescription> sims    = new List <SimDescription>();

            foreach (SimDescription sim in allSims)
            {
                if (!ManagerCareer.HasSkillCareer(sim, SkillNames.Gardening))
                {
                    continue;
                }

                sims.Add(sim);
            }

            if (sims.Count == 0)
            {
                return(allSims);
            }
            else
            {
                return(sims);
            }
        }
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            Dictionary <CareerLocation, JobNeed> locations = new Dictionary <CareerLocation, JobNeed>();

            foreach (SimDescription sim in Careers.Employed)
            {
                Career career = sim.Occupation as Career;
                if (career == null)
                {
                    continue;
                }

                if (ManagerCareer.IsPlaceholderCareer(career))
                {
                    continue;
                }

                if (career.CareerLoc == null)
                {
                    continue;
                }

                if (!NewBossScenario.NeedsBoss(career, true))
                {
                    continue;
                }

                if ((career.Boss == null) && (career.CurLevel.NextLevels.Count > 0))
                {
                    JobNeed need;
                    if (!locations.TryGetValue(career.CareerLoc, out need))
                    {
                        need = new JobNeed();
                        locations.Add(career.CareerLoc, need);
                    }

                    if (SimTypes.IsSelectable(sim))
                    {
                        need.mNeed += 10;
                    }
                    else
                    {
                        need.mNeed++;
                    }

                    if ((need.Sim == null) || (need.Sim.Occupation.CareerLevel < sim.Occupation.CareerLevel))
                    {
                        need.Sim = sim;
                    }
                }
            }

            int maxNeed = 0;

            foreach (JobNeed need in locations.Values)
            {
                if ((mRequirement.mCareerSim == null) || (maxNeed < need.mNeed))
                {
                    maxNeed = need.mNeed;
                    mRequirement.mCareerSim = need.Sim;
                }
            }

            return(true);
        }
예제 #35
0
 protected abstract bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting);
예제 #36
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                if (sim.Occupation is Retired) return false;

                if (ManagerSituation.FindLotType(CommercialLotSubType.kEP2_Salon) == null) return false;
            }

            if ((newLot == null) || (newLot.CountObjects<DraftingTable>() == 0)) return false;

            return true;
        }
예제 #37
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting) return true;

            return (ManagerSituation.FindRabbitHole(RabbitHoleType.PoliceStation) != null);
        }
예제 #38
0
            protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
            {
                if (base.PrivateSatisfies(manager, sim, newLot, inspecting)) return true;

                if (!inspecting)
                {
                    return (Inventories.InventoryFindAll<Computer>(sim).Count > 0);
                }
                else
                {
                    return false;
                }
            }
예제 #39
0
            protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
            {
                if (base.PrivateSatisfies(manager, sim, newLot, inspecting)) return true;

                RockBand skill = sim.SkillManager.GetSkill<RockBand>(SkillNames.RockBand);
                if (skill != null)
                {
                    if (!skill.HasBandInfo()) return false;
                }

                return false;
            }
예제 #40
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                if (!manager.GetValue<ManagerCareer.AssignSelfEmployedOption, bool>()) return false;
            }

            if ((mRequiredObjects == null) || (mRequiredObjects.Count == 0)) return true;

            if (newLot != null)
            {
                foreach (GameObject obj in newLot.GetObjects<GameObject>())
                {
                    if (Matches(obj.GetType())) return true;
                }
            }

            return false;
        }
예제 #41
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (inspecting) return true;

            if (sim.Occupation is Retired) return false;

            return (ManagerSituation.FindRabbitHole(RabbitHoleType.ScienceLab) != null);
        }
예제 #42
0
        protected override bool PrivateSatisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                if (sim.Occupation is Retired) return false;

                if (ManagerSituation.FindRabbitHole(RabbitHoleType.CityHall) == null) return false;
            }

            if ((newLot == null) || (newLot.CountObjects<DraftingTable>() == 0)) return false;

            return true;
        }