This commit is contained in:
2025-08-22 02:19:48 +01:00
commit a4c82452be
373 changed files with 52044 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using MareSynchronos.MareConfiguration.Models;
namespace MareSynchronos.MareConfiguration.Configurations;
public class CharaDataConfig : IMareConfiguration
{
public bool OpenMareHubOnGposeStart { get; set; } = false;
public string LastSavedCharaDataLocation { get; set; } = string.Empty;
public Dictionary<string, CharaDataFavorite> FavoriteCodes { get; set; } = [];
public bool DownloadMcdDataOnConnection { get; set; } = true;
public int Version { get; set; } = 0;
public bool NearbyOwnServerOnly { get; set; } = false;
public bool NearbyIgnoreHousingLimitations { get; set; } = false;
public bool NearbyDrawWisps { get; set; } = true;
public int NearbyDistanceFilter { get; set; } = 100;
public bool NearbyShowOwnData { get; set; } = false;
public bool ShowHelpTexts { get; set; } = true;
public bool NearbyShowAlways { get; set; } = false;
}

View File

@@ -0,0 +1,6 @@
namespace MareSynchronos.MareConfiguration.Configurations;
public interface IMareConfiguration
{
int Version { get; set; }
}

View File

@@ -0,0 +1,76 @@
using MareSynchronos.MareConfiguration.Models;
using MareSynchronos.UI;
using Microsoft.Extensions.Logging;
namespace MareSynchronos.MareConfiguration.Configurations;
[Serializable]
public class MareConfig : IMareConfiguration
{
public bool AcceptedAgreement { get; set; } = false;
public string CacheFolder { get; set; } = string.Empty;
public bool DisableOptionalPluginWarnings { get; set; } = false;
public bool EnableDtrEntry { get; set; } = true;
public int DtrStyle { get; set; } = 0;
public bool ShowUidInDtrTooltip { get; set; } = true;
public bool PreferNoteInDtrTooltip { get; set; } = false;
public bool UseColorsInDtr { get; set; } = true;
public DtrEntry.Colors DtrColorsDefault { get; set; } = default;
public DtrEntry.Colors DtrColorsNotConnected { get; set; } = new(Glow: 0x0428FFu);
public DtrEntry.Colors DtrColorsPairsInRange { get; set; } = new(Glow: 0xFFBA47u);
public bool UseNameColors { get; set; } = false;
public DtrEntry.Colors NameColors { get; set; } = new(Foreground: 0x67EBF5u, Glow: 0x00303Cu);
public DtrEntry.Colors BlockedNameColors { get; set; } = new(Foreground: 0x8AADC7, Glow: 0x000080u);
public bool EnableRightClickMenus { get; set; } = true;
public NotificationLocation ErrorNotification { get; set; } = NotificationLocation.Both;
public string ExportFolder { get; set; } = string.Empty;
public bool FileScanPaused { get; set; } = false;
public NotificationLocation InfoNotification { get; set; } = NotificationLocation.Toast;
public bool InitialScanComplete { get; set; } = false;
public LogLevel LogLevel { get; set; } = LogLevel.Information;
public bool LogPerformance { get; set; } = false;
public bool LogEvents { get; set; } = true;
public bool HoldCombatApplication { get; set; } = false;
public double MaxLocalCacheInGiB { get; set; } = 20;
public bool OpenGposeImportOnGposeStart { get; set; } = false;
public bool OpenPopupOnAdd { get; set; } = true;
public int ParallelDownloads { get; set; } = 10;
public int DownloadSpeedLimitInBytes { get; set; } = 0;
public DownloadSpeeds DownloadSpeedType { get; set; } = DownloadSpeeds.MBps;
[Obsolete] public bool PreferNotesOverNamesForVisible { get; set; } = false;
public float ProfileDelay { get; set; } = 1.5f;
public bool ProfilePopoutRight { get; set; } = false;
public bool ProfilesAllowNsfw { get; set; } = false;
public bool ProfilesShow { get; set; } = false;
public bool ShowSyncshellUsersInVisible { get; set; } = true;
[Obsolete] public bool ShowCharacterNameInsteadOfNotesForVisible { get; set; } = false;
public bool ShowCharacterNames { get; set; } = true;
public bool ShowOfflineUsersSeparately { get; set; } = true;
public bool ShowSyncshellOfflineUsersSeparately { get; set; } = true;
public bool GroupUpSyncshells { get; set; } = true;
public bool SerialApplication { get; set; } = false;
public bool ShowOnlineNotifications { get; set; } = false;
public bool ShowOnlineNotificationsOnlyForIndividualPairs { get; set; } = true;
public bool ShowOnlineNotificationsOnlyForNamedPairs { get; set; } = false;
public bool ShowTransferBars { get; set; } = true;
public bool ShowTransferWindow { get; set; } = false;
public bool ShowUploading { get; set; } = true;
public bool ShowUploadingBigText { get; set; } = true;
public bool ShowVisibleUsersSeparately { get; set; } = true;
public int TimeSpanBetweenScansInSeconds { get; set; } = 30;
public int TransferBarsHeight { get; set; } = 12;
public bool TransferBarsShowText { get; set; } = true;
public int TransferBarsWidth { get; set; } = 250;
public bool UseAlternativeFileUpload { get; set; } = false;
public bool UseCompactor { get; set; } = false;
public int Version { get; set; } = 1;
public NotificationLocation WarningNotification { get; set; } = NotificationLocation.Both;
public bool DisableSyncshellChat { get; set; } = false;
public int ChatColor { get; set; } = 0; // 0 means "use plugin default"
public int ChatLogKind { get; set; } = 1; // XivChatType.Debug
public bool ExtraChatAPI { get; set; } = false;
public bool ExtraChatTags { get; set; } = false;
public bool MareAPI { get; set; } = true;
}

