Added third party library loading and execution
This commit is contained in:
@@ -27,7 +27,7 @@ namespace _5ReadCustomJsonConfig
|
||||
var pathToMod = _modHelper.GetAbsolutePathToModFolder(Assembly.GetExecutingAssembly());
|
||||
|
||||
// We give the path to the mod folder and the file we want to get, giving us the config, supply the files 'type' between the diamond brackets
|
||||
var config = _modHelper.GetFileFromModFolder<ModConfig>(pathToMod, "config.json");
|
||||
var config = _modHelper.GetJsonDataFromFile<ModConfig>(pathToMod, "config.json");
|
||||
|
||||
_logger.Success($"Read property: 'ExampleProperty' from config with value: {config.ExampleProperty}");
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "5ReadCustomConfig",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "5ReadCustomConfig",
|
||||
"version": "1.0.0",
|
||||
"sptVersion": "~4.0",
|
||||
"loadBefore": [],
|
||||
"loadAfter": [],
|
||||
"IncompatibileMods": [],
|
||||
"Url": "https://github.com/sp-tarkov/server-csharp/tree/develop/ExampleMods/Mods",
|
||||
"IsBundleMod": false,
|
||||
"Author": "SPT",
|
||||
"Contributors": [],
|
||||
"Licence": "MIT"
|
||||
"url": "https://github.com/sp-tarkov/server-csharp/tree/develop/ExampleMods/Mods",
|
||||
"isBundleMod": false,
|
||||
"author": "SPT",
|
||||
"contributors": [],
|
||||
"licence": "MIT"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user