/// <summary>
		/// A simple constructor that initializes the object with the required dependencies.
		/// </summary>
		/// <param name="p_modMod">The mod for which the script is running.</param>
		/// <param name="p_gmdGameMode">The game mode currently being managed.</param>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
		/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>		
		public XmlScriptExecutor(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
		{
			m_scxSyncContext = p_scxUIContext;
			Mod = p_modMod;
			GameMode = p_gmdGameMode;
			EnvironmentInfo = p_eifEnvironmentInfo;
			Installers = p_igpInstallers;
		}
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_uipUIProxy">The UI manager to use to interact with UI elements.</param>
 public ScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, UIUtil p_uipUIProxy)
 {
     Mod             = p_modMod;
     GameMode        = p_gmdGameMode;
     EnvironmentInfo = p_eifEnvironmentInfo;
     Installers      = p_igpInstallers;
     UIManager       = p_uipUIProxy;
 }
Esempio n. 3
0
 /// <summary>
 /// A simple constructor that initializes the object with the required dependencies.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
 public XmlScriptExecutor(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
 {
     m_scxSyncContext = p_scxUIContext;
     Mod             = p_modMod;
     GameMode        = p_gmdGameMode;
     EnvironmentInfo = p_eifEnvironmentInfo;
     Installers      = p_igpInstallers;
 }
 /// <summary>
 /// A simple constructor that initializes the object with the required dependencies.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 public XmlScriptInstaller(IMod p_modMod, IGameMode p_gmdGameMode, InstallerGroup p_igpInstallers, IVirtualModActivator p_ivaVirtualModActivator)
 {
     Mod        = p_modMod;
     GameMode   = p_gmdGameMode;
     Installers = p_igpInstallers;
     m_ivaVirtualModActivator = p_ivaVirtualModActivator;
     m_mliModLinkInstaller    = m_ivaVirtualModActivator.GetModLinkInstaller();
 }
Esempio n. 5
0
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_uipUIProxy">The UI manager to use to interact with UI elements.</param>
 public ScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IVirtualModActivator p_ivaVirtualModActivator, InstallerGroup p_igpInstallers, UIUtil p_uipUIProxy)
 {
     Mod                 = p_modMod;
     GameMode            = p_gmdGameMode;
     EnvironmentInfo     = p_eifEnvironmentInfo;
     Installers          = p_igpInstallers;
     UIManager           = p_uipUIProxy;
     VirtualModActivator = p_ivaVirtualModActivator;
     ModLinkInstaller    = VirtualModActivator.GetModLinkInstaller();
 }
Esempio n. 6
0
 /// <summary>
 /// Returns a proxy that implements the functions available to Mod Script scripts.
 /// </summary>
 /// <param name="p_modMod">The mod being installed.</param>
 /// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
 /// <returns>A proxy that implements the functions available to Mod Script scripts.</returns>
 protected override ModScriptFunctionProxy GetScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
 {
     return(new OblivionModScriptFunctionProxy(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, new ModScriptUIUtil(p_gmdGameMode, p_eifEnvironmentInfo, p_scxUIContext)));
 }
