fix some shit, add triangle count
check for invalid animations I hate animations ignore broken bones from god knows what fix more idiotic mod things fully ignore garbage skeletons that fail to process properly fix my own mistakes fix more bullshit check for filename length and continue idk some cleanup fix spoopy skellingtons change loglevel of tris
This commit is contained in:
@@ -40,6 +40,7 @@ public abstract class ConfigurationServiceBase<T> : IDisposable where T : IMareC
|
||||
{
|
||||
_periodicCheckCts.Cancel();
|
||||
_periodicCheckCts.Dispose();
|
||||
if (_configIsDirty) SaveDirtyConfig();
|
||||
}
|
||||
|
||||
protected T LoadConfig()
|
||||
@@ -94,10 +95,12 @@ public abstract class ConfigurationServiceBase<T> : IDisposable where T : IMareC
|
||||
// ignore if file cannot be backupped once
|
||||
}
|
||||
|
||||
File.WriteAllText(ConfigurationPath, JsonSerializer.Serialize(Current, new JsonSerializerOptions()
|
||||
var temp = ConfigurationPath + ".tmp";
|
||||
File.WriteAllText(temp, JsonSerializer.Serialize(Current, new JsonSerializerOptions()
|
||||
{
|
||||
WriteIndented = true
|
||||
}));
|
||||
File.Move(temp, ConfigurationPath, true);
|
||||
_configLastWriteTime = new FileInfo(ConfigurationPath).LastWriteTimeUtc;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@ public class TransientConfig : IMareConfiguration
|
||||
{
|
||||
public Dictionary<string, HashSet<string>> PlayerPersistentTransientCache { get; set; } = new(StringComparer.Ordinal);
|
||||
public int Version { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace MareSynchronos.MareConfiguration.Configurations;
|
||||
|
||||
public class XivDataStorageConfig : IMareConfiguration
|
||||
{
|
||||
public ConcurrentDictionary<string, long> TriangleDictionary { get; set; } = new(StringComparer.OrdinalIgnoreCase);
|
||||
public ConcurrentDictionary<string, Dictionary<string, List<ushort>>> BonesDictionary { get; set; } = new(StringComparer.OrdinalIgnoreCase);
|
||||
public int Version { get; set; } = 0;
|
||||
}
|
||||
@@ -11,4 +11,4 @@ public class TransientConfigService : ConfigurationServiceBase<TransientConfig>
|
||||
}
|
||||
|
||||
protected override string ConfigurationName => ConfigName;
|
||||
}
|
||||
}
|
||||
|
||||
12
MareSynchronos/MareConfiguration/XivDataStorageService.cs
Normal file
12
MareSynchronos/MareConfiguration/XivDataStorageService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using MareSynchronos.MareConfiguration.Configurations;
|
||||
|
||||
namespace MareSynchronos.MareConfiguration;
|
||||
|
||||
public class XivDataStorageService : ConfigurationServiceBase<XivDataStorageConfig>
|
||||
{
|
||||
public const string ConfigName = "xivdatastorage.json";
|
||||
|
||||
public XivDataStorageService(string configDir) : base(configDir) { }
|
||||
|
||||
protected override string ConfigurationName => ConfigName;
|
||||
}
|
||||
Reference in New Issue
Block a user