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); }
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; } }
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(); }