Esempio n. 7
0
        static int DoInstall(string game, string filename, string installationPath, string profilePath, string gamePath,
                             List <string> additionalSearchPaths, string seVersion, ref string errorString)
        {
            if (game == null)
            {
                errorString = "no game specified";
                return(1);
            }
            if (filename == null)
            {
                errorString = "no file specified";
                return(1);
            }
            if (profilePath == null)
            {
                errorString = "no profile path specified";
                return(1);
            }
            if (gamePath == null)
            {
                errorString = "no game path specified";
                return(1);
            }
            try
            {
                EnvironmentInfo environmentInfo = new EnvironmentInfo(Properties.Settings.Default);

                string   exeLocation = Assembly.GetExecutingAssembly().Location;
                string   exePath     = System.IO.Path.GetDirectoryName(exeLocation);
                string[] gameModes   = Directory.GetFiles(Path.Combine(exePath, "GameModes"), String.Format("{0}.dll", game));
                if (gameModes.Count() == 0)
                {
                    errorString = "unknown game";
                    return(1);
                }

                Assembly         gameAssembly    = Assembly.LoadFrom(gameModes[0]);
                IGameModeFactory gameModeFactory = null;
                Type[]           exportedTypes   = gameAssembly.GetExportedTypes();
                foreach (Type type in exportedTypes)
                {
                    if (typeof(IGameModeFactory).IsAssignableFrom(type) && !type.IsAbstract)
                    {
                        ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(EnvironmentInfo) });
                        gameModeFactory = (IGameModeFactory)constructor.Invoke(new Object[] { environmentInfo });
                    }
                }
                if (gameModeFactory == null)
                {
                    errorString = "invalid game";
                    return(1);
                }

                string str7zPath = Path.Combine(environmentInfo.ProgrammeInfoDirectory, environmentInfo.Is64BitProcess ? "7z-64bit.dll" : "7z-32bit.dll");
                SevenZipCompressor.SetLibraryPath(str7zPath);

                FileUtil fileUtil = new NexusFileUtil(environmentInfo);

                environmentInfo.Settings.InstallationPaths[gameModeFactory.GameModeDescriptor.ModeId] = installationPath;
                environmentInfo.Settings.ModFolder[gameModeFactory.GameModeDescriptor.ModeId]         = installationPath;
