示例#1
0
        public ServiceSettingKey(Sims3.Gameplay.Services.Service service, CASAgeGenderFlags flags, int poolSetting, int serviceCost, bool reoccur, bool bots)
        {
            type        = service.ServiceType;
            validAges  |= flags;
            poolSetting = numInPool;
            cost        = serviceCost;
            reoccuring  = reoccur;
            useBots     = bots;

            tuningDefault = new ServiceSettingKey(service);
        }
示例#2
0
        public ServiceSettingKey(Sims3.Gameplay.Services.Service service)
        {
            type       = service.ServiceType;
            validAges  = Sims3.Gameplay.Services.ServiceNPCSpecifications.GetAppropriateAges(service.ServiceType.ToString());
            numInPool  = service.Tuning.kMaxNumNPCsInPool;
            cost       = service.Tuning.kCost;
            reoccuring = service.Tuning.kIsRecurrent;
            useBots    = Sims3.Gameplay.Services.ServiceNPCSpecifications.ShouldUseServobot(service.ServiceType.ToString());

            ServiceNPCSpecifications.ServiceSpecifications spec;
            if (ServiceNPCSpecifications.sServiceSpecifications.TryGetValue(service.ServiceType.ToString(), out spec))
            {
                uniforms = spec.Uniforms;
            }
        }
示例#3
0
        public void SetSettings(Sims3.Gameplay.Services.Service service)
        {
            if (Register.Settings.serviceSettings.ContainsKey(service.ServiceType))
            {
                Register.Settings.serviceSettings[service.ServiceType] = this;
            }
            else
            {
                this.tuningDefault = new ServiceSettingKey(service);
                Register.Settings.serviceSettings.Add(service.ServiceType, this);
            }

            Register.InitDefaultServiceTunings();
            ServiceCleanup.Task.Perform();
            ServicePoolCleanup.Task.Perform();
        }