Beispiel #1
0
        public ExperimentObserver(StorageCache cache, ExperimentSettings expSettings, BiomeFilter filter,
                                  ScanInterface scanMapInterface, string expid, ModuleScienceExperiment exp = null)
        {
            settings            = expSettings;
            biomeFilter         = filter;
            requireControllable = true;
            if (exp != null)
            {
                rerunnable = exp.rerunnable;
                resettable = exp.resettable;
            }

            if (scanMapInterface == null)
            {
                scanMapInterface = new DefaultScanInterface();
            }

            scanInterface = scanMapInterface;

            experiment = ResearchAndDevelopment.GetExperiment(expid);

            if (experiment == null)
            {
                Log.Error("Failed to get experiment '{0}'", expid);
            }

            storage = cache;
            Rescan();
        }
Beispiel #2
0
/******************************************************************************
*                    Implementation Details
******************************************************************************/


        public ExperimentObserver(StorageCache cache, ProfileData.ExperimentSettings expSettings, BiomeFilter filter, ScanInterface scanMapInterface, string expid)
        {
            settings            = expSettings;
            biomeFilter         = filter;
            requireControllable = true;

            if (scanMapInterface == null)
            {
                Log.Warning("ExperimentObserver for {0} given null scanning interface. Using default.", expid);
                scanMapInterface = new DefaultScanInterface();
            }

            scanInterface = scanMapInterface;

            experiment = ResearchAndDevelopment.GetExperiment(expid);

            if (experiment == null)
            {
                Log.Error("Failed to get experiment '{0}'", expid);
            }

            storage = cache;
            Rescan();
        }