//                environmentInfo.Settings.InstallInfoFolder[gameModeFactory.GameModeDescriptor.ModeId] = environmentInfo.TemporaryPath;
                environmentInfo.Settings.InstallInfoFolder[gameModeFactory.GameModeDescriptor.ModeId] = Path.Combine(installationPath, "temp");
                if (environmentInfo.Settings.DelayedSettings[gameModeFactory.GameModeDescriptor.ModeId] == null)
                {
                    environmentInfo.Settings.DelayedSettings[gameModeFactory.GameModeDescriptor.ModeId] = new KeyedSettings <string>();
                }
                if (environmentInfo.Settings.DelayedSettings["ALL"] == null)
                {
                    environmentInfo.Settings.DelayedSettings["ALL"] = new KeyedSettings <string>();
                }

                ViewMessage warning = null;

                IGameMode gameMode = gameModeFactory.BuildGameMode(fileUtil, out warning);

                IModCacheManager cacheManager = new NexusModCacheManager(environmentInfo.TemporaryPath, gameMode.GameModeEnvironmentInfo.ModDirectory, fileUtil);

                IScriptTypeRegistry scriptTypeRegistry = ScriptTypeRegistry.DiscoverScriptTypes(Path.Combine(Path.GetDirectoryName(exeLocation), "ScriptTypes"), gameMode, new List <string>());
                if (scriptTypeRegistry.Types.Count == 0)
                {
                    errorString = "No script types were found.";
                    return(2);
                }

                // use a proxy so we can intercept accesses to the IGameMode interface. This allows us to make the additional search paths accessible from
                // the sandbox and feed in the script extender version even though the nmm lib won't find it.
                // This has to happen after DiscoverScriptTypes becaus that function tries to localize the assembly which fails for the dynamic assembly
                // of the proxy. Fortunately DiscoverScriptTypes has no side-effects on the gameMode.
                // This recreates the gamemode object so it's important no code above modifies gameMode
                ProxyGenerator      generator   = new ProxyGenerator();
                GameModeInterceptor interceptor = new GameModeInterceptor(additionalSearchPaths, seVersion != null ? new Version(seVersion) : null);

                gameMode = (IGameMode)generator.CreateClassProxy(gameMode.GetType(), new object[] { environmentInfo, fileUtil }, new IInterceptor[] { interceptor });

                IModFormatRegistry formatRegistry = ModFormatRegistry.DiscoverFormats(cacheManager, gameMode.SupportedFormats, scriptTypeRegistry, Path.Combine(Path.GetDirectoryName(exeLocation), "ModFormats"));
                if (formatRegistry.Formats.Count == 0)
                {
                    errorString = "No formats were found.";
                    return(2);
                }

                // we install the mod from the temporary path. Unfortunately this requires the archive to be copied, otherwise the sandbox will
                // prevent the installer script from accessing the archive in its original location
                string fileNameTemporary = Path.Combine(environmentInfo.TemporaryPath, Path.GetFileName(filename));
                File.Copy(filename, fileNameTemporary);
                IMod mod = CreateMod(fileNameTemporary, formatRegistry, gameMode);
                if (mod == null)
                {
                    errorString = "failed to initialize mod";
                    return(3);
                }

                System.IO.File.WriteAllText(installationPath + "/__installInfo.txt", mod.ModName + "\n" + mod.HumanReadableVersion + "\n" + mod.Id);

                if (mod.HasInstallScript)
                {
                    DummyDataFileUtilFactory dummyFactory = null;
                    IDataFileUtil            dataFileUtility;
                    Logger.Info("Detected C# script that relies on files in the actual data folder");

                    string modlistFile = Path.Combine(profilePath, "modlist.txt");
                    // ASSUMED mods path is the parent directory of the gameMode.InstallationPath
                    string modsPath = Directory.GetParent(gameMode.InstallationPath).FullName;
                    // Prepare dummy data directory
                    dummyFactory    = new DummyDataFileUtilFactory(gameMode.GameModeEnvironmentInfo.InstallationPath, modlistFile, modsPath, gamePath, additionalSearchPaths);
                    dataFileUtility = dummyFactory.CreateDummyDataFileUtil();

                    TxFileManager  fileManager     = new TxFileManager();
                    IInstallLog    installLog      = new DummyInstallLog();
                    IIniInstaller  iniIniInstaller = new IniInstaller(mod, installLog, fileManager, delegate { return(OverwriteResult.No); });
                    IPluginManager pluginManager   = new DummyPluginManager(Path.Combine(profilePath, "plugins.txt"), gameMode, mod);
                    IGameSpecificValueInstaller gameSpecificValueInstaller = gameMode.GetGameSpecificValueInstaller(mod, installLog, fileManager, new NexusFileUtil(environmentInfo), delegate { return(OverwriteResult.No); });
                    IModFileInstaller           fileInstaller = new ModFileInstaller(gameMode.GameModeEnvironmentInfo, mod, installLog, pluginManager, dataFileUtility, fileManager, delegate { return(OverwriteResult.No); }, false);
                    InstallerGroup       installers           = new InstallerGroup(dataFileUtility, fileInstaller, iniIniInstaller, gameSpecificValueInstaller, pluginManager);
                    IVirtualModActivator modActivator         = new DummyVirtualModActivator(gameMode, environmentInfo);
                    IScriptExecutor      executor             = mod.InstallScript.Type.CreateExecutor(mod, gameMode, environmentInfo, modActivator, installers, SynchronizationContext.Current);
                    // run the script in a second thread and start the main loop in the main thread to ensure we can handle message boxes and the like
                    ScriptRunner runner = new ScriptRunner(executor, mod.InstallScript);

                    runner.Execute();
                    runner.TaskEnded += delegate
                    {
                        iniIniInstaller.FinalizeInstall();
                        gameSpecificValueInstaller.FinalizeInstall();
                        mod.EndReadOnlyTransaction();

                        Application.Exit();
                    };

                    Application.Run();
                    switch (runner.Status)
                    {
                    case BackgroundTasks.TaskStatus.Cancelled: return(11);

                    case BackgroundTasks.TaskStatus.Error: return(6);

                    case BackgroundTasks.TaskStatus.Incomplete: return(10);

                    default: return(0);
                    }
                }
                else
                {
                    errorString = "no install script";
                    return(4);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("exception: " + e.Message);
                MessageBox.Show(e.Message, "Installation failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(5);
            }
        }
		/// <summary>
		/// A simple constructor that initializes the object with the required dependencies.
		/// </summary>
		/// <param name="p_modMod">The mod for which the script is running.</param>
		/// <param name="p_gmdGameMode">The game mode currently being managed.</param>
		/// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
		public XmlScriptInstaller(IMod p_modMod, IGameMode p_gmdGameMode, InstallerGroup p_igpInstallers)
		{
			Mod = p_modMod;
			GameMode = p_gmdGameMode;
			Installers = p_igpInstallers;
		}
        /// <summary>
        /// Returns a proxy that implements the functions available to C# scripts.
        /// </summary>
        /// <param name="p_modMod">The mod being installed.</param>
        /// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
        /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
        /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
        /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
        /// <returns>A proxy that implements the functions available to C# scripts.</returns>
        protected override CSharpScriptFunctionProxy GetScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
        {
            BsaManager bmgBsaManager  = new BsaManager((Fallout4GameMode)p_gmdGameMode);
            UIUtil     uitUiUtilities = new UIUtil(p_gmdGameMode, p_eifEnvironmentInfo, p_scxUIContext);

            return(new Fallout4CSharpScriptFunctionProxy(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, bmgBsaManager, uitUiUtilities));
        }
