Esempio n. 1
0
 public ModCore()
 {
     //Console.modCore = this;
     ObjImporter.modCore = this;
     modFolder = Environment.CurrentDirectory + "\\StarForge_Data\\mods\\";
     GameObject monitor = new GameObject("monitor");
     monitorComp = monitor.AddComponent<Monitor>();
     monitor.AddComponent<CoreConsole>();
     monitorComp.modCore = this;
     modApi = new ModApi(this);
     monitorComp.modApi = modApi;
     Log("started.");
     StartPlugins();
     AddModCoreCommands();
     Alias.Load();
 }
Esempio n. 2
0
 public void Init(ModCore core)
 {
     if (core != null && core.API != null)
     {
         modCore = core;
         modApi = core.API;
         monitor = core.monitorComp;
         utilMonitor = new GameObject("UtilMontior").AddComponent<UtilMonitor>();
         utilMonitor.modCore = core;
         utilMonitor.api = core.API;
         addCommands();
         modCore.Log(Name + " started successfully!");
     }
     else if (core == null)
         Debug.Log("PluginUtils Error: modcore is null!");
     else if (core.API == null)
         Debug.Log("PluginUtils Error: API is null!");
 }