View File

@@ -0,0 +1,16 @@
using MareSynchronos.MareConfiguration.Models;
namespace MareSynchronos.MareConfiguration.Configurations;
public class PlayerPerformanceConfig : IMareConfiguration
{
public int Version { get; set; } = 1;
public bool AutoPausePlayersExceedingThresholds { get; set; } = false;
public bool NotifyAutoPauseDirectPairs { get; set; } = true;
public bool NotifyAutoPauseGroupPairs { get; set; } = false;
public int VRAMSizeAutoPauseThresholdMiB { get; set; } = 550;
public int TrisAutoPauseThresholdThousands { get; set; } = 375;
public bool IgnoreDirectPairs { get; set; } = true;
public TextureShrinkMode TextureShrinkMode { get; set; } = TextureShrinkMode.Default;
public bool TextureShrinkDeleteOriginal { get; set; } = false;
}

View File

@@ -0,0 +1,13 @@
using System.Text.Json.Nodes;
namespace MareSynchronos.MareConfiguration.Configurations;
public class RemoteConfigCache : IMareConfiguration
{
public int Version { get; set; } = 0;
public ulong Timestamp { get; set; } = 0;
public string Origin { get; set; } = string.Empty;
public DateTimeOffset? LastModified { get; set; } = null;
public string ETag { get; set; } = string.Empty;
public JsonObject Configuration { get; set; } = new();
}

View File

@@ -0,0 +1,10 @@
using MareSynchronos.MareConfiguration.Models;
namespace MareSynchronos.MareConfiguration.Configurations;
[Serializable]
public class ServerBlockConfig : IMareConfiguration
{
public Dictionary<string, ServerBlockStorage> ServerBlocks { get; set; } = new(StringComparer.Ordinal);
public int Version { get; set; } = 0;
}

View File

@@ -0,0 +1,17 @@
using MareSynchronos.MareConfiguration.Models;
using MareSynchronos.WebAPI;
namespace MareSynchronos.MareConfiguration.Configurations;
[Serializable]
public class ServerConfig : IMareConfiguration
{
public int CurrentServer { get; set; } = 0;
public List<ServerStorage> ServerStorage { get; set; } = new()
{
{ new ServerStorage() { ServerName = ApiController.ElezenServer, ServerUri = ApiController.ElezenServiceUri } },
};
public int Version { get; set; } = 1;
}

View File

@@ -0,0 +1,10 @@
using MareSynchronos.MareConfiguration.Models;
namespace MareSynchronos.MareConfiguration.Configurations;
[Serializable]
public class ServerTagConfig : IMareConfiguration
{
public Dictionary<string, ServerTagStorage> ServerTagStorage { get; set; } = new(StringComparer.OrdinalIgnoreCase);
public int Version { get; set; } = 0;
}

View File

@@ -0,0 +1,10 @@
using MareSynchronos.MareConfiguration.Models;
namespace MareSynchronos.MareConfiguration.Configurations;
[Serializable]
public class SyncshellConfig : IMareConfiguration
{
public Dictionary<string, ServerShellStorage> ServerShellStorage { get; set; } = new(StringComparer.Ordinal);
public int Version { get; set; } = 0;
}

View File

@@ -0,0 +1,7 @@
namespace MareSynchronos.MareConfiguration.Configurations;
public class TransientConfig : IMareConfiguration
{
public Dictionary<string, HashSet<string>> PlayerPersistentTransientCache { get; set; } = new(StringComparer.Ordinal);
public int Version { get; set; } = 0;
}

View File

@@ -0,0 +1,10 @@
using MareSynchronos.MareConfiguration.Models;
namespace MareSynchronos.MareConfiguration.Configurations;
[Serializable]
public class UidNotesConfig : IMareConfiguration
{
public Dictionary<string, ServerNotesStorage> ServerNotes { get; set; } = new(StringComparer.Ordinal);
public int Version { get; set; } = 0;
}

View File

@@ -0,0 +1,11 @@
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, (uint Mip0Size, int MipCount, ushort Width, ushort Height)> TexDictionary { get; set; } = new(StringComparer.OrdinalIgnoreCase);
public ConcurrentDictionary<string, Dictionary<string, List<ushort>>> BonesDictionary { get; set; } = new(StringComparer.OrdinalIgnoreCase);
public int Version { get; set; } = 0;
}