Esempio n. 10
0
 /// <summary>
 /// Returns a proxy that implements the functions available to Mod Script scripts.
 /// </summary>
 /// <param name="p_modMod">The mod being installed.</param>
 /// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
 /// <returns>A proxy that implements the functions available to Mod Script scripts.</returns>
 protected virtual ModScriptFunctionProxy GetScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IVirtualModActivator p_ivaVirtualModActivator, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
 {
     return(new ModScriptFunctionProxy(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_ivaVirtualModActivator, p_igpInstallers, new ModScriptUIUtil(p_gmdGameMode, p_eifEnvironmentInfo, p_scxUIContext)));
 }
		/// <summary>
		/// Creates an executor that can run the script type.
		/// </summary>
		/// <param name="p_modMod">The mod being installed.</param>
		/// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
		/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
		/// <returns>An executor that can run the script type.</returns>
		public IScriptExecutor CreateExecutor(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
		{
			return new XmlScriptExecutor(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, p_scxUIContext);
		}
Esempio n. 12
0
		/// <summary>
		/// Creates an executor that can run the script type.
		/// </summary>
		/// <param name="p_modMod">The mod being installed.</param>
		/// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
		/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
		/// <returns>An executor that can run the script type.</returns>
		public IScriptExecutor CreateExecutor(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
		{
			CSharpScriptFunctionProxy csfFunctions = GetScriptFunctionProxy(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, p_scxUIContext);
			return new CSharpScriptExecutor(p_gmdGameMode, p_eifEnvironmentInfo, csfFunctions, BaseScriptType);
		}
Esempio n. 13
0
		/// <summary>
		/// Returns a proxy that implements the functions available to C# scripts.
		/// </summary>
		/// <param name="p_modMod">The mod being installed.</param>
		/// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
		/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
		/// <returns>A proxy that implements the functions available to C# scripts.</returns>
		protected virtual CSharpScriptFunctionProxy GetScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
		{
			return new CSharpScriptFunctionProxy(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, new UIUtil(p_gmdGameMode, p_eifEnvironmentInfo, p_scxUIContext));
		}
        /// <summary>
        /// Creates an executor that can run the script type.
        /// </summary>
        /// <param name="p_modMod">The mod being installed.</param>
        /// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
        /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
        /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
        /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
        /// <returns>An executor that can run the script type.</returns>
        public IScriptExecutor CreateExecutor(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
        {
            CSharpScriptFunctionProxy csfFunctions = GetScriptFunctionProxy(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, p_scxUIContext);

            return(new CSharpScriptExecutor(p_gmdGameMode, p_eifEnvironmentInfo, csfFunctions, BaseScriptType));
        }
		/// <summary>
		/// A simple constructor that initializes the object with the given values.
		/// </summary>
		/// <param name="p_modMod">The mod for which the script is running.</param>
		/// <param name="p_gmdGameMode">The game mode currently being managed.</param>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
		/// <param name="p_uipUIProxy">The UI manager to use to interact with UI elements.</param>
		public CSharpScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, UIUtil p_uipUIProxy)
			: base(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, p_uipUIProxy)
		{
		}
Esempio n. 16
0
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_uipUIProxy">The UI manager to use to interact with UI elements.</param>
 public OblivionModScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IVirtualModActivator p_ivaVirtualModActivator, InstallerGroup p_igpInstallers, ModScriptUIUtil p_uipUIProxy)
     : base(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_ivaVirtualModActivator, p_igpInstallers, p_uipUIProxy)
 {
 }
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_uipUIProxy">The UI manager to use to interact with UI elements.</param>
 public DragonAge2ModScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, ModScriptUIUtil p_uipUIProxy)
     : base(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, p_uipUIProxy)
 {
 }
