/// <summary>
        /// Initializes a new instance of the <see cref="StandardServiceSettings"/> class.
        /// </summary>
        /// <param name="serviceType">Type of the service.</param>
        public StandardServiceSettings(SerializableSettings.ServiceType serviceType) : base(serviceType)
        {
            switch (serviceType)
            {
            case SerializableSettings.ServiceType.DeathCare:
                this.VehicleNamePlural = "Hearses";
                this.EmptiableServiceBuildingNamePlural = "Cemeteries";
                this.MaterialName      = "Dead People";
                this.CanAutoEmpty      = true;
                this.CanRemoveFromGrid = true;
                break;

            case SerializableSettings.ServiceType.Garbage:
                this.VehicleNamePlural = "Garbage Trucks";
                this.EmptiableServiceBuildingNamePlural = "Landfills";
                this.MaterialName = "Garbage";
                this.CanAutoEmpty = true;
                this.CanLimitOpportunisticCollection    = true;
                this.OpportunisticCollectionLimitDetour = Detours.Methods.GarbageTruckAI_TryCollectGarbage;
                this.UseMinimumAmountForDispatch        = true;
                this.UseMinimumAmountForPatrol          = true;
                break;

            case SerializableSettings.ServiceType.HealthCare:
                this.VehicleNamePlural = "Ambulances";
                this.MaterialName      = "Sick People";
                this.CanRemoveFromGrid = true;
                break;

            default:
                throw new InvalidOperationException("Not a standard service: " + serviceType.ToString());
            }
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HiddenServiceSettings"/> class.
        /// </summary>
        /// <param name="serviceType">Type of the service.</param>
        public HiddenServiceSettings(SerializableSettings.ServiceType serviceType) : base(serviceType)
        {
            switch (serviceType)
            {
            case SerializableSettings.ServiceType.WreckingCrews:
                this.VehicleNamePlural = "Bulldozers";
                break;

            case SerializableSettings.ServiceType.RecoveryCrews:
                this.VehicleNamePlural   = "Recovery Services";
                this.VehicleNameSingular = "Recovery";
                break;

            default:
                throw new InvalidOperationException("Not a hidden service: " + serviceType.ToString());
            }
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceSettings"/> class.
 /// </summary>
 /// <param name="serviceType">Type of the service.</param>
 public ServiceSettings(SerializableSettings.ServiceType serviceType)
 {
     this.serviceType = serviceType;
 }