mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-03 17:38:30 +00:00
Merge pull request #487 from misternebula/init-assemblies-hotfix
InitializeAssemblies hotfix
This commit is contained in:
commit
ec6528bbde
@ -124,14 +124,20 @@ namespace QSB
|
|||||||
foreach (var path in Directory.EnumerateFiles(Helper.Manifest.ModFolderPath, "*.dll"))
|
foreach (var path in Directory.EnumerateFiles(Helper.Manifest.ModFolderPath, "*.dll"))
|
||||||
{
|
{
|
||||||
var assembly = Assembly.LoadFile(path);
|
var assembly = Assembly.LoadFile(path);
|
||||||
|
if (Path.GetFileNameWithoutExtension(path) == "ProxyScripts")
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
DebugLog.DebugWrite(assembly.ToString());
|
DebugLog.DebugWrite(assembly.ToString());
|
||||||
assembly.GetTypes()
|
assembly
|
||||||
|
.GetTypes()
|
||||||
.SelectMany(x => x.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.DeclaredOnly))
|
.SelectMany(x => x.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.DeclaredOnly))
|
||||||
.Where(x => x.IsDefined(typeof(RuntimeInitializeOnLoadMethodAttribute)))
|
.Where(x => x.IsDefined(typeof(RuntimeInitializeOnLoadMethodAttribute)))
|
||||||
.ForEach(x => x.Invoke(null, null));
|
.ForEach(x => x.Invoke(null, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugLog.DebugWrite($"Assemblies initialized", MessageType.Success);
|
DebugLog.DebugWrite("Assemblies initialized", MessageType.Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Configure(IModConfig config) => DefaultServerIP = config.GetSettingsValue<string>("defaultServerIP");
|
public override void Configure(IModConfig config) => DefaultServerIP = config.GetSettingsValue<string>("defaultServerIP");
|
||||||
@ -178,4 +184,4 @@ namespace QSB
|
|||||||
* Daft Punk
|
* Daft Punk
|
||||||
* Natalie Holt
|
* Natalie Holt
|
||||||
* WMD
|
* WMD
|
||||||
*/
|
*/
|
@ -7,7 +7,7 @@
|
|||||||
"body": "- Disable *all* other mods. (Can heavily affect performance)\n- Make sure you are not running any other network-intensive applications.\n- Make sure you have forwarded/opened the correct ports. (See the GitHub readme.)"
|
"body": "- Disable *all* other mods. (Can heavily affect performance)\n- Make sure you are not running any other network-intensive applications.\n- Make sure you have forwarded/opened the correct ports. (See the GitHub readme.)"
|
||||||
},
|
},
|
||||||
"uniqueName": "Raicuparta.QuantumSpaceBuddies",
|
"uniqueName": "Raicuparta.QuantumSpaceBuddies",
|
||||||
"version": "0.17.0",
|
"version": "0.17.1",
|
||||||
"owmlVersion": "2.3.2",
|
"owmlVersion": "2.3.2",
|
||||||
"dependencies": [ "_nebula.MenuFramework" ]
|
"dependencies": [ "_nebula.MenuFramework" ]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user