Esempio n. 18
0
        /// <summary>
        /// Creates an executor that can run the script type.
        /// </summary>
        /// <param name="p_modMod">The mod being installed.</param>
        /// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
        /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
        /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
        /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
        /// <returns>An executor that can run the script type.</returns>
        public IScriptExecutor CreateExecutor(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IVirtualModActivator p_ivaVirtualModActivator, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
        {
            ModScriptFunctionProxy msfFunctions = GetScriptFunctionProxy(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_ivaVirtualModActivator, p_igpInstallers, p_scxUIContext);

            return(new ModScriptExecutor(p_gmdGameMode, p_eifEnvironmentInfo, msfFunctions, p_ivaVirtualModActivator.VirtualPath));
        }
 /// <summary>
 /// Creates an executor that can run the script type.
 /// </summary>
 /// <param name="p_modMod">The mod being installed.</param>
 /// <param name="p_gmdGameMode">The game mode currently bieng managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
 /// <returns>An executor that can run the script type.</returns>
 public IScriptExecutor CreateExecutor(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext)
 {
     return(new XmlScriptExecutor(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, p_scxUIContext));
 }
 /// <summary>
 /// A simple constructor that initializes the object with the required dependencies.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 public XmlScriptInstaller(IMod p_modMod, IGameMode p_gmdGameMode, InstallerGroup p_igpInstallers)
 {
     Mod        = p_modMod;
     GameMode   = p_gmdGameMode;
     Installers = p_igpInstallers;
 }
		/// <summary>
		/// A simple constructor that initializes the object with the given values.
		/// </summary>
		/// <param name="p_modMod">The mod for which the script is running.</param>
		/// <param name="p_gmdGameMode">The game mode currently being managed.</param>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
		/// <param name="p_uipUIProxy">The UI manager to use to interact with UI elements.</param>
		public ScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, UIUtil p_uipUIProxy)
		{
			Mod = p_modMod;
			GameMode = p_gmdGameMode;
			EnvironmentInfo = p_eifEnvironmentInfo;
			Installers = p_igpInstallers;
			UIManager = p_uipUIProxy;
		}
 public ScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, UIUtil p_uipUIProxy)
 {
 }
 /// <summary>
 /// A simple constructor that initialies the object with the given values.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_bamBsaManager">The manager to use to work with BSA files.</param>
 /// <param name="p_uipUIProxy">The UI manager to use to interact with UI elements.</param>
 public FalloutNVCSharpScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IVirtualModActivator p_ivaVirtualModActivator, InstallerGroup p_igpInstallers, BsaManager p_bamBsaManager, UIUtil p_uipUIProxy)
     : base(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_ivaVirtualModActivator, p_igpInstallers, p_bamBsaManager, p_uipUIProxy)
 {
 }
Esempio n. 24
0
 /// <summary>
 /// A simple constructor that initialies the object with the given values.
 /// </summary>
 /// <param name="p_modMod">The mod for which the script is running.</param>
 /// <param name="p_gmdGameMode">The game mode currently being managed.</param>
 /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
 /// <param name="p_igpInstallers">The utility class to use to install the mod items.</param>
 /// <param name="p_bamBsaManager">The manager to use to work with BSA files.</param>
 /// <param name="p_uipUIProxy">The UI manager to use to interact with UI elements.</param>
 public SkyrimCSharpScriptFunctionProxy(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, BsaManager p_bamBsaManager, UIUtil p_uipUIProxy)
     : base(p_modMod, p_gmdGameMode, p_eifEnvironmentInfo, p_igpInstallers, p_bamBsaManager, p_uipUIProxy)
 {
 }