mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-03-05 23:13:35 +00:00
2.8a
- Pins menu added
This commit is contained in:
14
Utility.cs
14
Utility.cs
@@ -118,6 +118,20 @@ namespace WeaponPaints
|
||||
logger?.LogError("Not found \"skins.json\" file");
|
||||
}
|
||||
}
|
||||
|
||||
internal static void LoadPinsFromFile(string filePath, ILogger logger)
|
||||
{
|
||||
var json = File.ReadAllText(filePath);
|
||||
try
|
||||
{
|
||||
var deserializedPins = JsonConvert.DeserializeObject<List<JObject>>(json);
|
||||
WeaponPaints.PinsList = deserializedPins ?? [];
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
logger?.LogError("Not found \"pins.json\" file");
|
||||
}
|
||||
}
|
||||
|
||||
internal static void LoadGlovesFromFile(string filePath, ILogger logger)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user