/// <summary> /// Called when all other extensions have been loaded /// </summary> public override void OnModLoad() { foreach (var extension in Manager.GetAllExtensions()) { if (!extension.IsGameExtension) { continue; } WhitelistAssemblies = extension.WhitelistAssemblies; WhitelistNamespaces = extension.WhitelistNamespaces; break; } // Bind Python specific libraries var logger = new PythonLogger(Manager.Logger); PythonEngine.Runtime.IO.SetOutput(logger, Encoding.UTF8); PythonEngine.Runtime.IO.SetErrorOutput(logger, Encoding.UTF8); LoadLibrary(new PythonDatafile(PythonEngine), "data"); LoadLibrary(new PythonUtil(), "util"); // Bind any libraries to Python foreach (string name in Manager.GetLibraries()) { LoadLibrary(Manager.GetLibrary(name), name.ToLowerInvariant()); } }
/// <summary> /// Called when all other extensions have been loaded /// </summary> public override void OnModLoad() { // Bind Python specific libraries var logger = new PythonLogger(Manager.Logger); PythonEngine.Runtime.IO.SetOutput(logger, Encoding.Default); PythonEngine.Runtime.IO.SetErrorOutput(logger, Encoding.Default); LoadLibrary(new PythonDatafile(PythonEngine), "data"); LoadLibrary(new PythonUtil(), "util"); // Bind any libraries to python foreach (string name in Manager.GetLibraries()) { LoadLibrary(Manager.GetLibrary(name), name.ToLowerInvariant()); } }
/// <summary> /// Called when all other extensions have been loaded /// </summary> public override void OnModLoad() { foreach (var extension in Manager.GetAllExtensions()) { if (!extension.IsGameExtension) continue; WhitelistAssemblies = extension.WhitelistAssemblies; WhitelistNamespaces = extension.WhitelistNamespaces; break; } // Bind Python specific libraries var logger = new PythonLogger(Manager.Logger); PythonEngine.Runtime.IO.SetOutput(logger, Encoding.UTF8); PythonEngine.Runtime.IO.SetErrorOutput(logger, Encoding.UTF8); LoadLibrary(new PythonDatafile(PythonEngine), "data"); LoadLibrary(new PythonUtil(), "util"); // Bind any libraries to Python foreach (string name in Manager.GetLibraries()) { LoadLibrary(Manager.GetLibrary(name), name.ToLowerInvariant()); } }