Added third party library loading and execution
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "10CustomStaticRouter",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "10CustomStaticRouter",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "11RegisterClassesInDI",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "11RegisterClassesInDI",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "12Bundle",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "12Bundle",
|
||||
"version": "1.0.0",
|
||||
"sptVersion": "~4.0",
|
||||
"loadBefore": [],
|
||||
"loadAfter": [],
|
||||
"IncompatibileMods": [],
|
||||
"Url": "https://github.com/sp-tarkov/server-csharp/tree/develop/ExampleMods/Mods",
|
||||
"IsBundleMod": true,
|
||||
"Author": "SPT",
|
||||
"Contributors": [],
|
||||
"Licence": "MIT"
|
||||
"url": "https://github.com/sp-tarkov/server-csharp/tree/develop/ExampleMods/Mods",
|
||||
"isBundleMod": true,
|
||||
"author": "SPT",
|
||||
"contributors": [],
|
||||
"licence": "MIT"
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class AddTraderWithDynamicAssorts : IPostDBLoadMod
|
||||
var pathToMod = _modHelper.GetAbsolutePathToModFolder(Assembly.GetExecutingAssembly());
|
||||
|
||||
var traderImagePath = Path.Combine(pathToMod, "db/cat.jpg");
|
||||
var traderBase = _modHelper.GetFileFromModFolder<TraderBase>(pathToMod, "db/base.json");
|
||||
var traderBase = _modHelper.GetJsonDataFromFile<TraderBase>(pathToMod, "db/base.json");
|
||||
|
||||
// Create helper class and use it to register our traders image/icon + set its stock refresh time
|
||||
var addTraderHelper = new AddTraderHelper();
|
||||
@@ -112,7 +112,7 @@ public class AddTraderWithDynamicAssorts : IPostDBLoadMod
|
||||
.AddLoyaltyLevel(1)
|
||||
.Export(tables.Traders[traderBase.Id]);
|
||||
|
||||
// Add mp133 preset as a barter for mayonase
|
||||
// Add mp133 preset as a barter for mayonase
|
||||
fluentAssortCreator
|
||||
.CreateComplexAssortItem(tables.Globals.ItemPresets["584148f2245977598f1ad387"].Items) // Weapon preset id comes from globals.json
|
||||
.AddStackCount(200)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "13.1AddTraderWithDynamicAssorts",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "13.1AddTraderWithDynamicAssorts",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -49,9 +49,9 @@ public class AddTraderWithAssortJson : IPostDBLoadMod
|
||||
var pathToMod = _modHelper.GetAbsolutePathToModFolder(Assembly.GetExecutingAssembly());
|
||||
|
||||
var traderImagePath = Path.Combine(pathToMod, "db/cat.jpg");
|
||||
var traderBase = _modHelper.GetFileFromModFolder<TraderBase>(pathToMod, "db/base.json");
|
||||
var traderBase = _modHelper.GetJsonDataFromFile<TraderBase>(pathToMod, "db/base.json");
|
||||
|
||||
var assort = _modHelper.GetFileFromModFolder<TraderAssort>(pathToMod, "db/assort.json");
|
||||
var assort = _modHelper.GetJsonDataFromFile<TraderAssort>(pathToMod, "db/assort.json");
|
||||
|
||||
// Create helper class and use it to register our traders image/icon + set its stock refresh time
|
||||
var addTraderHelper = new AddTraderHelper();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "1313AddTraderWithAssortJson",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "1313AddTraderWithAssortJson",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "14AfterDBLoadHook",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "14AfterDBLoadHook",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "15HttpListenerExample",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "15HttpListenerExample",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "18.1CustomItemServiceLootBox",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "18.1CustomItemServiceLootBox",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "18CustomItemService",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "18CustomItemService",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"Name": "1Logging",
|
||||
"Author": "SPT",
|
||||
"Contributors": [],
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"IncompatibleMods": [],
|
||||
"Dependencies": [],
|
||||
"Url": "https://github.com/sp-tarkov/server-csharp/tree/develop/ExampleMods/Mods",
|
||||
"IsBundleMod": false,
|
||||
"Licence": "MIT"
|
||||
"name": "1Logging",
|
||||
"author": "SPT",
|
||||
"contributors": [],
|
||||
"version": "1.0.0",
|
||||
"sptVersion": "~4.0",
|
||||
"loadBefore": [],
|
||||
"loadAfter": [],
|
||||
"incompatibilities": [],
|
||||
"dependencies": [],
|
||||
"url": "https://github.com/sp-tarkov/server-csharp/tree/develop/ExampleMods/Mods",
|
||||
"isBundleMod": false,
|
||||
"licence": "MIT"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "20CustomChatBot",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "20CustomChatBot",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "21CustomCommandoCommand",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "21CustomCommandoCommand",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "22CustomSptCommand",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "22CustomSptCommand",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "23CustomAbstractChatBot",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "23CustomAbstractChatBot",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "24Websocket",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "24Websocket",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "2EditDatabase",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "2EditDatabase",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -71,16 +71,6 @@ public class EditConfigs : IPostDBLoadMod
|
||||
// Let's disable loot on scavs
|
||||
_botConfig.DisableLootOnBotTypes.Add("assault");
|
||||
|
||||
// Let's make the conversion rate of scavs to pmcs 100% on factory day
|
||||
var factory4DayConversionSettings = _pmcConfig.ConvertIntoPmcChance["factory4_day"];
|
||||
|
||||
// We get assault bot settings for factory day
|
||||
var assaultConversionSettings = factory4DayConversionSettings["assault"];
|
||||
|
||||
// Set min and max to 100%
|
||||
assaultConversionSettings.Min = 100;
|
||||
assaultConversionSettings.Max = 100;
|
||||
|
||||
_logger.Success("Finished Editing Configs");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "3EditSptConfig",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "3EditSptConfig",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -10,8 +10,17 @@
|
||||
<!-- The two lines below will set the output path for the binaries -->
|
||||
<OutputPath>bin\$(Configuration)\$(ProjectName)\$(AssemblyName)-$(Version)\</OutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="fastJSON5" Version="1.0.4" >
|
||||
<Private>true</Private>
|
||||
<CopyLocal>true</CopyLocal>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<!-- TODO: Change to Nuget Package -->
|
||||
<ItemGroup>
|
||||
<Reference Include="Core">
|
||||
@@ -33,4 +42,10 @@
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="config.json5" />
|
||||
<Content Include="config.json5">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Reflection;
|
||||
using Core.Models.External;
|
||||
using Core.Models.Utils;
|
||||
using fastJSON5;
|
||||
using SptCommon.Annotations;
|
||||
|
||||
namespace _4ReadCustomJson5Config
|
||||
@@ -24,8 +25,8 @@ namespace _4ReadCustomJson5Config
|
||||
{
|
||||
var pathToMod = _modHelper.GetAbsolutePathToModFolder(Assembly.GetExecutingAssembly());
|
||||
|
||||
// TODO - fix/implement
|
||||
var json5Config = _modHelper.GetFileFromModFolder<ModConfig>(pathToMod, "config.json5");
|
||||
// To use JSON5, you will have to find and provide your own JSON5 library to decode it
|
||||
var json5Config = JSON5.ToObject<ModConfig>(_modHelper.GetRawFileData(pathToMod, "config.json5"));
|
||||
|
||||
_logger.Success($"Read property: 'ExampleProperty' from config with value: {json5Config.ExampleProperty}");
|
||||
}
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
{
|
||||
"Name": "4ReadCustomJson5Config",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "4ReadCustomJson5Config",
|
||||
"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",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "fastJSON5",
|
||||
"version": "1.0.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "6OverrideMethod",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "6OverrideMethod",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "7UseMultipleClasses",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "7UseMultipleClasses",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "8OnLoadExample",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "8OnLoadExample",
|
||||
"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"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"Name": "9OnUpdateExample",
|
||||
"Version": "1.0.0",
|
||||
"SptVersion": "~4.0",
|
||||
"LoadBefore": [],
|
||||
"LoadAfter": [],
|
||||
"name": "9OnUpdateExample",
|
||||
"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"
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user