예제 #1
0
 /*********
 ** Public methods
 *********/
 /// <summary>Construct an instance.</summary>
 /// <param name="monitor">Encapsulates monitoring and logging for a given module.</param>
 /// <param name="modRegistry">Tracks the installed mods.</param>
 public DeprecationManager(IMonitor monitor, ModRegistry modRegistry)
 {
     this.Monitor     = monitor;
     this.ModRegistry = modRegistry;
 }
예제 #2
0
 /*********
 ** Public methods
 *********/
 /// <summary>Construct an instance.</summary>
 /// <param name="monitor">Encapsulates monitoring and logging.</param>
 /// <param name="eventManager">Manages SMAPI events.</param>
 /// <param name="jsonHelper">Encapsulates SMAPI's JSON file parsing.</param>
 /// <param name="modRegistry">Tracks the installed mods.</param>
 /// <param name="reflection">Simplifies access to private code.</param>
 /// <param name="onModMessageReceived">A callback to invoke when a mod message is received.</param>
 /// <param name="logNetworkTraffic">Whether to log network traffic.</param>
 public SMultiplayer(IMonitor monitor, EventManager eventManager, JsonHelper jsonHelper, ModRegistry modRegistry, Reflector reflection, Action <ModMessageModel> onModMessageReceived, bool logNetworkTraffic)
 {
     this.Monitor              = monitor;
     this.EventManager         = eventManager;
     this.JsonHelper           = jsonHelper;
     this.ModRegistry          = modRegistry;
     this.Reflection           = reflection;
     this.OnModMessageReceived = onModMessageReceived;
     this.LogNetworkTraffic    = logNetworkTraffic;
 }
예제 #3
0
 /*********
 ** Public methods
 *********/
 /// <summary>Injects types required for backwards compatibility.</summary>
 /// <param name="modRegistry">Tracks the installed mods.</param>
 internal static void Shim(ModRegistry modRegistry)
 {
     InternalExtensions.ModRegistry = modRegistry;
 }
예제 #4
0
        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="monitor">Encapsulates monitoring and logging for a given module.</param>
        /// <param name="modRegistry">Tracks the installed mods.</param>
#if !SMAPI_3_0_STRICT
        public DeprecationManager(Monitor monitor, ModRegistry modRegistry)
예제 #5
0
        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="monitor">Encapsulates monitoring and logging.</param>
        /// <param name="eventManager">Manages SMAPI events.</param>
        /// <param name="jsonHelper">Encapsulates SMAPI's JSON file parsing.</param>
        /// <param name="modRegistry">Tracks the installed mods.</param>
        /// <param name="reflection">Simplifies access to private code.</param>
        /// <param name="onModMessageReceived">A callback to invoke when a mod message is received.</param>
        public SMultiplayer(IMonitor monitor, EventManager eventManager, JsonHelper jsonHelper, ModRegistry modRegistry, Reflector reflection, Action <ModMessageModel> onModMessageReceived)
        {
            this.Monitor              = monitor;
            this.EventManager         = eventManager;
            this.JsonHelper           = jsonHelper;
            this.ModRegistry          = modRegistry;
            this.Reflection           = reflection;
            this.OnModMessageReceived = onModMessageReceived;

            this.DisconnectingFarmers = reflection.GetField <List <long> >(this, "disconnectingFarmers").GetValue();
        }