Exemplo n.º 1
0
        /*********
        ** Public methods
        *********/
        /****
        ** Constructors
        ****/
        /// <summary>Construct an instance.</summary>
        /// <param name="monitor">Encapsulates logging and monitoring.</param>
        public WeatherMenu(IMonitor monitor, IReflectionHelper reflectionHelper, Sprites.Icons Icon, ITranslationHelper Helper, WeatherConditions weat, SDVMoon Termina, WeatherConfig ModCon, string text)
        {
            // save data
            this.MenuText       = text;
            this.Monitor        = monitor;
            this.Reflection     = reflectionHelper;
            this.Helper         = Helper;
            this.CurrentWeather = weat;
            this.IconSheet      = Icon;
            this.OurMoon        = Termina;
            this.OurConfig      = ModCon;

            // update layout
            this.UpdateLayout();
        }
Exemplo n.º 2
0
        /// ******************************************************************************
        /// CONSTRUCTORS
        /// ******************************************************************************

        /// <summary>
        /// Default Constructor
        /// </summary>
        /// <param name="Dice">pRNG</param>
        /// <param name="monitor">SMAPI log object</param>
        /// <param name="Config">Game configuration</param>
        public WeatherConditions(Icons Sheets, MersenneTwister Dice, ITranslationHelper Translation, IMonitor monitor, WeatherConfig Config)
        {
            Monitor = monitor;
            ModConfig = Config;
            this.Dice = Dice;
            this.Translation = Translation;
            Weathers = PopulateWeathers();

            CurrentConditionsN = CurrentWeather.Unset;
            CurrentWeathers = new List<ISDVWeather>
            {
                new FerngillFog(Sheets, Config.Verbose, monitor, Dice, Config, SDVTimePeriods.Morning),
                new FerngillWhiteOut(Dice, Config),
                new FerngillBlizzard(Dice, Config),
                new FerngillThunderFrenzy(monitor, Dice, Config),
                //new FerngillCustomRain(monitor, Dice, Config, 300)
            };

            foreach (ISDVWeather weather in CurrentWeathers)
                weather.OnUpdateStatus += ProcessWeatherChanges;
        }
Exemplo n.º 3
0
 /// <summary> Default constructor. </summary>
 internal FerngillFog(Icons Sheet, bool Verbose, IMonitor Monitor, MersenneTwister Dice, WeatherConfig config, SDVTimePeriods FogPeriod)
 {
     this.Sheet       = Sheet;
     CurrentFogType   = FogType.None;
     ExpirTime        = null;
     VerboseDebug     = Verbose;
     this.Monitor     = Monitor;
     this.Dice        = Dice;
     this.ModConfig   = config;
     this.FogTimeSpan = FogPeriod;
     FogElapsed       = new Stopwatch();
 }
Exemplo n.º 4
0
 public Descriptions(WeatherConfig O, ITranslationHelper T)
 {
     Opt        = O;
     Translator = T;
 }
Exemplo n.º 5
0
 public ClimatesOfFerngillAPI(WeatherConditions cond, WeatherConfig Opt)
 {
     LoadData(cond, Opt);
 }
Exemplo n.º 6
0
 public void LoadData(WeatherConditions Cond, WeatherConfig Opt)
 {
     CurrentConditions = Cond;
     Options           = Opt;
 }
Exemplo n.º 7
0
 public StaminaDrain(WeatherConfig Options, ITranslationHelper SHelper, IMonitor mon)
 {
     Config  = Options;
     Helper  = SHelper;
     Monitor = mon;
 }
Exemplo n.º 8
0
 public void LoadData(WeatherConditions cond, WeatherConfig opt)
 {
     CurrentConditions = cond;
     Options           = opt;
 }
Exemplo n.º 9
0
 /// <summary> Default constructor. </summary>
 internal FerngillThunderFrenzy(IMonitor monitor, MersenneTwister Dice, WeatherConfig config)
 {
     this.Logger    = monitor;
     this.Dice      = Dice;
     this.ModConfig = config;
 }