コード例 #1
0
ファイル: AuditorService.cs プロジェクト: OlegGelezcov/boscs
        private double GetAuditorPriceBase(GeneratorInfo generator)
        {
            var    secretaryData     = ResourceService.SecretaryDataRepository.GetSecretaryData(Planets.CurrentPlanetId);
            double pricePerOneReport = MechanicSecretaryHelper.GetUnitPriceForMechanicSecretaryPrice(generator, (int)(secretaryData?.AuditCashPrice ?? 2.0)) / secretaryData.ReportCountProcessedPer10Seconds;

            return(pricePerOneReport * Mathf.Min(secretaryData.ReportCountProcessedPer10Seconds, Services.SecretaryService.GetReportCount(generator.GeneratorId)));
        }
コード例 #2
0
        private double GetTempMechanicPriceForBaseCount(GeneratorInfo generator)
        {
            int    planetId        = Services.PlanetService.CurrentPlanet.Id;
            int    countOfRepair   = BaseRestoredCount; //Services.ResourceService.MechanicDataRepository.GetMechanicData(planetId).ServiceUnitsRestoredPer10Seconds;
            var    mechanicData    = ResourceService.MechanicDataRepository.GetMechanicData(planetId);
            double pricePerOneUnit = MechanicSecretaryHelper.GetUnitPriceForMechanicSecretaryPrice(generator, (int)(mechanicData?.ServiceCashPrice ?? 2.0)) / countOfRepair;

            return(pricePerOneUnit * Mathf.Min(countOfRepair, Services.TransportService.GetUnitBrokenedCount(generator.GeneratorId)));
        }