Exemple #1
0
        public async Task <IActionResult> GetMiscConfig()
        {
            GoNorthProject project = await _projectDbAccess.GetDefaultProject();

            MiscProjectConfig configEntry = await _projectConfigProvider.GetMiscConfig(project.Id);

            return(Ok(StripMiscConfig(configEntry)));
        }
        public async Task <IActionResult> GetNpcsWithDailyRoutineOutsideTimeRange()
        {
            GoNorthProject defaultProject = await _userProjectAccess.GetUserProject();

            MiscProjectConfig miscConfig = await _projectConfigProvider.GetMiscConfig(defaultProject.Id);

            List <KortistoNpc> npcs = await((IKortistoNpcDbAccess)_objectDbAccess).GetNpcsWithDailyRoutineAfterTime(defaultProject.Id, miscConfig.HoursPerDay, miscConfig.MinutesPerHour);

            return(Ok(npcs));
        }
Exemple #3
0
        /// <summary>
        /// Returns the misc project config
        /// </summary>
        /// <returns>Misc project config</returns>
        public async Task <MiscProjectConfig> GetMiscProjectConfig()
        {
            if (_miscProjectConfig != null)
            {
                return(_miscProjectConfig);
            }

            GoNorthProject defaultProject = await GetDefaultProject();

            _miscProjectConfig = await _projectConfigProvider.GetMiscConfig(defaultProject.Id);

            return(_miscProjectConfig);
        }