Compare commits

17 Commits

Author SHA1 Message Date
zoe
71966f1b69 Update the Moodles IPC to 3.0. 2025-09-03 17:24:15 -04:00
459622a17e Update the PetNicknames IPC to 4.0. 2025-09-03 16:58:12 -04:00
0fde8dc00f Penumbra IPC change test 2025-09-01 18:37:44 +02:00
c4d1f427cd disable the census popup 2025-08-30 21:34:44 +02:00
806cabf3b4 change context menu prefix icon 2025-08-30 21:32:56 +02:00
65f2bbf6f7 removed intro agreement accept timer lol 2025-08-30 21:30:10 +02:00
a56ccc5211 rebranding changes
I hope I got everything but its a lot tbh
2025-08-30 21:25:22 +02:00
N. Lo.
eccfc5b3f0 Add option to set visible pairs as focus targets (#85) 2025-08-16 23:17:18 +02:00
rootdarkarchon
0c834f5edd fix sig 2025-08-08 23:39:37 +02:00
rootdarkarchon
b15f6f2c2a fix aid discrepancy 2025-08-08 23:21:17 +02:00
N. Lo.
108bbe2a02 Make it build against Dalamud 13 (#84) 2025-08-08 22:42:18 +02:00
rootdarkarchon
f94af2cc9e Merge branch 'main' of https://github.com/Penumbra-Sync/client 2025-06-30 23:49:11 +02:00
rootdarkarchon
11535caf7e debounce, ignore processing when dead only in duty 2025-06-30 23:49:05 +02:00
rootdarkarchon
95969eeb7c format some shit 2025-04-21 10:28:04 +02:00
rootdarkarchon
c0870e85df rebuild aid on login 2025-04-21 10:25:01 +02:00
Stanley Dimant
85058379e7 easiest solutions to problems is just to remove the thing causing the problem 2025-04-13 22:21:50 +02:00
Stanley Dimant
a3e62f5529 fix gpose world stuff 2025-04-10 20:17:58 +02:00
64 changed files with 417 additions and 441 deletions

1
.gitignore vendored
View File

@@ -9,6 +9,7 @@
*.user
*.userosscache
*.sln.docstates
.idea/*
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "MareAPI"]
path = MareAPI
url = https://github.com/Penumbra-Sync/api.git
url = https://git.namazu.gay/friendlynamazu/api.git

View File

@@ -106,7 +106,7 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase
public void StopMonitoring()
{
Logger.LogInformation("Stopping monitoring of Penumbra and Mare storage folders");
Logger.LogInformation("Stopping monitoring of Penumbra and Namazu storage folders");
MareWatcher?.Dispose();
PenumbraWatcher?.Dispose();
MareWatcher = null;
@@ -121,15 +121,15 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase
if (string.IsNullOrEmpty(marePath) || !Directory.Exists(marePath))
{
MareWatcher = null;
Logger.LogWarning("Mare file path is not set, cannot start the FSW for Mare.");
Logger.LogWarning("Namazu file path is not set, cannot start the FSW for Namazu.");
return;
}
DriveInfo di = new(new DirectoryInfo(_configService.Current.CacheFolder).Root.FullName);
StorageisNTFS = string.Equals("NTFS", di.DriveFormat, StringComparison.OrdinalIgnoreCase);
Logger.LogInformation("Mare Storage is on NTFS drive: {isNtfs}", StorageisNTFS);
Logger.LogInformation("Namazu Storage is on NTFS drive: {isNtfs}", StorageisNTFS);
Logger.LogDebug("Initializing Mare FSW on {path}", marePath);
Logger.LogDebug("Initializing Namazu FSW on {path}", marePath);
MareWatcher = new()
{
Path = marePath,
@@ -150,7 +150,7 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase
private void MareWatcher_FileChanged(object sender, FileSystemEventArgs e)
{
Logger.LogTrace("Mare FSW: FileChanged: {change} => {path}", e.ChangeType, e.FullPath);
Logger.LogTrace("Namazu FSW: FileChanged: {change} => {path}", e.ChangeType, e.FullPath);
if (!AllowedFileExtensions.Any(ext => e.FullPath.EndsWith(ext, StringComparison.OrdinalIgnoreCase))) return;
@@ -478,7 +478,7 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase
if (string.IsNullOrEmpty(_configService.Current.CacheFolder) || !Directory.Exists(_configService.Current.CacheFolder))
{
cacheDirExists = false;
Logger.LogWarning("Mare Cache directory is not set or does not exist.");
Logger.LogWarning("Namazu Cache directory is not set or does not exist.");
}
if (!penDirExists || !cacheDirExists)
{

View File

@@ -418,7 +418,7 @@ public sealed class FileCacheManager : IHostedService
if (!_ipcManager.Penumbra.APIAvailable || string.IsNullOrEmpty(_ipcManager.Penumbra.ModDirectory))
{
_mareMediator.Publish(new NotificationMessage("Penumbra not connected",
"Could not load local file cache data. Penumbra is not connected or not properly set up. Please enable and/or configure Penumbra properly to use Mare. After, reload Mare in the Plugin installer.",
"Could not load local file cache data. Penumbra is not connected or not properly set up. Please enable and/or configure Penumbra properly to use Namazu. After, reload Namazu in the Plugin installer.",
MareConfiguration.Models.NotificationType.Error));
}

View File

@@ -97,7 +97,7 @@ public sealed class IpcCallerGlamourer : DisposableMediatorSubscriberBase, IIpcC
if (!apiAvailable && !_shownGlamourerUnavailable)
{
_shownGlamourerUnavailable = true;
_mareMediator.Publish(new NotificationMessage("Glamourer inactive", "Your Glamourer installation is not active or out of date. Update Glamourer to continue to use Mare. If you just updated Glamourer, ignore this message.",
_mareMediator.Publish(new NotificationMessage("Glamourer inactive", "Your Glamourer installation is not active or out of date. Update Glamourer to continue to use Namazu. If you just updated Glamourer, ignore this message.",
NotificationType.Error));
}
}

View File

@@ -27,9 +27,9 @@ public sealed class IpcCallerMoodles : IIpcCaller
_moodlesApiVersion = pi.GetIpcSubscriber<int>("Moodles.Version");
_moodlesOnChange = pi.GetIpcSubscriber<IPlayerCharacter, object>("Moodles.StatusManagerModified");
_moodlesGetStatus = pi.GetIpcSubscriber<nint, string>("Moodles.GetStatusManagerByPtr");
_moodlesSetStatus = pi.GetIpcSubscriber<nint, string, object>("Moodles.SetStatusManagerByPtr");
_moodlesRevertStatus = pi.GetIpcSubscriber<nint, object>("Moodles.ClearStatusManagerByPtr");
_moodlesGetStatus = pi.GetIpcSubscriber<nint, string>("Moodles.GetStatusManagerByPtrV2");
_moodlesSetStatus = pi.GetIpcSubscriber<nint, string, object>("Moodles.SetStatusManagerByPtrV2");
_moodlesRevertStatus = pi.GetIpcSubscriber<nint, object>("Moodles.ClearStatusManagerByPtrV2");
_moodlesOnChange.Subscribe(OnMoodlesChange);
@@ -47,7 +47,7 @@ public sealed class IpcCallerMoodles : IIpcCaller
{
try
{
APIAvailable = _moodlesApiVersion.InvokeFunc() == 1;
APIAvailable = _moodlesApiVersion.InvokeFunc() == 3;
}
catch
{

View File

@@ -126,7 +126,7 @@ public sealed class IpcCallerPenumbra : DisposableMediatorSubscriberBase, IIpcCa
{
_shownPenumbraUnavailable = true;
_mareMediator.Publish(new NotificationMessage("Penumbra inactive",
"Your Penumbra installation is not active or out of date. Update Penumbra and/or the Enable Mods setting in Penumbra to continue to use Mare. If you just updated Penumbra, ignore this message.",
"Your Penumbra installation is not active or out of date. Update Penumbra and/or the Enable Mods setting in Penumbra to continue to use Namazu. If you just updated Penumbra, ignore this message.",
NotificationType.Error));
}
}
@@ -215,8 +215,10 @@ public sealed class IpcCallerPenumbra : DisposableMediatorSubscriberBase, IIpcCa
return await _dalamudUtil.RunOnFrameworkThread(() =>
{
var collName = "Mare_" + uid;
var collId = _penumbraCreateNamedTemporaryCollection.Invoke(collName);
var collName = "Namazu_" + uid;
// I'm assuming the identity penumbra wants is what the calling plugin is
// we'll have to see if I'm correct
_penumbraCreateNamedTemporaryCollection.Invoke("NamazuSync", collName, out var collId);
logger.LogTrace("Creating Temp Collection {collName}, GUID: {collId}", collName, collId);
return collId;
@@ -284,7 +286,7 @@ public sealed class IpcCallerPenumbra : DisposableMediatorSubscriberBase, IIpcCa
await _dalamudUtil.RunOnFrameworkThread(() =>
{
logger.LogTrace("[{applicationId}] Manip: {data}", applicationId, manipulationData);
var retAdd = _penumbraAddTemporaryMod.Invoke("MareChara_Meta", collId, [], manipulationData, 0);
var retAdd = _penumbraAddTemporaryMod.Invoke("NamazuChara_Meta", collId, [], manipulationData, 0);
logger.LogTrace("[{applicationId}] Setting temp meta mod for {collId}, Success: {ret}", applicationId, collId, retAdd);
}).ConfigureAwait(false);
}
@@ -299,9 +301,9 @@ public sealed class IpcCallerPenumbra : DisposableMediatorSubscriberBase, IIpcCa
{
logger.LogTrace("[{applicationId}] Change: {from} => {to}", applicationId, mod.Key, mod.Value);
}
var retRemove = _penumbraRemoveTemporaryMod.Invoke("MareChara_Files", collId, 0);
var retRemove = _penumbraRemoveTemporaryMod.Invoke("NamazuChara_Files", collId, 0);
logger.LogTrace("[{applicationId}] Removing temp files mod for {collId}, Success: {ret}", applicationId, collId, retRemove);
var retAdd = _penumbraAddTemporaryMod.Invoke("MareChara_Files", collId, modPaths, string.Empty, 0);
var retAdd = _penumbraAddTemporaryMod.Invoke("NamazuChara_Files", collId, modPaths, string.Empty, 0);
logger.LogTrace("[{applicationId}] Setting temp files mod for {collId}, Success: {ret}", applicationId, collId, retAdd);
}).ConfigureAwait(false);
}

View File

@@ -30,12 +30,12 @@ public sealed class IpcCallerPetNames : IIpcCaller
_dalamudUtil = dalamudUtil;
_mareMediator = mareMediator;
_petnamesReady = pi.GetIpcSubscriber<object>("PetRenamer.Ready");
_petnamesDisposing = pi.GetIpcSubscriber<object>("PetRenamer.Disposing");
_petnamesReady = pi.GetIpcSubscriber<object>("PetRenamer.OnReady");
_petnamesDisposing = pi.GetIpcSubscriber<object>("PetRenamer.OnDisposing");
_apiVersion = pi.GetIpcSubscriber<(uint, uint)>("PetRenamer.ApiVersion");
_enabled = pi.GetIpcSubscriber<bool>("PetRenamer.Enabled");
_enabled = pi.GetIpcSubscriber<bool>("PetRenamer.IsEnabled");
_playerDataChanged = pi.GetIpcSubscriber<string, object>("PetRenamer.PlayerDataChanged");
_playerDataChanged = pi.GetIpcSubscriber<string, object>("PetRenamer.OnPlayerDataChanged");
_getPlayerData = pi.GetIpcSubscriber<string>("PetRenamer.GetPlayerData");
_setPlayerData = pi.GetIpcSubscriber<string, object>("PetRenamer.SetPlayerData");
_clearPlayerData = pi.GetIpcSubscriber<ushort, object>("PetRenamer.ClearPlayerData");
@@ -56,7 +56,7 @@ public sealed class IpcCallerPetNames : IIpcCaller
APIAvailable = _enabled?.InvokeFunc() ?? false;
if (APIAvailable)
{
APIAvailable = _apiVersion?.InvokeFunc() is { Item1: 3, Item2: >= 1 };
APIAvailable = _apiVersion?.InvokeFunc() is { Item1: 4, Item2: >= 0 };
}
}
catch
@@ -84,7 +84,7 @@ public sealed class IpcCallerPetNames : IIpcCaller
{
string localNameData = _getPlayerData.InvokeFunc();
return string.IsNullOrEmpty(localNameData) ? string.Empty : localNameData;
}
}
catch (Exception e)
{
_logger.LogWarning(e, "Could not obtain Pet Nicknames data");

View File

@@ -19,7 +19,7 @@ public unsafe class VfxSpawnManager : DisposableMediatorSubscriberBase
[Signature("E8 ?? ?? ?? ?? F3 0F 10 35 ?? ?? ?? ?? 48 89 43 08")]
private readonly delegate* unmanaged<byte*, byte*, VfxStruct*> _staticVfxCreate;
[Signature("E8 ?? ?? ?? ?? 8B 4B 7C 85 C9")]
[Signature("E8 ?? ?? ?? ?? ?? ?? ?? 8B 4A ?? 85 C9")]
private readonly delegate* unmanaged<VfxStruct*, float, int, ulong> _staticVfxRun;
[Signature("40 53 48 83 EC 20 48 8B D9 48 8B 89 ?? ?? ?? ?? 48 85 C9 74 28 33 D2 E8 ?? ?? ?? ?? 48 8B 8B ?? ?? ?? ?? 48 85 C9")]

View File

@@ -37,7 +37,7 @@ public static class Strings
"The service holds no information about which mod files belong to which mod.");
public readonly string Paragraph6 = Loc.Localize("Paragraph6",
"This service is provided as-is. In case of abuse join the Mare Synchronos Discord.");
"This service is provided as-is. In case of abuse join the Namazu Sync Discord.");
public readonly string ReadLabel = Loc.Localize("ReadLabel", "READ THIS CAREFULLY");
}

View File

@@ -32,7 +32,7 @@
"description": "ToSStrings..ctor"
},
"Paragraph6": {
"message": "Dieser Dienst wird ohne Gewähr angeboten. Im Falle eines Missbrauchs tretet dem Mare Synchronos Discord bei.",
"message": "Dieser Dienst wird ohne Gewähr angeboten. Im Falle eines Missbrauchs tretet dem Namazu Sync Discord bei.",
"description": "ToSStrings..ctor"
},
"AgreeLabel": {

View File

@@ -32,7 +32,7 @@
"description": "ToSStrings..ctor"
},
"Paragraph6": {
"message": "Ce service et ses composants vous sont fournis en l'état. En cas d'abus rejoindre le serveur Discord Mare Synchronos.",
"message": "Ce service et ses composants vous sont fournis en l'état. En cas d'abus rejoindre le serveur Discord Namazu Sync.",
"description": "ToSStrings..ctor"
},
"AgreeLabel": {

View File

@@ -59,4 +59,5 @@ public class MareConfig : IMareConfiguration
public bool AutoPopulateEmptyNotesFromCharaName { get; set; } = false;
public int Version { get; set; } = 1;
public NotificationLocation WarningNotification { get; set; } = NotificationLocation.Both;
public bool UseFocusTarget { get; set; } = false;
}

View File

@@ -14,55 +14,53 @@ namespace MareSynchronos;
#pragma warning disable S125 // Sections of code should not be commented out
/*
(..,,...,,,,,+/, ,,.....,,+
..,,+++/((###%%%&&%%#(+,,.,,,+++,,,,//,,#&@@@@%+.
...+//////////(/,,,,++,.,(###((//////////,.. .,#@@%/./
,..+/////////+///,.,. ,&@@@@,,/////////////+,.. ,(##+,.
,,.+//////////++++++.. ./#%#,+/////////////+,....,/((,..,
+..////////////+++++++... .../##(,,////////////////++,,,+/(((+,
+,.+//////////////+++++++,.,,,/(((+.,////////////////////////((((#/,,
/+.+//////////++++/++++++++++,,...,++///////////////////////////((((##,
/,.////////+++++++++++++++++++++////////+++//////++/+++++//////////((((#(+,
/+.+////////+++++++++++++++++++++++++++++++++++++++++++++++++++++/////((((##+
+,.///////////////+++++++++++++++++++++++++++++++++++++++++++++++++++///((((%/
/.,/////////////////+++++++++++++++++++++++++++++++++++++++++++++++++++///+/(#+
+,./////////////////+++++++++++++++++++++++++++++++++++++++++++++++,,+++++///((,
...////////++/++++++++++++++++++++++++,,++++++++++++++++++++++++++++++++++++//(,,
..//+,+///++++++++++++++++++,,,,+++,,,,,,,,,,,,++++++++,,+++++++++++++++++++//,,+
..,++,.++++++++++++++++++++++,,,,,,,,,,,,,,,,,,,++++++++,,,,,,,,,,++++++++++...
..+++,.+++++++++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,++,..,.
..,++++,,+++++++++++,+,,,,,,,,,,..,+++++++++,,,,,,.....................,//+,+
....,+++++,.,+++++++++++,,,,,,,,.+///(((((((((((((///////////////////////(((+,,,
.....,++++++++++..,+++++++++++,,.,,,.////////(((((((((((((((////////////////////+,,/
.....,++++++++++++,..,,+++++++++,,.,../////////////////((((((((((//////////////////,,+
...,,+++++++++++++,.,,.,,,+++++++++,.,/////////////////(((//++++++++++++++//+++++++++/,,
....,++++++++++++++,.,++.,++++++++++++.,+////////////////////+++++++++++++++++++++++++///,,..
...,++++++++++++++++..+++..+++++++++++++.,//////////////////////////++++++++++++///////++++......
...++++++++++++++++++..++++.,++,++++++++++.+///////////////////////////////////////////++++++..,,,..
...+++++++++++++++++++..+++++..,+,,+++++++++.+//////////////////////////////////////////+++++++...,,,,..
..++++++++++++++++++++..++++++..,+,,+++++++++.+//////////////////////////////////////++++++++++,....,,,,..
...+++//(//////+++++++++..++++++,.,+++++++++++++,..,....,,,+++///////////////////////++++++++++++..,,,,,,,,...
..,++/(((((//////+++++++,.,++++++,,.,,,+++++++++++++++++++++++,.++////////////////////+++++++++++.....,,,,,,,...
..,//#(((((///////+++++++..++++++++++,...,++,++++++++++++++++,...+++/////////////////////+,,,+++... ....,,,,,,...
...+//(((((//////////++++++..+++++++++++++++,......,,,,++++++,,,..+++////////////////////////+,.... ...,,,,,,,...
..,//((((////////////++++++..++++++/+++++++++++++,,...,,........,+/+//////////////////////((((/+,.. ....,.,,,,..
...+/////////////////////+++..++++++/+///+++++++++++++++++++++///+/+////////////////////////(((((/+... .......,,...
..++////+++//////////////++++.+++++++++///////++++++++////////////////////////////////////+++/(((((/+.. .....,,...
.,++++++++///////////////++++..++++//////////////////////////////////////////////////////++++++/((((++.. ........
.+++++++++////////////////++++,.+++/////////////////////////////////////////////////////+++++++++/((/++..
.,++++++++//////////////////++++,.+++//////////////////////////////////////////////////+++++++++++++//+++..
.++++++++//////////////////////+/,.,+++////((((////////////////////////////////////////++++++++++++++++++...
.++++++++///////////////////////+++..++++//((((((((///////////////////////////////////++++++++++++++++++++ .
.++++++///////////////////////////++,.,+++++/(((((((((/////////////////////////////+++++++++++++++++++++++,..
.++++++////////////////////////////+++,.,+++++++/((((((((//////////////////////////++++++++++++++++++++++++..
.+++++++///////////////////++////////++++,.,+++++++++///////////+////////////////+++++++++++++++++++++++++,..
..++++++++++//////////////////////+++++++..+...,+++++++++++++++/++++++++++++++++++++++++++++++++++++++++++,...
..++++++++++++///////////////+++++++,...,,,,,.,....,,,,+++++++++++++++++++++++++++++++++++++++++++++++,,,,...
...++++++++++++++++++++++++++,,,,...,,,,,,,,,..,,++,,,.,,,,,,,,,,,,,,,,,,+++++++++++++++++++++++++,,,,,,,,..
...+++++++++++++++,,,,,,,,....,,,,,,,,,,,,,,,..,,++++++,,,,,,,,,,,,,,,,+++++++++++++++++++++++++,,,,,,,,,..
...++++++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,...,++++++++++++++++++++++++++++++++++++++++++++,,,,,,,,,,...
,....,++++++++++++++,,,+++++++,,,,,,,,,,,,,,,,,.,++++++++++++++++++++++++++++++++++++++++++++,,,,,,,,..
::::::::-=-:::::-----=--==========+===========-:--------------=--=======++++++++++++++++++++++++****
:::::::::-::::::-----==-=======-===+===+++===---::-::-------------==========================+++++*+*
:::::::::::::----::--==--======--==+++*+==-==---::::-:-------------------=========+++++******++++***
::::::::::::-=--------===-====------=++=--=+=---::::-:::-------==========++++==================+++*+
::::::::::::-==--=---=====-----------=+++=+=----:----------------------------==================+++++
:::::::::::-===-----============:::::::::---===-::::::----------------------==================+====+
:::::::::::--====-:-----=+*====------:::-======----:-:--------------------========================++
:::::::::::--=--==-::--*####+==--------=++++======-===---------------------=======================++
:::::::::::-----===--###****##=-----======------------==------------------------------====--=======+
:::::::::::------==*#**********+====+===+#%%@@@%%###%%@@@%%%##%@@@@%%%%#+--------------------=--===+
::::::::::::-----=##*******##**#%%%%%%###%%%%%%%####%%%%%%%#**%%@%%%%#*%%%%#+--------------=====+*==
::::::::::::----=*#***###%%##*##%%%###***#####*++****###*+===######**==#%%###%+------==----=====++==
::::::::::::----+**##**###**+++*+++++=+++++===--=++======--=++++===--=***+=-+#*-----------------=+--
:::::::::::::--=+***+++++=========---------::---------===-----------------==+=----------------------
::::::::::::::---++=====------:::::-::-------------========-=---------------=-----------------------
:::::::::::::::--==----------------------------========++==========---------------------------------
...::::::::::::--==---------------:::------======++=++++++++++++======--:---------------------------
..::::::::::::------------------+****+:-======+++++++******+++++++===--###*+------------------------
....:::::::::------------------*#+:::**-===++++++******###*******+++==+%+::=*-----------------------
--::::::::::::::--------------=%@+::-#%==+++++***###%%%%%@%%%%##***++++@@-:=%==---------=+**++++++++
---------=========----==--=====#%%@@@%*=++***##%%@@@@@@%%####%%%%%%#**+*%%%%*=+==+**++==--::::::::::
:====::.::::::::::--====+===++++==++==+**##%%@@@%#*+++===-====++*##%%%#*++=+**++===-:::::----:--::::
:==+===-=-::::::------:--==++**###****##%%@@%*+=-::::::::::::------=+*%%#######*+-::::::::::::::::::
.---------::::::------===++**##%%%%%%%%%%#+--:::::::::::::::::::::----=+#%%%%%#**+-::::::::::::::::-
.:::::::-:::::::----===+++**####%%%%%%%*+:..........................::--*%%%###**+-::....:::::::::::
.:::::::-:::::::--===++++*********####%%:.:::.......................:-=*%#***++++=:.......:--:::::::
::::::::--::::::-===++++++*************#%%%*=---:::::::::::::-------+%%%+++=====--........:::::::-::
::::::::::-::::.:-=+++++++++++++++++++*+**#%%@@@%%#*+++++*+++**#%%%%%*+==-------:........:-:::::::::
::::::::::::::::::-=+++============+++++++++++***#%@@@@@@@@@%%%#**+=------::-::::........:----::::::
.......:.:........::.-===========================+++++++++++=====-------::::::::.........:...::::...
...................:.....:======------*%=-====--=-========-------::::=*#-:--::...............::.....
..................-::.......-======--=%+--------------::::::::::::::::=#*--:................:::.....
....:::.:........-::::::.......:-====*#---------------------:::::::--=-=#:.....::...........::......
.:::...........:-::::::::::.......:::+=:==++===--::-::-:::::--===-:....:*:......:::........::.......
..............:-::::::::::::::.....::=:::::::::::..:::-::...............=......:::::......:::.......
....:::::.....-::::::::::::::::.....=-::::::::::::::-==-----::.....:-+**=.......:::::....:::........
:::::::::::::::::::::::::::::::::....+*********++===========-----*****#*........::::::::.::---------
::::::::::::::::::::::::..::::::::....+********=+==============---****#:.........:::::::::::::::::::
::::::::::::::::::::::.....::::::::....+******=======++*****+++==-:***=............:::::::::::::::::
:::::::::::::::::::::....:::::::::::....**###*======+*##%##*++==---:+#............::::::::::::::::::
::::::::::::::::::::....:::::::::::::...-###*===----::-+*##*=-::..::=*..............::::::..........
:::::::::::.::::::::....::::::::::::::...#%%#=------=+*##+...-:::::.=-.............::::::...........
:::::::::::--:::::::..::::::::::::::::...=%%%*-------=+**:...-::::::#:....:.......::::-::...........
:::::::::::----==:::..:::::::::::::::::..:%####=---:::----..-::::..##......:......:.-==--:::::::...:
::::::::::----==:::::::::::::::::::::::...######=--:::::::........###............:----==--::::::::::
::::::::::---==:::::::::::::::::::==+*:...*#######--:::::.......*####..:---......:---::===-.:.:.::::
:::::::::---==:::::::::::::--::::=-:=+....*########*=--::...:=+**####..--:::..:....----:-==:........
*/
#pragma warning restore S125 // Sections of code should not be commented out
@@ -89,9 +87,9 @@ public class MarePlugin : MediatorSubscriberBase, IHostedService
public Task StartAsync(CancellationToken cancellationToken)
{
var version = Assembly.GetExecutingAssembly().GetName().Version!;
Logger.LogInformation("Launching {name} {major}.{minor}.{build}", "Mare Synchronos", version.Major, version.Minor, version.Build);
Logger.LogInformation("Launching {name} {major}.{minor}.{build}", "Namazu Sync", version.Major, version.Minor, version.Build);
Mediator.Publish(new EventMessage(new Services.Events.Event(nameof(MarePlugin), Services.Events.EventSeverity.Informational,
$"Starting Mare Synchronos {version.Major}.{version.Minor}.{version.Build}")));
$"Starting Namazu Sync {version.Major}.{version.Minor}.{version.Build}")));
Mediator.Subscribe<SwitchToMainUiMessage>(this, (msg) => { if (_launchTask == null || _launchTask.IsCompleted) _launchTask = Task.Run(WaitForPlayerAndLaunchCharacterManager); });
Mediator.Subscribe<DalamudLoginMessage>(this, (_) => DalamudUtilOnLogIn());
@@ -108,7 +106,7 @@ public class MarePlugin : MediatorSubscriberBase, IHostedService
DalamudUtilOnLogOut();
Logger.LogDebug("Halting MarePlugin");
Logger.LogDebug("Halting NamazuPlugin");
return Task.CompletedTask;
}
@@ -155,7 +153,7 @@ public class MarePlugin : MediatorSubscriberBase, IHostedService
if (_mareConfigService.Current.LogLevel != LogLevel.Information)
{
Mediator.Publish(new NotificationMessage("Abnormal Log Level",
$"Your log level is set to '{_mareConfigService.Current.LogLevel}' which is not recommended for normal usage. Set it to '{LogLevel.Information}' in \"Mare Settings -> Debug\" unless instructed otherwise.",
$"Your log level is set to '{_mareConfigService.Current.LogLevel}' which is not recommended for normal usage. Set it to '{LogLevel.Information}' in \"Namazu Settings -> Debug\" unless instructed otherwise.",
MareConfiguration.Models.NotificationType.Error, TimeSpan.FromSeconds(15000)));
}
#endif

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Dalamud.NET.Sdk/12.0.2">
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
<PropertyGroup>
<Authors></Authors>
<Company></Company>
@@ -18,6 +18,7 @@
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockfileAssemblies>true</CopyLocalLockfileAssemblies>
<AssemblyName>NamazuSync</AssemblyName>
</PropertyGroup>
<ItemGroup>
@@ -27,7 +28,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="DalamudPackager" Version="12.0.0" />
<PackageReference Include="Downloader" Version="3.3.4" />
<PackageReference Include="K4os.Compression.LZ4.Legacy" Version="1.3.8" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.189">
@@ -39,9 +39,9 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.3" />
<PackageReference Include="Glamourer.Api" Version="2.4.0" />
<PackageReference Include="NReco.Logging.File" Version="1.2.2" />
<PackageReference Include="Penumbra.Api" Version="5.6.0" />
<PackageReference Include="Penumbra.Api" Version="5.12.0" />
<PackageReference Include="Penumbra.String" Version="1.0.5" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.7.0.110445">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

View File

@@ -1,9 +1,9 @@
{
"Author": "darkarchon",
"Name": "Mare Synchronos",
"Author": "Friendly Namazu",
"Name": "Namazu Sync",
"Punchline": "Let others see you as you see yourself.",
"Description": "This plugin will synchronize your Penumbra mods and current Glamourer state with other paired clients automatically.",
"InternalName": "mareSynchronos",
"InternalName": "namazusync",
"ApplicableVersion": "any",
"Tags": [
"customization"

View File

@@ -71,7 +71,7 @@ public class Pair
Name = openProfileSeString,
OnClicked = (a) => _mediator.Publish(new ProfileOpenStandaloneMessage(this)),
UseDefaultPrefix = false,
PrefixChar = 'M',
PrefixChar = 'N',
PrefixColor = 526
});
@@ -80,7 +80,7 @@ public class Pair
Name = reapplyDataSeString,
OnClicked = (a) => ApplyLastReceivedData(forced: true),
UseDefaultPrefix = false,
PrefixChar = 'M',
PrefixChar = 'N',
PrefixColor = 526
});
@@ -89,7 +89,7 @@ public class Pair
Name = changePermissions,
OnClicked = (a) => _mediator.Publish(new OpenPermissionWindow(this)),
UseDefaultPrefix = false,
PrefixChar = 'M',
PrefixChar = 'N',
PrefixColor = 526
});
@@ -98,7 +98,7 @@ public class Pair
Name = cyclePauseState,
OnClicked = (a) => _mediator.Publish(new CyclePauseMessage(UserData)),
UseDefaultPrefix = false,
PrefixChar = 'M',
PrefixChar = 'N',
PrefixColor = 526
});
}

View File

@@ -195,7 +195,7 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
_creationCts.Cancel();
_creationCts.Dispose();
_creationCts = new();
_cacheCreateLock.Wait();
_cacheCreateLock.Wait(_creationCts.Token);
var objectKindsToCreate = _cachesToCreate.ToList();
foreach (var creationObj in objectKindsToCreate)
{
@@ -208,12 +208,14 @@ public sealed class CacheCreationService : DisposableMediatorSubscriberBase
{
using var linkedCts = CancellationTokenSource.CreateLinkedTokenSource(_creationCts.Token, _runtimeCts.Token);
await Task.Delay(TimeSpan.FromSeconds(1), linkedCts.Token).ConfigureAwait(false);
Logger.LogDebug("Creating Caches for {objectKinds}", string.Join(", ", objectKindsToCreate));
try
{
Dictionary<ObjectKind, CharacterDataFragment?> createdData = [];
foreach (var objectKind in objectKindsToCreate)
foreach (var objectKind in _currentlyCreating)
{
createdData[objectKind] = await _characterDataFactory.BuildCharacterData(_playerRelatedObjects[objectKind], linkedCts.Token).ConfigureAwait(false);
}

View File

@@ -76,7 +76,7 @@ public sealed class Plugin : IDalamudPlugin
{
lb.ClearProviders();
lb.AddDalamudLogging(pluginLog, gameData.HasModifiedGameDataFiles);
lb.AddFile(Path.Combine(traceDir, $"mare-trace-{DateTime.Now:yyyy-MM-dd-HH-mm-ss}.log"), (opt) =>
lb.AddFile(Path.Combine(traceDir, $"namazu-trace-{DateTime.Now:yyyy-MM-dd-HH-mm-ss}.log"), (opt) =>
{
opt.Append = true;
opt.RollingFilesConvention = FileLoggerOptions.FileRollingConvention.Ascending;
@@ -87,7 +87,7 @@ public sealed class Plugin : IDalamudPlugin
})
.ConfigureServices(collection =>
{
collection.AddSingleton(new WindowSystem("MareSynchronos"));
collection.AddSingleton(new WindowSystem("NamazuSync"));
collection.AddSingleton<FileDialogManager>();
collection.AddSingleton(new Dalamud.Localization("MareSynchronos.Localization.", "", useEmbedded: true));
@@ -133,8 +133,9 @@ public sealed class Plugin : IDalamudPlugin
collection.AddSingleton((s) => new EventAggregator(pluginInterface.ConfigDirectory.FullName,
s.GetRequiredService<ILogger<EventAggregator>>(), s.GetRequiredService<MareMediator>()));
collection.AddSingleton((s) => new DalamudUtilService(s.GetRequiredService<ILogger<DalamudUtilService>>(),
clientState, objectTable, framework, gameGui, condition, gameData, targetManager, gameConfig, sigScanner,
s.GetRequiredService<BlockedCharacterHandler>(), s.GetRequiredService<MareMediator>(), s.GetRequiredService<PerformanceCollectorService>()));
clientState, objectTable, framework, gameGui, condition, gameData, targetManager, gameConfig,
s.GetRequiredService<BlockedCharacterHandler>(), s.GetRequiredService<MareMediator>(), s.GetRequiredService<PerformanceCollectorService>(),
s.GetRequiredService<MareConfigService>()));
collection.AddSingleton((s) => new DtrEntry(s.GetRequiredService<ILogger<DtrEntry>>(), dtrBar, s.GetRequiredService<MareConfigService>(),
s.GetRequiredService<MareMediator>(), s.GetRequiredService<PairManager>(), s.GetRequiredService<ApiController>()));
collection.AddSingleton(s => new PairManager(s.GetRequiredService<ILogger<PairManager>>(), s.GetRequiredService<PairFactory>(),
@@ -167,7 +168,7 @@ public sealed class Plugin : IDalamudPlugin
{
var httpClient = new HttpClient();
var ver = Assembly.GetExecutingAssembly().GetName().Version;
httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("MareSynchronos", ver!.Major + "." + ver!.Minor + "." + ver!.Build));
httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("NamazuSync", ver!.Major + "." + ver!.Minor + "." + ver!.Build));
return httpClient;
});
collection.AddSingleton((s) => new MareConfigService(pluginInterface.ConfigDirectory.FullName));

View File

@@ -141,7 +141,7 @@ public sealed class CharaDataFileHandler : IDisposable
using var reader = new BinaryReader(lz4Stream);
var loadedCharaFile = MareCharaFileHeader.FromBinaryReader(filePath, reader);
_logger.LogInformation("Read Mare Chara File");
_logger.LogInformation("Read Namazu Chara File");
_logger.LogInformation("Version: {ver}", (loadedCharaFile?.Version ?? -1));
long expectedLength = 0;
if (loadedCharaFile != null)
@@ -193,7 +193,7 @@ public sealed class CharaDataFileHandler : IDisposable
Dictionary<string, string> gamePathToFilePath = new(StringComparer.Ordinal);
foreach (var fileData in charaFileHeader.CharaFileData.Files)
{
var fileName = Path.Combine(_fileCacheManager.CacheFolder, "mare_" + _globalFileCounter++ + ".tmp");
var fileName = Path.Combine(_fileCacheManager.CacheFolder, "namazu_" + _globalFileCounter++ + ".tmp");
extractedFiles.Add(fileName);
var length = fileData.Length;
var bufferSize = length;
@@ -291,7 +291,7 @@ public sealed class CharaDataFileHandler : IDisposable
}
catch (Exception ex)
{
_logger.LogError(ex, "Failure Saving Mare Chara File, deleting output");
_logger.LogError(ex, "Failure Saving Namazu Chara File, deleting output");
File.Delete(tempFilePath);
}
}

View File

@@ -147,17 +147,18 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
{
return UiBlockingComputation = DataApplicationTask = Task.Run(async () =>
{
var charaName = await _dalamudUtilService.RunOnFrameworkThread(() => _dalamudUtilService.GposeTargetGameObject?.Name.TextValue).ConfigureAwait(false)
?? string.Empty;
var obj = await _dalamudUtilService.GetGposeTargetGameObjectAsync().ConfigureAwait(false);
var charaName = obj?.Name.TextValue ?? string.Empty;
if (string.IsNullOrEmpty(charaName)) return;
await ApplyCharaData(dataMetaInfoDto, charaName).ConfigureAwait(false);
});
}
public void ApplyOwnDataToGposeTarget(CharaDataFullExtendedDto dataDto)
public async Task ApplyOwnDataToGposeTarget(CharaDataFullExtendedDto dataDto)
{
var charaName = _dalamudUtilService.GposeTargetGameObject?.Name.TextValue ?? string.Empty;
var chara = await _dalamudUtilService.GetGposeTargetGameObjectAsync().ConfigureAwait(false);
var charaName = chara?.Name.TextValue ?? string.Empty;
CharaDataDownloadDto downloadDto = new(dataDto.Id, dataDto.Uploader)
{
CustomizeData = dataDto.CustomizeData,
@@ -184,7 +185,7 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
{
return UiBlockingComputation = Task.Run(async () =>
{
if (string.IsNullOrEmpty(pose.PoseData) || !CanApplyInGpose(out _)) return;
if (string.IsNullOrEmpty(pose.PoseData) || !(await CanApplyInGpose().ConfigureAwait(false)).CanApply) return;
var gposeChara = await _dalamudUtilService.GetGposeCharacterFromObjectTableByNameAsync(targetName, true).ConfigureAwait(false);
if (gposeChara == null) return;
@@ -199,9 +200,11 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
{
return UiBlockingComputation = Task.Run(async () =>
{
if (CanApplyInGpose(out var chara))
var apply = await CanApplyInGpose().ConfigureAwait(false);
if (apply.CanApply)
{
await ApplyPoseData(pose, chara).ConfigureAwait(false);
await ApplyPoseData(pose, apply.TargetName).ConfigureAwait(false);
}
});
}
@@ -210,7 +213,8 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
{
return UiBlockingComputation = Task.Run(async () =>
{
if (pose.WorldData == default || !CanApplyInGpose(out _)) return;
var apply = await CanApplyInGpose().ConfigureAwait(false);
if (pose.WorldData == default || !(await CanApplyInGpose().ConfigureAwait(false)).CanApply) return;
var gposeChara = await _dalamudUtilService.GetGposeCharacterFromObjectTableByNameAsync(targetName, true).ConfigureAwait(false);
if (gposeChara == null) return;
@@ -226,9 +230,10 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
{
return UiBlockingComputation = Task.Run(async () =>
{
if (CanApplyInGpose(out var chara))
var apply = await CanApplyInGpose().ConfigureAwait(false);
if (apply.CanApply)
{
await ApplyPoseData(pose, chara).ConfigureAwait(false);
await ApplyPoseData(pose, apply.TargetName).ConfigureAwait(false);
}
});
}
@@ -259,19 +264,21 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
});
}
public bool CanApplyInGpose(out string targetName)
public async Task<(bool CanApply, string TargetName)> CanApplyInGpose()
{
bool canApply = _dalamudUtilService.IsInGpose && _dalamudUtilService.GposeTargetGameObject != null
&& _dalamudUtilService.GposeTargetGameObject.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player;
var obj = await _dalamudUtilService.GetGposeTargetGameObjectAsync().ConfigureAwait(false);
string targetName = string.Empty;
bool canApply = _dalamudUtilService.IsInGpose && obj != null
&& obj.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player;
if (canApply)
{
targetName = _dalamudUtilService.GposeTargetGameObject!.Name.TextValue;
targetName = obj!.Name.TextValue;
}
else
{
targetName = "Invalid Target";
}
return canApply;
return (canApply, targetName);
}
public void CancelDataApplication()
@@ -503,11 +510,12 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
});
}
public void McdfApplyToGposeTarget()
public async Task McdfApplyToGposeTarget()
{
if (CanApplyInGpose(out string target))
var apply = await CanApplyInGpose().ConfigureAwait(false);
if (apply.CanApply)
{
McdfApplyToTarget(target);
McdfApplyToTarget(apply.TargetName);
}
}
@@ -733,7 +741,7 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
_dalamudUtilService.GposeTarget = (FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject*)newActor.Address;
}
McdfApplyToGposeTarget();
await McdfApplyToGposeTarget().ConfigureAwait(false);
});
}
@@ -750,10 +758,11 @@ public sealed partial class CharaDataManager : DisposableMediatorSubscriberBase
{
UiBlockingComputation = Task.Run(async () =>
{
if (CanApplyInGpose(out var gposeTarget))
var apply = await CanApplyInGpose().ConfigureAwait(false);
if (apply.CanApply)
{
await ApplyPoseData(value, gposeTarget).ConfigureAwait(false);
await ApplyWorldDataToTarget(value, gposeTarget).ConfigureAwait(false);
await ApplyPoseData(value, apply.TargetName).ConfigureAwait(false);
await ApplyWorldDataToTarget(value, apply.TargetName).ConfigureAwait(false);
}
});
}

View File

@@ -185,7 +185,7 @@ public sealed class CharacterAnalyzer : MediatorSubscriberBase, IDisposable
LastAnalysis.Values.Sum(v => v.Values.Count),
UiSharedService.ByteToString(LastAnalysis.Values.Sum(c => c.Values.Sum(v => v.OriginalSize))),
UiSharedService.ByteToString(LastAnalysis.Values.Sum(c => c.Values.Sum(v => v.CompressedSize))));
Logger.LogInformation("IMPORTANT NOTES:\n\r- For Mare up- and downloads only the compressed size is relevant.\n\r- An unusually high total files count beyond 200 and up will also increase your download time to others significantly.");
Logger.LogInformation("IMPORTANT NOTES:\n\r- For Namazu up- and downloads only the compressed size is relevant.\n\r- An unusually high total files count beyond 200 and up will also increase your download time to others significantly.");
}
internal sealed record FileDataEntry(string Hash, string FileType, List<string> GamePaths, List<string> FilePaths, long OriginalSize, long CompressedSize, long Triangles)

View File

@@ -13,7 +13,7 @@ namespace MareSynchronos.Services;
public sealed class CommandManagerService : IDisposable
{
private const string _commandName = "/mare";
private const string _commandName = "/namazu";
private readonly ApiController _apiController;
private readonly ICommandManager _commandManager;
@@ -36,13 +36,13 @@ public sealed class CommandManagerService : IDisposable
_mareConfigService = mareConfigService;
_commandManager.AddHandler(_commandName, new CommandInfo(OnCommand)
{
HelpMessage = "Opens the Mare Synchronos UI" + Environment.NewLine + Environment.NewLine +
HelpMessage = "Opens the Namazu Synchronos UI" + Environment.NewLine + Environment.NewLine +
"Additionally possible commands:" + Environment.NewLine +
"\t /mare toggle - Disconnects from Mare, if connected. Connects to Mare, if disconnected" + Environment.NewLine +
"\t /mare toggle on|off - Connects or disconnects to Mare respectively" + Environment.NewLine +
"\t /mare gpose - Opens the Mare Character Data Hub window" + Environment.NewLine +
"\t /mare analyze - Opens the Mare Character Data Analysis window" + Environment.NewLine +
"\t /mare settings - Opens the Mare Settings window"
"\t /namazu toggle - Disconnects from Namazu, if connected. Connects to Namazu, if disconnected" + Environment.NewLine +
"\t /namazu toggle on|off - Connects or disconnects to Namazu respectively" + Environment.NewLine +
"\t /namazu gpose - Opens the Namazu Character Data Hub window" + Environment.NewLine +
"\t /namazu analyze - Opens the Namazu Character Data Analysis window" + Environment.NewLine +
"\t /namazu settings - Opens the Namazu Settings window"
});
}
@@ -72,7 +72,7 @@ public sealed class CommandManagerService : IDisposable
{
if (_apiController.ServerState == WebAPI.SignalR.Utils.ServerState.Disconnecting)
{
_mediator.Publish(new NotificationMessage("Mare disconnecting", "Cannot use /toggle while Mare Synchronos is still disconnecting",
_mediator.Publish(new NotificationMessage("Namazu disconnecting", "Cannot use /toggle while Namazu Sync is still disconnecting",
NotificationType.Error));
}

View File

@@ -13,6 +13,7 @@ using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using Lumina.Excel.Sheets;
using MareSynchronos.API.Dto.CharaData;
using MareSynchronos.Interop;
using MareSynchronos.MareConfiguration;
using MareSynchronos.PlayerData.Handlers;
using MareSynchronos.Services.Mediator;
using MareSynchronos.Utils;
@@ -38,6 +39,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
private readonly ILogger<DalamudUtilService> _logger;
private readonly IObjectTable _objectTable;
private readonly PerformanceCollectorService _performanceCollector;
private readonly MareConfigService _configService;
private uint? _classJobId = 0;
private DateTime _delayedFrameworkUpdateCheck = DateTime.UtcNow;
private string _lastGlobalBlockPlayer = string.Empty;
@@ -46,13 +48,12 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
private readonly Dictionary<string, (string Name, nint Address)> _playerCharas = new(StringComparer.Ordinal);
private readonly List<string> _notUpdatedCharas = [];
private bool _sentBetweenAreas = false;
private readonly Dictionary<ulong, string> _aidCache = [];
private readonly Lazy<uint> _aid;
private int _aidCounter = 0;
private Lazy<ulong> _cid;
public DalamudUtilService(ILogger<DalamudUtilService> logger, IClientState clientState, IObjectTable objectTable, IFramework framework,
IGameGui gameGui, ICondition condition, IDataManager gameData, ITargetManager targetManager, IGameConfig gameConfig, ISigScanner sigScanner,
BlockedCharacterHandler blockedCharacterHandler, MareMediator mediator, PerformanceCollectorService performanceCollector)
IGameGui gameGui, ICondition condition, IDataManager gameData, ITargetManager targetManager, IGameConfig gameConfig,
BlockedCharacterHandler blockedCharacterHandler, MareMediator mediator, PerformanceCollectorService performanceCollector,
MareConfigService configService)
{
_logger = logger;
_clientState = clientState;
@@ -65,6 +66,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
_blockedCharacterHandler = blockedCharacterHandler;
Mediator = mediator;
_performanceCollector = performanceCollector;
_configService = configService;
WorldData = new(() =>
{
return gameData.GetExcelSheet<Lumina.Excel.Sheets.World>(Dalamud.Game.ClientLanguage.English)!
@@ -120,23 +122,21 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
if (string.IsNullOrEmpty(name)) return;
var addr = _playerCharas.FirstOrDefault(f => string.Equals(f.Value.Name, name, StringComparison.Ordinal)).Value.Address;
if (addr == nint.Zero) return;
var useFocusTarget = _configService.Current.UseFocusTarget;
_ = RunOnFrameworkThread(() =>
{
targetManager.Target = CreateGameObject(addr);
if (useFocusTarget)
targetManager.FocusTarget = CreateGameObject(addr);
else
targetManager.Target = CreateGameObject(addr);
}).ConfigureAwait(false);
});
IsWine = Util.IsWine();
_aid = new(() =>
{
unsafe
{
var address = sigScanner.GetStaticAddressFromSig("48 8B 0D ?? ?? ?? ?? 4C 8B CA");
return (uint)(address != nint.Zero ? (*(ulong**)address)[1] : 0u);
}
});
_cid = RebuildCID();
}
private Lazy<ulong> RebuildCID() => new(GetCID);
public bool IsWine { get; init; }
public unsafe GameObject* GposeTarget
@@ -144,7 +144,17 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
get => TargetSystem.Instance()->GPoseTarget;
set => TargetSystem.Instance()->GPoseTarget = value;
}
public unsafe IGameObject? GposeTargetGameObject => GposeTarget == null ? null : _objectTable[GposeTarget->ObjectIndex];
private unsafe bool HasGposeTarget => GposeTarget != null;
private unsafe int GPoseTargetIdx => !HasGposeTarget ? -1 : GposeTarget->ObjectIndex;
public async Task<IGameObject?> GetGposeTargetGameObjectAsync()
{
if (!HasGposeTarget)
return null;
return await _framework.RunOnFrameworkThread(() => _objectTable[GPoseTargetIdx]).ConfigureAwait(true);
}
public bool IsAnythingDrawing { get; private set; } = false;
public bool IsInCutscene { get; private set; } = false;
public bool IsInGpose { get; private set; } = false;
@@ -159,7 +169,6 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
public Lazy<Dictionary<uint, string>> TerritoryData { get; private set; }
public Lazy<Dictionary<uint, (Map Map, string MapName)>> MapData { get; private set; }
public bool IsLodEnabled { get; private set; }
public MareMediator Mediator { get; }
public IGameObject? CreateGameObject(IntPtr reference)
@@ -298,20 +307,12 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
public async Task<string> GetPlayerNameHashedAsync()
{
return await RunOnFrameworkThread(() => _aid.Value.ToString().GetHash256()).ConfigureAwait(false);
return await RunOnFrameworkThread(() => _cid.Value.ToString().GetHash256()).ConfigureAwait(false);
}
private unsafe string GetHashedAccIdFromPlayerPointer(nint ptr)
private unsafe static string GetHashedCIDFromPlayerPointer(nint ptr)
{
if (ptr == nint.Zero) return "UNK" + _aidCounter++;
var aid = ((BattleChara*)ptr)->Character.AccountId;
if (!_aidCache.TryGetValue(aid, out string? hash))
{
var player = GetPlayerCharacter();
if (player == null) return "UNK" + _aidCounter++;
_aidCache[aid] = hash = unchecked((uint)(((((BattleChara*)player.Address)->Character.AccountId ^ aid) >> 31) ^ _aid.Value)).ToString().GetHash256();
}
return hash;
return ((BattleChara*)ptr)->Character.ContentId.ToString().GetHash256();
}
public IntPtr GetPlayerPtr()
@@ -604,7 +605,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
private unsafe void FrameworkOnUpdateInternal()
{
if (_clientState.LocalPlayer?.IsDead ?? false)
if ((_clientState.LocalPlayer?.IsDead ?? false) && _condition[ConditionFlag.BoundByDuty])
{
return;
}
@@ -632,7 +633,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
}
var charaName = ((GameObject*)chara.Address)->NameString;
var hash = GetHashedAccIdFromPlayerPointer(chara.Address);
var hash = GetHashedCIDFromPlayerPointer(chara.Address);
if (!IsAnythingDrawing)
CheckCharacterForDrawing(chara.Address, charaName);
_notUpdatedCharas.Remove(hash);
@@ -748,6 +749,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
_logger.LogDebug("Logged in");
IsLoggedIn = true;
_lastZone = _clientState.TerritoryType;
_cid = RebuildCID();
Mediator.Publish(new DalamudLoginMessage());
}
else if (localPlayer == null && IsLoggedIn)

File diff suppressed because one or more lines are too long

View File

@@ -59,7 +59,7 @@ public sealed class MareMediator : IHostedService
public Task StartAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Starting MareMediator");
_logger.LogInformation("Starting NamazuMediator");
_ = Task.Run(async () =>
{
@@ -83,7 +83,7 @@ public sealed class MareMediator : IHostedService
}
});
_logger.LogInformation("Started MareMediator");
_logger.LogInformation("Started NamazuMediator");
return Task.CompletedTask;
}

View File

@@ -41,19 +41,19 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
private void PrintErrorChat(string? message)
{
SeStringBuilder se = new SeStringBuilder().AddText("[Mare Synchronos] Error: " + message);
SeStringBuilder se = new SeStringBuilder().AddText("[Namazu Sync] Error: " + message);
_chatGui.PrintError(se.BuiltString);
}
private void PrintInfoChat(string? message)
{
SeStringBuilder se = new SeStringBuilder().AddText("[Mare Synchronos] Info: ").AddItalics(message ?? string.Empty);
SeStringBuilder se = new SeStringBuilder().AddText("[Namazu Sync] Info: ").AddItalics(message ?? string.Empty);
_chatGui.Print(se.BuiltString);
}
private void PrintWarnChat(string? message)
{
SeStringBuilder se = new SeStringBuilder().AddText("[Mare Synchronos] ").AddUiForeground("Warning: " + (message ?? string.Empty), 31).AddUiForegroundOff();
SeStringBuilder se = new SeStringBuilder().AddText("[Namazu Sync] ").AddUiForeground("Warning: " + (message ?? string.Empty), 31).AddUiForegroundOff();
_chatGui.Print(se.BuiltString);
}

View File

@@ -43,8 +43,8 @@ public sealed class XivDataAnalyzer
if ((nint)handle == nint.Zero) continue;
var curBones = handle->BoneCount;
// this is unrealistic, the filename shouldn't ever be that long
if (handle->ResourceHandle.FileName.Length > 1024) continue;
var skeletonName = handle->ResourceHandle.FileName.ToString();
if (handle->FileName.Length > 1024) continue;
var skeletonName = handle->FileName.ToString();
if (string.IsNullOrEmpty(skeletonName)) continue;
outputIndices[skeletonName] = new();
for (ushort boneIdx = 0; boneIdx < curBones; boneIdx++)

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.Services.CharaData.Models;
namespace MareSynchronos.UI;

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface.Colors;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Interface.Utility;
using Dalamud.Interface;
using ImGuiNET;
using MareSynchronos.API.Dto.CharaData;
using MareSynchronos.Services.CharaData.Models;
using System.Numerics;
@@ -560,10 +560,10 @@ internal sealed partial class CharaDataHubUi
private void DrawMcdOnline()
{
_uiSharedService.BigText("Mare Character Data Online");
_uiSharedService.BigText("Namazu Character Data Online");
DrawHelpFoldout("In this tab you can create, view and edit your own Mare Character Data that is stored on the server." + Environment.NewLine + Environment.NewLine
+ "Mare Character Data Online functions similar to the previous MCDF standard for exporting your character, except that you do not have to send a file to the other person but solely a code." + Environment.NewLine + Environment.NewLine
DrawHelpFoldout("In this tab you can create, view and edit your own Namazu Character Data that is stored on the server." + Environment.NewLine + Environment.NewLine
+ "Namazu Character Data Online functions similar to the previous MCDF standard for exporting your character, except that you do not have to send a file to the other person but solely a code." + Environment.NewLine + Environment.NewLine
+ "There would be a bit too much to explain here on what you can do here in its entirety, however, all elements in this tab have help texts attached what they are used for. Please review them carefully." + Environment.NewLine + Environment.NewLine
+ "Be mindful that when you share your Character Data with other people there is a chance that, with the help of unsanctioned 3rd party plugins, your appearance could be stolen irreversibly, just like when using MCDF.");

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface.Colors;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Interface.Utility;
using Dalamud.Interface;
using ImGuiNET;
using System.Numerics;
namespace MareSynchronos.UI;
@@ -56,7 +56,7 @@ internal partial class CharaDataHubUi
_configService.Current.NearbyDrawWisps = showWisps;
_configService.Save();
}
_uiSharedService.DrawHelpText("When enabled, Mare will draw floating wisps where other's poses are in the world.");
_uiSharedService.DrawHelpText("When enabled, Namazu will draw floating wisps where other's poses are in the world.");
int poseDetectionDistance = _configService.Current.NearbyDistanceFilter;
UiSharedService.ScaledNextItemWidth(100);
if (ImGui.SliderInt("Detection Distance", ref poseDetectionDistance, 5, 1000))
@@ -71,7 +71,7 @@ internal partial class CharaDataHubUi
_configService.Current.NearbyShowAlways = alwaysShow;
_configService.Save();
}
_uiSharedService.DrawHelpText("This will allow Mare to continue the calculation of position of wisps etc. active outside of the 'Poses Nearby' tab." + UiSharedService.TooltipSeparator
_uiSharedService.DrawHelpText("This will allow Namazu to continue the calculation of position of wisps etc. active outside of the 'Poses Nearby' tab." + UiSharedService.TooltipSeparator
+ "Note: The wisps etc. will disappear during combat and performing.");
});

View File

@@ -1,9 +1,9 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.ImGuiFileDialog;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.API.Dto.CharaData;
using MareSynchronos.MareConfiguration;
using MareSynchronos.MareConfiguration.Models;
@@ -79,7 +79,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
UiSharedService uiSharedService, ServerConfigurationManager serverConfigurationManager,
DalamudUtilService dalamudUtilService, FileDialogManager fileDialogManager, PairManager pairManager,
CharaDataGposeTogetherManager charaDataGposeTogetherManager)
: base(logger, mediator, "Mare Synchronos Character Data Hub###MareSynchronosCharaDataUI", performanceCollectorService)
: base(logger, mediator, "Namazu Sync Character Data Hub###NamazuSyncCharaDataUI", performanceCollectorService)
{
SetWindowSizeConstraints();
@@ -165,7 +165,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
UpdateFilteredFavorites();
}
_hasValidGposeTarget = _charaDataManager.CanApplyInGpose(out _gposeTarget);
(_hasValidGposeTarget, _gposeTarget) = _charaDataManager.CanApplyInGpose().GetAwaiter().GetResult();
if (!_charaDataManager.BrioAvailable)
{
@@ -383,7 +383,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
UiSharedService.AttachToolTip($"Target the GPose Character {CharaName(actor.Name.TextValue)}");
ImGui.AlignTextToFramePadding();
var pos = ImGui.GetCursorPosX();
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen, actor.Address == (_dalamudUtilService.GposeTargetGameObject?.Address ?? nint.Zero)))
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen, actor.Address == (_dalamudUtilService.GetGposeTargetGameObjectAsync().GetAwaiter().GetResult()?.Address ?? nint.Zero)))
{
ImGui.TextUnformatted(CharaName(actor.Name.TextValue));
}
@@ -832,7 +832,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
{
if (_uiSharedService.IconTextButton(FontAwesomeIcon.ArrowRight, "Apply"))
{
_charaDataManager.McdfApplyToGposeTarget();
_ = _charaDataManager.McdfApplyToGposeTarget();
}
UiSharedService.AttachToolTip($"Apply to {_gposeTarget}");
ImGui.SameLine();
@@ -863,9 +863,9 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
private void DrawMcdfExport()
{
_uiSharedService.BigText("Mare Character Data File Export");
_uiSharedService.BigText("Namazu Character Data File Export (MCDF)");
DrawHelpFoldout("This feature allows you to pack your character into a MCDF file and manually send it to other people. MCDF files can officially only be imported during GPose through Mare. " +
DrawHelpFoldout("This feature allows you to pack your character into a MCDF file and manually send it to other people. MCDF files can officially only be imported during GPose through Namazu. " +
"Be aware that the possibility exists that people write unofficial custom exporters to extract the containing data.");
ImGuiHelpers.ScaledDummy(5);
@@ -1054,7 +1054,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
_configService.Current.OpenMareHubOnGposeStart = openInGpose;
_configService.Save();
}
_uiSharedService.DrawHelpText("This will automatically open the import menu when loading into Gpose. If unchecked you can open the menu manually with /mare gpose");
_uiSharedService.DrawHelpText("This will automatically open the import menu when loading into Gpose. If unchecked you can open the menu manually with /namazu gpose");
bool downloadDataOnConnection = _configService.Current.DownloadMcdDataOnConnection;
if (ImGui.Checkbox("Download MCD Online Data on connecting", ref downloadDataOnConnection))
{

View File

@@ -1,9 +1,9 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Utility;
using ImGuiNET;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.API.Dto.Group;
using MareSynchronos.Interop.Ipc;
@@ -58,7 +58,7 @@ public class CompactUi : WindowMediatorSubscriberBase
ServerConfigurationManager serverManager, MareMediator mediator, FileUploadManager fileTransferManager,
TagHandler tagHandler, DrawEntityFactory drawEntityFactory, SelectTagForPairUi selectTagForPairUi, SelectPairForTagUi selectPairForTagUi,
PerformanceCollectorService performanceCollectorService, IpcManager ipcManager)
: base(logger, mediator, "###MareSynchronosMainUI", performanceCollectorService)
: base(logger, mediator, "###NamazuSyncMainUI", performanceCollectorService)
{
_uiSharedService = uiShared;
_configService = configService;
@@ -88,7 +88,7 @@ public class CompactUi : WindowMediatorSubscriberBase
ShowTooltip = () =>
{
ImGui.BeginTooltip();
ImGui.Text("Open Mare Settings");
ImGui.Text("Open Namazu Settings");
ImGui.EndTooltip();
}
},
@@ -103,7 +103,7 @@ public class CompactUi : WindowMediatorSubscriberBase
ShowTooltip = () =>
{
ImGui.BeginTooltip();
ImGui.Text("Open Mare Event Viewer");
ImGui.Text("Open Namazu Event Viewer");
ImGui.EndTooltip();
}
}
@@ -114,11 +114,11 @@ public class CompactUi : WindowMediatorSubscriberBase
#if DEBUG
string dev = "Dev Build";
var ver = Assembly.GetExecutingAssembly().GetName().Version!;
WindowName = $"Mare Synchronos {dev} ({ver.Major}.{ver.Minor}.{ver.Build})###MareSynchronosMainUI";
WindowName = $"Namazu Sync {dev} ({ver.Major}.{ver.Minor}.{ver.Build})###NamazuSyncMainUI";
Toggle();
#else
var ver = Assembly.GetExecutingAssembly().GetName().Version;
WindowName = "Mare Synchronos " + ver.Major + "." + ver.Minor + "." + ver.Build + "###MareSynchronosMainUI";
WindowName = "Namazu Sync " + ver.Major + "." + ver.Minor + "." + ver.Build + "###NamazuSyncMainUI";
#endif
Mediator.Subscribe<SwitchToMainUiMessage>(this, (_) => IsOpen = true);
Mediator.Subscribe<SwitchToIntroUiMessage>(this, (_) => IsOpen = false);
@@ -151,8 +151,8 @@ public class CompactUi : WindowMediatorSubscriberBase
ImGui.AlignTextToFramePadding();
ImGui.TextColored(ImGuiColors.DalamudRed, unsupported);
}
UiSharedService.ColorTextWrapped($"Your Mare Synchronos installation is out of date, the current version is {ver.Major}.{ver.Minor}.{ver.Build}. " +
$"It is highly recommended to keep Mare Synchronos up to date. Open /xlplugins and update the plugin.", ImGuiColors.DalamudRed);
UiSharedService.ColorTextWrapped($"Your Namazu Sync installation is out of date, the current version is {ver.Major}.{ver.Minor}.{ver.Build}. " +
$"It is highly recommended to keep Namazu Sync up to date. Open /xlplugins and update the plugin.", ImGuiColors.DalamudRed);
}
if (!_ipcManager.Initialized)
@@ -169,7 +169,7 @@ public class CompactUi : WindowMediatorSubscriberBase
var penumAvailable = _ipcManager.Penumbra.APIAvailable;
var glamAvailable = _ipcManager.Glamourer.APIAvailable;
UiSharedService.ColorTextWrapped($"One or more Plugins essential for Mare operation are unavailable. Enable or update following plugins:", ImGuiColors.DalamudRed);
UiSharedService.ColorTextWrapped($"One or more Plugins essential for Namazu operation are unavailable. Enable or update following plugins:", ImGuiColors.DalamudRed);
using var indent = ImRaii.PushIndent(10f);
if (!penumAvailable)
{
@@ -242,35 +242,6 @@ public class CompactUi : WindowMediatorSubscriberBase
}
}
private void DrawAddCharacter()
{
ImGuiHelpers.ScaledDummy(10f);
var keys = _serverManager.CurrentServer!.SecretKeys;
if (keys.Any())
{
if (_secretKeyIdx == -1) _secretKeyIdx = keys.First().Key;
if (_uiSharedService.IconTextButton(FontAwesomeIcon.Plus, "Add current character with secret key"))
{
_serverManager.CurrentServer!.Authentications.Add(new MareConfiguration.Models.Authentication()
{
CharacterName = _uiSharedService.PlayerName,
WorldId = _uiSharedService.WorldId,
SecretKeyIdx = _secretKeyIdx
});
_serverManager.Save();
_ = _apiController.CreateConnectionsAsync();
}
_uiSharedService.DrawCombo("Secret Key##addCharacterSecretKey", keys, (f) => f.Value.FriendlyName, (f) => _secretKeyIdx = f.Key);
}
else
{
UiSharedService.ColorTextWrapped("No secret keys are configured for the current server.", ImGuiColors.DalamudYellow);
}
}
private void DrawPairs()
{
var ySize = _transferPartHeight == 0
@@ -452,23 +423,9 @@ public class CompactUi : WindowMediatorSubscriberBase
else
{
UiSharedService.ColorTextWrapped(GetServerError(), GetUidColor());
if (_apiController.ServerState is ServerState.NoSecretKey)
{
DrawAddCharacter();
}
if (_apiController.ServerState is ServerState.OAuthLoginTokenStale)
{
DrawRenewOAuth2();
}
}
}
private void DrawRenewOAuth2()
{
ImGuiHelpers.ScaledDummy(10f);
// add some text and a button to restart discord authentication
}
private IEnumerable<IDrawFolder> GetDrawFolders()
{
List<IDrawFolder> drawFolders = [];
@@ -609,19 +566,19 @@ public class CompactUi : WindowMediatorSubscriberBase
{
ServerState.Connecting => "Attempting to connect to the server.",
ServerState.Reconnecting => "Connection to server interrupted, attempting to reconnect to the server.",
ServerState.Disconnected => "You are currently disconnected from the Mare Synchronos server.",
ServerState.Disconnected => "You are currently disconnected from the Namazu Sync server.",
ServerState.Disconnecting => "Disconnecting from the server",
ServerState.Unauthorized => "Server Response: " + _apiController.AuthFailureMessage,
ServerState.Offline => "Your selected Mare Synchronos server is currently offline.",
ServerState.Offline => "Your selected Namazu Sync server is currently offline.",
ServerState.VersionMisMatch =>
"Your plugin or the server you are connecting to is out of date. Please update your plugin now. If you already did so, contact the server provider to update their server to the latest version.",
ServerState.RateLimited => "You are rate limited for (re)connecting too often. Disconnect, wait 10 minutes and try again.",
ServerState.Connected => string.Empty,
ServerState.NoSecretKey => "You have no secret key set for this current character. Use the button below or open the settings and set a secret key for the current character. You can reuse the same secret key for multiple characters.",
ServerState.NoSecretKey => "You have no secret key set for this current character. Open Settings -> Service Settings and set a secret key for the current character. You can reuse the same secret key for multiple characters.",
ServerState.MultiChara => "Your Character Configuration has multiple characters configured with same name and world. You will not be able to connect until you fix this issue. Remove the duplicates from the configuration in Settings -> Service Settings -> Character Management and reconnect manually after.",
ServerState.OAuthMisconfigured => "OAuth2 is enabled but not fully configured, verify in the Settings -> Service Settings that you have OAuth2 connected and, importantly, a UID assigned to your current character.",
ServerState.OAuthLoginTokenStale => "Your OAuth2 login token is stale and cannot be used to renew. Go to the Settings -> Service Settings and unlink then relink your OAuth2 configuration.",
ServerState.NoAutoLogon => "This character has automatic login into Mare disabled. Press the connect button to connect to Mare.",
ServerState.NoAutoLogon => "This character has automatic login into Namazu disabled. Press the connect button to connect to Namazu.",
_ => string.Empty
};
}

View File

@@ -1,6 +1,6 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.PlayerData.Pairs;
using MareSynchronos.UI.Handlers;
using System.Collections.Immutable;

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.API.Dto.Group;
using MareSynchronos.PlayerData.Pairs;

View File

@@ -1,6 +1,6 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.PlayerData.Pairs;
using MareSynchronos.UI.Handlers;

View File

@@ -1,6 +1,6 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.UI.Handlers;
using System.Collections.Immutable;
using System.Numerics;

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.API.Dto.Group;
using MareSynchronos.API.Dto.User;

View File

@@ -1,5 +1,5 @@
using Dalamud.Interface;
using ImGuiNET;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using MareSynchronos.API.Dto.Group;
using MareSynchronos.PlayerData.Pairs;
using MareSynchronos.Services.Mediator;

View File

@@ -1,5 +1,5 @@
using Dalamud.Interface.Utility;
using ImGuiNET;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Utility;
using MareSynchronos.Services.ServerConfiguration;
using System.Numerics;
@@ -26,22 +26,22 @@ public class CensusPopupHandler : IPopupHandler
var start = 0f;
using (_uiSharedService.UidFont.Push())
{
start = ImGui.GetCursorPosY() - ImGui.CalcTextSize("Mare Census Data").Y;
UiSharedService.TextWrapped("Mare Census Participation");
start = ImGui.GetCursorPosY() - ImGui.CalcTextSize("Namazu Census Data").Y;
UiSharedService.TextWrapped("Namazu Census Participation");
}
ImGuiHelpers.ScaledDummy(5f);
UiSharedService.TextWrapped("If you are seeing this popup you are updating from a Mare version that did not collect census data. Please read the following carefully.");
UiSharedService.TextWrapped("If you are seeing this popup you are updating from a Namazu version that did not collect census data. Please read the following carefully.");
ImGui.Separator();
UiSharedService.TextWrapped("Mare Census is a data collecting service that can be used for statistical purposes. " +
"All data collected through Mare Census is temporary and will be stored associated with your UID on the connected service as long as you are connected. " +
UiSharedService.TextWrapped("Namazu Census is a data collecting service that can be used for statistical purposes. " +
"All data collected through Namazu Census is temporary and will be stored associated with your UID on the connected service as long as you are connected. " +
"The data cannot be used for long term tracking of individuals.");
UiSharedService.TextWrapped("If enabled, Mare Census will collect following data:" + Environment.NewLine
UiSharedService.TextWrapped("If enabled, Namazu Census will collect following data:" + Environment.NewLine
+ "- Currently connected World" + Environment.NewLine
+ "- Current Gender (reflecting Glamourer changes)" + Environment.NewLine
+ "- Current Race (reflecting Glamourer changes)" + Environment.NewLine
+ "- Current Clan (i.e. Seeker of the Sun, Keeper of the Moon, etc., reflecting Glamourer changes)");
UiSharedService.TextWrapped("To consent to collecting census data press the appropriate button below.");
UiSharedService.TextWrapped("This setting can be changed anytime in the Mare Settings.");
UiSharedService.TextWrapped("This setting can be changed anytime in the Namazu Settings.");
var width = ImGui.GetWindowContentRegionMax().X - ImGui.GetWindowContentRegionMin().X;
var buttonSize = ImGuiHelpers.GetButtonSize("I consent to send my census data");
ImGuiHelpers.ScaledDummy(5f);

View File

@@ -1,7 +1,7 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.Services;
using MareSynchronos.Services.Mediator;
using Microsoft.Extensions.Logging;
@@ -18,7 +18,7 @@ public class PopupHandler : WindowMediatorSubscriberBase
public PopupHandler(ILogger<PopupHandler> logger, MareMediator mediator, IEnumerable<IPopupHandler> popupHandlers,
PerformanceCollectorService performanceCollectorService, UiSharedService uiSharedService)
: base(logger, mediator, "MarePopupHandler", performanceCollectorService)
: base(logger, mediator, "NamazuPopupHandler", performanceCollectorService)
{
Flags = ImGuiWindowFlags.NoBringToFrontOnFocus
| ImGuiWindowFlags.NoDecoration

View File

@@ -1,5 +1,5 @@
using Dalamud.Interface.Utility;
using ImGuiNET;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Utility;
using MareSynchronos.PlayerData.Pairs;
using MareSynchronos.UI.Handlers;

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Utility;
using ImGuiNET;
using MareSynchronos.PlayerData.Pairs;
using MareSynchronos.UI.Handlers;

View File

@@ -1,6 +1,6 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Utility;
using ImGuiNET;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.API.Dto.Group;
using MareSynchronos.Services;
@@ -20,7 +20,7 @@ public class CreateSyncshellUI : WindowMediatorSubscriberBase
public CreateSyncshellUI(ILogger<CreateSyncshellUI> logger, MareMediator mareMediator, ApiController apiController, UiSharedService uiSharedService,
PerformanceCollectorService performanceCollectorService)
: base(logger, mareMediator, "Create new Syncshell###MareSynchronosCreateSyncshell", performanceCollectorService)
: base(logger, mareMediator, "Create new Syncshell###NamazuSyncCreateSyncshell", performanceCollectorService)
{
_apiController = apiController;
_uiSharedService = uiSharedService;
@@ -76,7 +76,7 @@ public class CreateSyncshellUI : WindowMediatorSubscriberBase
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("- VFX");
_uiSharedService.BooleanToColoredIcon(!_apiController.DefaultPermissions!.DisableGroupVFX);
UiSharedService.TextWrapped("(Those preferred permissions can be changed anytime after Syncshell creation, your defaults can be changed anytime in the Mare Settings)");
UiSharedService.TextWrapped("(Those preferred permissions can be changed anytime after Syncshell creation, your defaults can be changed anytime in the Namazu Settings)");
}
else
{

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.API.Data.Enum;
using MareSynchronos.FileCache;
using MareSynchronos.Interop.Ipc;
@@ -44,7 +44,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
PerformanceCollectorService performanceCollectorService, UiSharedService uiSharedService,
PlayerPerformanceConfigService playerPerformanceConfig, TransientResourceManager transientResourceManager,
TransientConfigService transientConfigService)
: base(logger, mediator, "Mare Character Data Analysis", performanceCollectorService)
: base(logger, mediator, "Namazu Character Data Analysis", performanceCollectorService)
{
_characterAnalyzer = characterAnalyzer;
_ipcManager = ipcManager;
@@ -166,10 +166,10 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
UiSharedService.DrawTree("What is this? (Explanation / Help)", () =>
{
UiSharedService.TextWrapped("This tab allows you to see which transient files are attached to your character.");
UiSharedService.TextWrapped("Transient files are files that cannot be resolved to your character permanently. Mare gathers these files in the background while you execute animations, VFX, sound effects, etc.");
UiSharedService.TextWrapped("When sending your character data to others, Mare will combine the files listed in \"All Jobs\" and the corresponding currently used job.");
UiSharedService.TextWrapped("Transient files are files that cannot be resolved to your character permanently. Namazu gathers these files in the background while you execute animations, VFX, sound effects, etc.");
UiSharedService.TextWrapped("When sending your character data to others, Namazu will combine the files listed in \"All Jobs\" and the corresponding currently used job.");
UiSharedService.TextWrapped("The purpose of this tab is primarily informational for you to see which files you are carrying with you. You can remove added game paths, however if you are using the animations etc. again, "
+ "Mare will automatically attach these after using them. If you disable associated mods in Penumbra, the associated entries here will also be deleted automatically.");
+ "Namazu will automatically attach these after using them. If you disable associated mods in Penumbra, the associated entries here will also be deleted automatically.");
});
ImGuiHelpers.ScaledDummy(5);
@@ -292,7 +292,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
}
}
UiSharedService.AttachToolTip("Hold CTRL to delete all game paths from the displayed list"
+ UiSharedService.TooltipSeparator + "You usually do not need to do this. All animation and VFX data will be automatically handled through Mare.");
+ UiSharedService.TooltipSeparator + "You usually do not need to do this. All animation and VFX data will be automatically handled through Namazu.");
ImGuiHelpers.ScaledDummy(5);
ImGuiHelpers.ScaledDummy(30);
ImGui.SameLine();
@@ -366,7 +366,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
{
UiSharedService.TextWrapped("This tab allows you to attempt to fix mods that do not sync correctly, especially those with modded models and animations." + Environment.NewLine + Environment.NewLine
+ "To use this, start the recording, execute one or multiple emotes/animations you want to attempt to fix and check if new data appears in the table below." + Environment.NewLine
+ "If it doesn't, Mare is not able to catch the data or already has recorded the animation files (check 'Show previously added transient files' to see if not all is already present)." + Environment.NewLine + Environment.NewLine
+ "If it doesn't, Namazu is not able to catch the data or already has recorded the animation files (check 'Show previously added transient files' to see if not all is already present)." + Environment.NewLine + Environment.NewLine
+ "For most animations, vfx, etc. it is enough to just run them once unless they have random variations. Longer animations do not require to play out in their entirety to be captured.");
ImGuiHelpers.ScaledDummy(5);
UiSharedService.DrawGroupedCenteredColorText("Important Note: If you need to fix an animation that should apply across multiple jobs, you need to repeat this process with at least one additional job, " +
@@ -406,7 +406,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
ImGuiHelpers.ScaledDummy(5);
ImGui.Checkbox("Show previously added transient files in the recording", ref _showAlreadyAddedTransients);
_uiSharedService.DrawHelpText("Use this only if you want to see what was previously already caught by Mare");
_uiSharedService.DrawHelpText("Use this only if you want to see what was previously already caught by Namazu");
ImGuiHelpers.ScaledDummy(5);
using (ImRaii.Disabled(_transientResourceManager.IsTransientRecording || _transientResourceManager.RecordedTransients.All(k => !k.AddTransient) || !_acknowledgeReview))
@@ -476,7 +476,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
{
UiSharedService.DrawTree("What is this? (Explanation / Help)", () =>
{
UiSharedService.TextWrapped("This tab shows you all files and their sizes that are currently in use through your character and associated entities in Mare");
UiSharedService.TextWrapped("This tab shows you all files and their sizes that are currently in use through your character and associated entities in Namazu");
});
if (_cachedAnalysis!.Count == 0) return;

View File

@@ -1,5 +1,5 @@
using Dalamud.Interface.Colors;
using ImGuiNET;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Colors;
using MareSynchronos.MareConfiguration;
using MareSynchronos.PlayerData.Handlers;
using MareSynchronos.Services;
@@ -23,7 +23,7 @@ public class DownloadUi : WindowMediatorSubscriberBase
public DownloadUi(ILogger<DownloadUi> logger, DalamudUtilService dalamudUtilService, MareConfigService configService,
FileUploadManager fileTransferManager, MareMediator mediator, UiSharedService uiShared, PerformanceCollectorService performanceCollectorService)
: base(logger, mediator, "Mare Synchronos Downloads", performanceCollectorService)
: base(logger, mediator, "Namazu Sync Downloads", performanceCollectorService)
{
_dalamudUtilService = dalamudUtilService;
_configService = configService;

View File

@@ -88,8 +88,8 @@ public sealed class DtrEntry : IDisposable, IHostedService
private IDtrBarEntry CreateEntry()
{
_logger.LogTrace("Creating new DtrBar entry");
var entry = _dtrBar.Get("Mare Synchronos");
entry.OnClick = () => _mareMediator.Publish(new UiToggleMessage(typeof(CompactUi)));
var entry = _dtrBar.Get("Namazu Sync");
entry.OnClick = _ => _mareMediator.Publish(new UiToggleMessage(typeof(CompactUi)));
return entry;
}
@@ -146,19 +146,19 @@ public sealed class DtrEntry : IDisposable, IHostedService
.Select(x => string.Format("{0}", _configService.Current.PreferNoteInDtrTooltip ? x.GetNote() ?? x.PlayerName : x.PlayerName));
}
tooltip = $"Mare Synchronos: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, visiblePairs)}";
tooltip = $"Namazu Sync: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, visiblePairs)}";
colors = _configService.Current.DtrColorsPairsInRange;
}
else
{
tooltip = "Mare Synchronos: Connected";
tooltip = "Namazu Sync: Connected";
colors = _configService.Current.DtrColorsDefault;
}
}
else
{
text = "\uE044 \uE04C";
tooltip = "Mare Synchronos: Not Connected";
tooltip = "Namazu Sync: Not Connected";
colors = _configService.Current.DtrColorsNotConnected;
}

View File

@@ -1,9 +1,9 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.ImGuiFileDialog;
using Dalamud.Interface.Textures.TextureWraps;
using Dalamud.Interface.Utility;
using ImGuiNET;
using MareSynchronos.API.Data;
using MareSynchronos.API.Dto.User;
using MareSynchronos.Services;
@@ -33,7 +33,7 @@ public class EditProfileUi : WindowMediatorSubscriberBase
public EditProfileUi(ILogger<EditProfileUi> logger, MareMediator mediator,
ApiController apiController, UiSharedService uiSharedService, FileDialogManager fileDialogManager,
MareProfileManager mareProfileManager, PerformanceCollectorService performanceCollectorService)
: base(logger, mediator, "Mare Synchronos Edit Profile###MareSynchronosEditProfileUI", performanceCollectorService)
: base(logger, mediator, "Namazu Sync Edit Profile###NamazuSyncEditProfileUI", performanceCollectorService)
{
IsOpen = false;
this.SizeConstraints = new()
@@ -86,14 +86,14 @@ public class EditProfileUi : WindowMediatorSubscriberBase
if (_pfpTextureWrap != null)
{
ImGui.Image(_pfpTextureWrap.ImGuiHandle, ImGuiHelpers.ScaledVector2(_pfpTextureWrap.Width, _pfpTextureWrap.Height));
ImGui.Image(_pfpTextureWrap.Handle, ImGuiHelpers.ScaledVector2(_pfpTextureWrap.Width, _pfpTextureWrap.Height));
}
var spacing = ImGui.GetStyle().ItemSpacing.X;
ImGuiHelpers.ScaledRelativeSameLine(256, spacing);
using (_uiSharedService.GameFont.Push())
{
var descriptionTextSize = ImGui.CalcTextSize(profile.Description, 256f);
var descriptionTextSize = ImGui.CalcTextSize(profile.Description, wrapWidth: 256f);
var childFrame = ImGuiHelpers.ScaledVector2(256 + ImGui.GetStyle().WindowPadding.X + ImGui.GetStyle().WindowBorderSize, 256);
if (descriptionTextSize.Y > childFrame.Y)
{
@@ -124,9 +124,10 @@ public class EditProfileUi : WindowMediatorSubscriberBase
ImGui.TextWrapped($"- All users that are paired and unpaused with you will be able to see your profile picture and description.{Environment.NewLine}" +
$"- Other users have the possibility to report your profile for breaking the rules.{Environment.NewLine}" +
$"- !!! AVOID: anything as profile image that can be considered highly illegal or obscene (bestiality, anything that could be considered a sexual act with a minor (that includes Lalafells), etc.){Environment.NewLine}" +
$"- !!! AVOID: slurs of any kind in the description that can be considered highly offensive{Environment.NewLine}" +
$"- In case of valid reports from other users this can lead to disabling your profile forever or terminating your Mare account indefinitely.{Environment.NewLine}" +
$"- !!! AVOID: AI generated imagery.{Environment.NewLine}" +
$"- !!! AVOID: Real life photography. {Environment.NewLine}" +
$"- In case of valid reports from other users this can lead to disabling your profile forever or terminating your Namazu account indefinitely.{Environment.NewLine}" +
$"- Judgement of your profile validity from reports through staff is not up to debate and the decisions to disable your profile/account permanent.{Environment.NewLine}" +
$"- If your profile picture or profile description could be considered NSFW, enable the toggle below.");
ImGui.Separator();
@@ -191,7 +192,7 @@ public class EditProfileUi : WindowMediatorSubscriberBase
using (_uiSharedService.GameFont.Push())
{
var descriptionTextSizeLocal = ImGui.CalcTextSize(_descriptionText, 256f);
var descriptionTextSizeLocal = ImGui.CalcTextSize(_descriptionText, wrapWidth: 256f);
var childFrameLocal = ImGuiHelpers.ScaledVector2(256 + ImGui.GetStyle().WindowPadding.X + ImGui.GetStyle().WindowBorderSize, 200);
if (descriptionTextSizeLocal.Y > childFrameLocal.Y)
{

View File

@@ -1,7 +1,7 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.Services;
using MareSynchronos.Services.Events;
using MareSynchronos.Services.Mediator;

View File

@@ -1,7 +1,6 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using ImGuiScene;
using MareSynchronos.API.Dto.Group;
using MareSynchronos.MareConfiguration;
using MareSynchronos.PlayerData.Pairs;
@@ -22,7 +21,6 @@ public class IdDisplayHandler
private string _lastMouseOverUid = string.Empty;
private bool _popupShown = false;
private DateTime? _popupTime;
private TextureWrap? _textureWrap;
public IdDisplayHandler(MareMediator mediator, ServerConfigurationManager serverManager, MareConfigService mareConfigService)
{
@@ -125,8 +123,6 @@ public class IdDisplayHandler
_mediator.Publish(new ProfilePopoutToggle(Pair: null));
_lastMouseOverUid = string.Empty;
_popupShown = false;
_textureWrap?.Dispose();
_textureWrap = null;
}
}

View File

@@ -4,12 +4,12 @@ namespace MareSynchronos.UI.Handlers;
public class TagHandler
{
public const string CustomAllTag = "Mare_All";
public const string CustomOfflineTag = "Mare_Offline";
public const string CustomOfflineSyncshellTag = "Mare_OfflineSyncshell";
public const string CustomOnlineTag = "Mare_Online";
public const string CustomUnpairedTag = "Mare_Unpaired";
public const string CustomVisibleTag = "Mare_Visible";
public const string CustomAllTag = "Namazu_All";
public const string CustomOfflineTag = "Namazu_Offline";
public const string CustomOfflineSyncshellTag = "Namazu_OfflineSyncshell";
public const string CustomOnlineTag = "Namazu_Online";
public const string CustomUnpairedTag = "Namazu_Unpaired";
public const string CustomVisibleTag = "Namazu_Visible";
private readonly ServerConfigurationManager _serverConfigurationManager;
public TagHandler(ServerConfigurationManager serverConfigurationManager)

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface.Colors;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Utility;
using ImGuiNET;
using MareSynchronos.FileCache;
using MareSynchronos.Localization;
using MareSynchronos.MareConfiguration;
@@ -35,7 +35,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
public IntroUi(ILogger<IntroUi> logger, UiSharedService uiShared, MareConfigService configService,
CacheMonitor fileCacheManager, ServerConfigurationManager serverConfigurationManager, MareMediator mareMediator,
PerformanceCollectorService performanceCollectorService, DalamudUtilService dalamudUtilService) : base(logger, mareMediator, "Mare Synchronos Setup", performanceCollectorService)
PerformanceCollectorService performanceCollectorService, DalamudUtilService dalamudUtilService) : base(logger, mareMediator, "Namazu Sync Setup", performanceCollectorService)
{
_uiShared = uiShared;
_configService = configService;
@@ -70,9 +70,9 @@ public partial class IntroUi : WindowMediatorSubscriberBase
if (!_configService.Current.AcceptedAgreement && !_readFirstPage)
{
_uiShared.BigText("Welcome to Mare Synchronos");
_uiShared.BigText("Welcome to Namazu Sync");
ImGui.Separator();
UiSharedService.TextWrapped("Mare Synchronos is a plugin that will replicate your full current character state including all Penumbra mods to other paired Mare Synchronos users. " +
UiSharedService.TextWrapped("Namazu Sync is a plugin that will replicate your full current character state including all Penumbra mods to other paired Namazu Sync users. " +
"Note that you will have to have Penumbra as well as Glamourer installed to use this plugin.");
UiSharedService.TextWrapped("We will have to setup a few things first before you can start using this plugin. Click on next to continue.");
@@ -84,18 +84,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
if (ImGui.Button("Next##toAgreement"))
{
_readFirstPage = true;
#if !DEBUG
_timeoutTask = Task.Run(async () =>
{
for (int i = 60; i > 0; i--)
{
_timeoutLabel = $"{Strings.ToS.ButtonWillBeAvailableIn} {i}s";
await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false);
}
});
#else
_timeoutTask = Task.CompletedTask;
#endif
}
}
else if (!_configService.Current.AcceptedAgreement && _readFirstPage)
@@ -167,11 +156,11 @@ public partial class IntroUi : WindowMediatorSubscriberBase
}
else
{
UiSharedService.TextWrapped("To not unnecessary download files already present on your computer, Mare Synchronos will have to scan your Penumbra mod directory. " +
"Additionally, a local storage folder must be set where Mare Synchronos will download other character files to. " +
UiSharedService.TextWrapped("To not unnecessary download files already present on your computer, Namazu Sync will have to scan your Penumbra mod directory. " +
"Additionally, a local storage folder must be set where Namazu Sync will download other character files to. " +
"Once the storage folder is set and the scan complete, this page will automatically forward to registration at a service.");
UiSharedService.TextWrapped("Note: The initial scan, depending on the amount of mods you have, might take a while. Please wait until it is completed.");
UiSharedService.ColorTextWrapped("Warning: once past this step you should not delete the FileCache.csv of Mare Synchronos in the Plugin Configurations folder of Dalamud. " +
UiSharedService.ColorTextWrapped("Warning: once past this step you should not delete the FileCache.csv of Namazu Sync in the Plugin Configurations folder of Dalamud. " +
"Otherwise on the next launch a full re-scan of the file cache database will be initiated.", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Warning: if the scan is hanging and does nothing for a long time, chances are high your Penumbra folder is not set up properly.", ImGuiColors.DalamudYellow);
_uiShared.DrawCacheDirectorySetting();
@@ -196,8 +185,8 @@ public partial class IntroUi : WindowMediatorSubscriberBase
_configService.Current.UseCompactor = useFileCompactor;
_configService.Save();
}
UiSharedService.ColorTextWrapped("The File Compactor can save a tremendeous amount of space on the hard disk for downloads through Mare. It will incur a minor CPU penalty on download but can speed up " +
"loading of other characters. It is recommended to keep it enabled. You can change this setting later anytime in the Mare settings.", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("The File Compactor can save a tremendeous amount of space on the hard disk for downloads through Namazu. It will incur a minor CPU penalty on download but can speed up " +
"loading of other characters. It is recommended to keep it enabled. You can change this setting later anytime in the Namazu settings.", ImGuiColors.DalamudYellow);
}
}
else if (!_uiShared.ApiController.ServerAlive)
@@ -205,12 +194,13 @@ public partial class IntroUi : WindowMediatorSubscriberBase
using (_uiShared.UidFont.Push())
ImGui.TextUnformatted("Service Registration");
ImGui.Separator();
UiSharedService.TextWrapped("To be able to use Mare Synchronos you will have to register an account.");
UiSharedService.TextWrapped("For the official Mare Synchronos Servers the account creation will be handled on the official Mare Synchronos Discord. Due to security risks for the server, there is no way to handle this sensibly otherwise.");
UiSharedService.TextWrapped("If you want to register at the main server \"" + WebAPI.ApiController.MainServer + "\" join the Discord and follow the instructions as described in #mare-service.");
UiSharedService.TextWrapped("To be able to use Namazu Sync you will have to register an account.");
UiSharedService.TextWrapped("For the official Namazu Sync Servers the account creation will be handled on the official Namazu Sync Discord. Due to security risks for the server, there is no way to handle this sensibly otherwise.");
UiSharedService.TextWrapped("If you want to register at the main server \"" + WebAPI.ApiController.MainServer + "\" join the Discord and follow the instructions as described in #registration.");
if (ImGui.Button("Join the Mare Synchronos Discord"))
if (ImGui.Button("Join the Namazu Sync Discord"))
{
// TODO: CHANGE THIS
Util.OpenLink("https://discord.gg/mpNdkrTRjW");
}

View File

@@ -1,7 +1,7 @@
using Dalamud.Interface.Colors;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.API.Data.Enum;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.API.Dto;
@@ -26,7 +26,7 @@ internal class JoinSyncshellUI : WindowMediatorSubscriberBase
public JoinSyncshellUI(ILogger<JoinSyncshellUI> logger, MareMediator mediator,
UiSharedService uiSharedService, ApiController apiController, PerformanceCollectorService performanceCollectorService)
: base(logger, mediator, "Join existing Syncshell###MareSynchronosJoinSyncshell", performanceCollectorService)
: base(logger, mediator, "Join existing Syncshell###NamazuSyncJoinSyncshell", performanceCollectorService)
{
_uiSharedService = uiSharedService;
_apiController = apiController;

View File

@@ -1,6 +1,6 @@
using Dalamud.Interface.Utility;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.API.Data.Enum;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.PlayerData.Pairs;
@@ -22,7 +22,7 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
public PermissionWindowUI(ILogger<PermissionWindowUI> logger, Pair pair, MareMediator mediator, UiSharedService uiSharedService,
ApiController apiController, PerformanceCollectorService performanceCollectorService)
: base(logger, mediator, "Permissions for " + pair.UserData.AliasOrUID + "###MareSynchronosPermissions" + pair.UserData.UID, performanceCollectorService)
: base(logger, mediator, "Permissions for " + pair.UserData.AliasOrUID + "###NamazuSyncPermissions" + pair.UserData.UID, performanceCollectorService)
{
Pair = pair;
_uiSharedService = uiSharedService;
@@ -175,7 +175,7 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
new(StringComparer.Ordinal)
));
}
UiSharedService.AttachToolTip("This will set all permissions to your defined default permissions in the Mare Settings");
UiSharedService.AttachToolTip("This will set all permissions to your defined default permissions in the Namazu Settings");
var ySize = ImGui.GetCursorPosY() + style.FramePadding.Y * ImGuiHelpers.GlobalScale + style.FrameBorderSize;
ImGui.SetWindowSize(new(400, ySize));

View File

@@ -1,7 +1,7 @@
using Dalamud.Interface.Colors;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Textures.TextureWraps;
using Dalamud.Interface.Utility;
using ImGuiNET;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.MareConfiguration;
using MareSynchronos.PlayerData.Pairs;
@@ -29,7 +29,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
public PopoutProfileUi(ILogger<PopoutProfileUi> logger, MareMediator mediator, UiSharedService uiBuilder,
ServerConfigurationManager serverManager, MareConfigService mareConfigService,
MareProfileManager mareProfileManager, PairManager pairManager, PerformanceCollectorService performanceCollectorService) : base(logger, mediator, "###MareSynchronosPopoutProfileUI", performanceCollectorService)
MareProfileManager mareProfileManager, PairManager pairManager, PerformanceCollectorService performanceCollectorService) : base(logger, mediator, "###NamazuSyncPopoutProfileUI", performanceCollectorService)
{
_uiSharedService = uiBuilder;
_serverManager = serverManager;
@@ -159,12 +159,12 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
var font = _uiSharedService.GameFont.Push();
var remaining = ImGui.GetWindowContentRegionMax().Y - ImGui.GetCursorPosY();
var descText = mareProfile.Description;
var textSize = ImGui.CalcTextSize(descText, 256f * ImGuiHelpers.GlobalScale);
var textSize = ImGui.CalcTextSize(descText, wrapWidth: 256f * ImGuiHelpers.GlobalScale);
bool trimmed = textSize.Y > remaining;
while (textSize.Y > remaining && descText.Contains(' '))
{
descText = descText[..descText.LastIndexOf(' ')].TrimEnd();
textSize = ImGui.CalcTextSize(descText + $"...{Environment.NewLine}[Open Full Profile for complete description]", 256f * ImGuiHelpers.GlobalScale);
textSize = ImGui.CalcTextSize(descText + $"...{Environment.NewLine}[Open Full Profile for complete description]", wrapWidth: 256f * ImGuiHelpers.GlobalScale);
}
UiSharedService.TextWrapped(trimmed ? descText + $"...{Environment.NewLine}[Open Full Profile for complete description]" : mareProfile.Description);
font.Dispose();
@@ -176,12 +176,12 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
var newHeight = _textureWrap.Height * stretchFactor;
var remainingWidth = (256f * ImGuiHelpers.GlobalScale - newWidth) / 2f;
var remainingHeight = (256f * ImGuiHelpers.GlobalScale - newHeight) / 2f;
drawList.AddImage(_textureWrap.ImGuiHandle, new Vector2(rectMin.X + padding + remainingWidth, rectMin.Y + spacing.Y + imagePos.Y + remainingHeight),
drawList.AddImage(_textureWrap.Handle, new Vector2(rectMin.X + padding + remainingWidth, rectMin.Y + spacing.Y + imagePos.Y + remainingHeight),
new Vector2(rectMin.X + padding + remainingWidth + newWidth, rectMin.Y + spacing.Y + imagePos.Y + remainingHeight + newHeight));
if (_supporterTextureWrap != null)
{
const float iconSize = 38;
drawList.AddImage(_supporterTextureWrap.ImGuiHandle,
drawList.AddImage(_supporterTextureWrap.Handle,
new Vector2(rectMax.X - iconSize - spacing.X, rectMin.Y + (textPos / 2) - (iconSize / 2)),
new Vector2(rectMax.X - spacing.X, rectMin.Y + iconSize + (textPos / 2) - (iconSize / 2)));
}

View File

@@ -1,9 +1,9 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Utility;
using ImGuiNET;
using MareSynchronos.API.Data;
using MareSynchronos.API.Data.Comparer;
using MareSynchronos.API.Routes;
@@ -77,7 +77,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
FileCacheManager fileCacheManager,
FileCompactor fileCompactor, ApiController apiController,
IpcManager ipcManager, CacheMonitor cacheMonitor,
DalamudUtilService dalamudUtilService, HttpClient httpClient) : base(logger, mediator, "Mare Synchronos Settings", performanceCollector)
DalamudUtilService dalamudUtilService, HttpClient httpClient) : base(logger, mediator, "Namazu Sync Settings", performanceCollector)
{
_configService = configService;
_pairManager = pairManager;
@@ -178,7 +178,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_lastTab = "BlockedTransfers";
UiSharedService.ColorTextWrapped("Files that you attempted to upload or download that were forbidden to be transferred by their creators will appear here. " +
"If you see file paths from your drive here, then those files were not allowed to be uploaded. If you see hashes, those files were not allowed to be downloaded. " +
"Ask your paired friend to send you the mod in question through other means, acquire the mod yourself or pester the mod creator to allow it to be sent over Mare.",
"Ask your paired friend to send you the mod in question through other means, acquire the mod yourself or pester the mod creator to allow it to be sent over Namazu.",
ImGuiColors.DalamudGrey);
if (ImGui.BeginTable("TransfersTable", 2, ImGuiTableFlags.SizingStretchProp))
@@ -634,7 +634,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_uiShared.IconText(FontAwesomeIcon.UserCog);
ImGui.SameLine();
UiSharedService.TextWrapped(") -> \"Character Data Hub\".");
if (_uiShared.IconTextButton(FontAwesomeIcon.Running, "Open Mare Character Data Hub"))
if (_uiShared.IconTextButton(FontAwesomeIcon.Running, "Open Namazu Character Data Hub"))
{
Mediator.Publish(new UiToggleMessage(typeof(CharaDataHubUi)));
}
@@ -644,7 +644,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_uiShared.BigText("Storage");
UiSharedService.TextWrapped("Mare stores downloaded files from paired people permanently. This is to improve loading performance and requiring less downloads. " +
UiSharedService.TextWrapped("Namazu stores downloaded files from paired people permanently. This is to improve loading performance and requiring less downloads. " +
"The storage governs itself by clearing data beyond the set storage size. Please set the storage size accordingly. It is not necessary to manually clear the storage.");
_uiShared.DrawFileScanState();
@@ -661,11 +661,11 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Monitoring Mare Storage Folder: " + (_cacheMonitor.MareWatcher?.Path ?? "Not monitoring"));
ImGui.TextUnformatted("Monitoring Namazu Storage Folder: " + (_cacheMonitor.MareWatcher?.Path ?? "Not monitoring"));
if (string.IsNullOrEmpty(_cacheMonitor.MareWatcher?.Path))
{
ImGui.SameLine();
using var id = ImRaii.PushId("mareMonitor");
using var id = ImRaii.PushId("namazuMonitor");
if (_uiShared.IconTextButton(FontAwesomeIcon.ArrowsToCircle, "Try to reinitialize Monitor"))
{
_cacheMonitor.StartMareWatcher(_configService.Current.CacheFolder);
@@ -679,7 +679,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_cacheMonitor.StartPenumbraWatcher(_ipcManager.Penumbra.ModDirectory);
_cacheMonitor.InvokeScan();
}
UiSharedService.AttachToolTip("Attempts to resume monitoring for both Penumbra and Mare Storage. "
UiSharedService.AttachToolTip("Attempts to resume monitoring for both Penumbra and Namazu Storage. "
+ "Resuming the monitoring will also force a full scan to run." + Environment.NewLine
+ "If the button remains present after clicking it, consult /xllog for errors");
}
@@ -692,8 +692,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
_cacheMonitor.StopMonitoring();
}
}
UiSharedService.AttachToolTip("Stops the monitoring for both Penumbra and Mare Storage. "
+ "Do not stop the monitoring, unless you plan to move the Penumbra and Mare Storage folders, to ensure correct functionality of Mare." + Environment.NewLine
UiSharedService.AttachToolTip("Stops the monitoring for both Penumbra and Namazu Storage. "
+ "Do not stop the monitoring, unless you plan to move the Penumbra and Namazu Storage folders, to ensure correct functionality of Namazu." + Environment.NewLine
+ "If you stop the monitoring to move folders around, resume it after you are finished moving the files."
+ UiSharedService.TooltipSeparator + "Hold CTRL to enable this button");
}
@@ -709,7 +709,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
bool isLinux = _dalamudUtilService.IsWine;
if (!useFileCompactor && !isLinux)
{
UiSharedService.ColorTextWrapped("Hint: To free up space when using Mare consider enabling the File Compactor", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Hint: To free up space when using Namazu consider enabling the File Compactor", ImGuiColors.DalamudYellow);
}
if (isLinux || !_cacheMonitor.StorageisNTFS) ImGui.BeginDisabled();
if (ImGui.Checkbox("Use file compactor", ref useFileCompactor))
@@ -730,7 +730,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_cacheMonitor.RecalculateFileCacheSize(CancellationToken.None);
});
}
UiSharedService.AttachToolTip("This will run compression on all files in your current Mare Storage." + Environment.NewLine
UiSharedService.AttachToolTip("This will run compression on all files in your current Namazu Storage." + Environment.NewLine
+ "You do not need to run this manually if you keep the file compactor enabled.");
ImGui.SameLine();
if (_uiShared.IconTextButton(FontAwesomeIcon.File, "Decompact all files in storage"))
@@ -741,7 +741,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_cacheMonitor.RecalculateFileCacheSize(CancellationToken.None);
});
}
UiSharedService.AttachToolTip("This will run decompression on all files in your current Mare Storage.");
UiSharedService.AttachToolTip("This will run decompression on all files in your current Namazu Storage.");
}
else
{
@@ -755,7 +755,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
ImGuiHelpers.ScaledDummy(new Vector2(10, 10));
ImGui.Separator();
UiSharedService.TextWrapped("File Storage validation can make sure that all files in your local Mare Storage are valid. " +
UiSharedService.TextWrapped("File Storage validation can make sure that all files in your local Namazu Storage are valid. " +
"Run the validation before you clear the Storage for no reason. " + Environment.NewLine +
"This operation, depending on how many files you have in your storage, can take a while and will be CPU and drive intensive.");
using (ImRaii.Disabled(_validationTask != null && !_validationTask.IsCompleted))
@@ -818,7 +818,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
UiSharedService.AttachToolTip("You normally do not need to do this. THIS IS NOT SOMETHING YOU SHOULD BE DOING TO TRY TO FIX SYNC ISSUES." + Environment.NewLine
+ "This will solely remove all downloaded data from all players and will require you to re-download everything again." + Environment.NewLine
+ "Mares storage is self-clearing and will not surpass the limit you have set it to." + Environment.NewLine
+ "Namazus storage is self-clearing and will not surpass the limit you have set it to." + Environment.NewLine
+ "If you still think you need to do this hold CTRL while pressing the button.");
if (!_readClearCache)
ImGui.EndDisabled();
@@ -895,6 +895,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
var dtrColorsNotConnected = _configService.Current.DtrColorsNotConnected;
var dtrColorsPairsInRange = _configService.Current.DtrColorsPairsInRange;
var preferNotesInsteadOfName = _configService.Current.PreferNotesOverNamesForVisible;
var useFocusTarget = _configService.Current.UseFocusTarget;
var groupUpSyncshells = _configService.Current.GroupUpSyncshells;
var groupInVisible = _configService.Current.ShowSyncshellUsersInVisible;
var syncshellOfflineSeparate = _configService.Current.ShowSyncshellOfflineUsersSeparately;
@@ -904,14 +905,14 @@ public class SettingsUi : WindowMediatorSubscriberBase
_configService.Current.EnableRightClickMenus = enableRightClickMenu;
_configService.Save();
}
_uiShared.DrawHelpText("This will add Mare related right click menu entries in the game UI on paired players.");
_uiShared.DrawHelpText("This will add Namazu related right click menu entries in the game UI on paired players.");
if (ImGui.Checkbox("Display status and visible pair count in Server Info Bar", ref enableDtrEntry))
{
_configService.Current.EnableDtrEntry = enableDtrEntry;
_configService.Save();
}
_uiShared.DrawHelpText("This will add Mare connection status and visible pair count in the Server Info Bar.\nYou can further configure this through your Dalamud Settings.");
_uiShared.DrawHelpText("This will add Namazu connection status and visible pair count in the Server Info Bar.\nYou can further configure this through your Dalamud Settings.");
using (ImRaii.Disabled(!enableDtrEntry))
{
@@ -1025,7 +1026,13 @@ public class SettingsUi : WindowMediatorSubscriberBase
if (!_configService.Current.ShowCharacterNameInsteadOfNotesForVisible) ImGui.EndDisabled();
ImGui.Unindent();
if (ImGui.Checkbox("Show Mare Profiles on Hover", ref showProfiles))
if (ImGui.Checkbox("Set visible pairs as focus targets when clicking the eye", ref useFocusTarget))
{
_configService.Current.UseFocusTarget = useFocusTarget;
_configService.Save();
}
if (ImGui.Checkbox("Show Namazu Profiles on Hover", ref showProfiles))
{
Mediator.Publish(new ClearProfileDataMessage());
_configService.Current.ProfilesShow = showProfiles;
@@ -1142,14 +1149,14 @@ public class SettingsUi : WindowMediatorSubscriberBase
_playerPerformanceConfigService.Current.ShowPerformanceIndicator = showPerformanceIndicator;
_playerPerformanceConfigService.Save();
}
_uiShared.DrawHelpText("Will show a performance indicator when players exceed defined thresholds in Mares UI." + Environment.NewLine + "Will use warning thresholds.");
_uiShared.DrawHelpText("Will show a performance indicator when players exceed defined thresholds in Namazu's UI." + Environment.NewLine + "Will use warning thresholds.");
bool warnOnExceedingThresholds = _playerPerformanceConfigService.Current.WarnOnExceedingThresholds;
if (ImGui.Checkbox("Warn on loading in players exceeding performance thresholds", ref warnOnExceedingThresholds))
{
_playerPerformanceConfigService.Current.WarnOnExceedingThresholds = warnOnExceedingThresholds;
_playerPerformanceConfigService.Save();
}
_uiShared.DrawHelpText("Mare will print a warning in chat once per session of meeting those people. Will not warn on players with preferred permissions.");
_uiShared.DrawHelpText("Namazu will print a warning in chat once per session of meeting those people. Will not warn on players with preferred permissions.");
using (ImRaii.Disabled(!warnOnExceedingThresholds && !showPerformanceIndicator))
{
using var indent = ImRaii.PushIndent();
@@ -1159,7 +1166,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_playerPerformanceConfigService.Current.WarnOnPreferredPermissionsExceedingThresholds = warnOnPref;
_playerPerformanceConfigService.Save();
}
_uiShared.DrawHelpText("Mare will also print warnings and show performance indicator for players where you enabled preferred permissions. If warning in general is disabled, this will not produce any warnings.");
_uiShared.DrawHelpText("Namazu will also print warnings and show performance indicator for players where you enabled preferred permissions. If warning in general is disabled, this will not produce any warnings.");
}
using (ImRaii.Disabled(!showPerformanceIndicator && !warnOnExceedingThresholds))
{
@@ -1402,7 +1409,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
{
if (selectedServer.SecretKeys.Any() || useOauth)
{
UiSharedService.ColorTextWrapped("Characters listed here will automatically connect to the selected Mare service with the settings as provided below." +
UiSharedService.ColorTextWrapped("Characters listed here will automatically connect to the selected Namazu service with the settings as provided below." +
" Make sure to enter the character names correctly or use the 'Add current character' button at the bottom.", ImGuiColors.DalamudYellow);
int i = 0;
_uiShared.DrawUpdateOAuthUIDsButton(selectedServer);
@@ -1575,12 +1582,12 @@ public class SettingsUi : WindowMediatorSubscriberBase
_uiShared.DrawUIDComboForAuthentication(i, item, selectedServer.ServerUri, _logger);
}
bool isAutoLogin = item.AutoLogin;
if (ImGui.Checkbox("Automatically login to Mare", ref isAutoLogin))
if (ImGui.Checkbox("Automatically login to Namazu", ref isAutoLogin))
{
item.AutoLogin = isAutoLogin;
_serverConfigurationManager.Save();
}
_uiShared.DrawHelpText("When enabled and logging into this character in XIV, Mare will automatically connect to the current service.");
_uiShared.DrawHelpText("When enabled and logging into this character in XIV, Namazu will automatically connect to the current service.");
if (_uiShared.IconTextButton(FontAwesomeIcon.Trash, "Delete Character") && UiSharedService.CtrlPressed())
_serverConfigurationManager.RemoveCharacterFromServer(idx, item);
UiSharedService.AttachToolTip("Hold CTRL to delete this entry.");
@@ -1712,7 +1719,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
selectedServer.ForceWebSockets = forceWebSockets;
_serverConfigurationManager.Save();
}
_uiShared.DrawHelpText("On wine, Mare will automatically fall back to ServerSentEvents/LongPolling, even if WebSockets is selected. "
_uiShared.DrawHelpText("On wine, Namazu will automatically fall back to ServerSentEvents/LongPolling, even if WebSockets is selected. "
+ "WebSockets are known to crash XIV entirely on wine 8.5 shipped with Dalamud. "
+ "Only enable this if you are not running wine 8.5." + Environment.NewLine
+ "Note: If the issue gets resolved at some point this option will be removed.");
@@ -1729,9 +1736,15 @@ public class SettingsUi : WindowMediatorSubscriberBase
if (useOauth)
{
_uiShared.DrawOAuth(selectedServer);
if (string.IsNullOrEmpty(_serverConfigurationManager.GetDiscordUserFromToken(selectedServer)))
{
ImGuiHelpers.ScaledDummy(10f);
UiSharedService.ColorTextWrapped("You have enabled OAuth2 but it is not linked. Press the buttons Check, then Authenticate to link properly.", ImGuiColors.DalamudRed);
}
if (!string.IsNullOrEmpty(_serverConfigurationManager.GetDiscordUserFromToken(selectedServer))
&& selectedServer.Authentications.TrueForAll(u => string.IsNullOrEmpty(u.UID)))
{
ImGuiHelpers.ScaledDummy(10f);
UiSharedService.ColorTextWrapped("You have enabled OAuth2 but no characters configured. Set the correct UIDs for your characters in \"Character Management\".",
ImGuiColors.DalamudRed);
}
@@ -1927,7 +1940,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
ImGui.AlignTextToFramePadding();
ImGui.TextUnformatted("Community and Support:");
ImGui.SameLine();
if (ImGui.Button("Mare Synchronos Discord"))
if (ImGui.Button("Namazu Synchronos Discord"))
{
Util.OpenLink("https://discord.gg/mpNdkrTRjW");
}

View File

@@ -1,7 +1,7 @@
using Dalamud.Interface.Colors;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Textures.TextureWraps;
using Dalamud.Interface.Utility;
using ImGuiNET;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.PlayerData.Pairs;
using MareSynchronos.Services;
@@ -27,7 +27,7 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
public StandaloneProfileUi(ILogger<StandaloneProfileUi> logger, MareMediator mediator, UiSharedService uiBuilder,
ServerConfigurationManager serverManager, MareProfileManager mareProfileManager, PairManager pairManager, Pair pair,
PerformanceCollectorService performanceCollector)
: base(logger, mediator, "Mare Profile of " + pair.UserData.AliasOrUID + "##MareSynchronosStandaloneProfileUI" + pair.UserData.AliasOrUID, performanceCollector)
: base(logger, mediator, "Namazu Profile of " + pair.UserData.AliasOrUID + "##NamazuSyncStandaloneProfileUI" + pair.UserData.AliasOrUID, performanceCollector)
{
_uiSharedService = uiBuilder;
_serverManager = serverManager;
@@ -86,7 +86,7 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
ImGuiHelpers.ScaledDummy(new Vector2(256, 256 + spacing.Y));
var postDummy = ImGui.GetCursorPosY();
ImGui.SameLine();
var descriptionTextSize = ImGui.CalcTextSize(mareProfile.Description, 256f);
var descriptionTextSize = ImGui.CalcTextSize(mareProfile.Description, wrapWidth: 256f);
var descriptionChildHeight = rectMax.Y - pos.Y - rectMin.Y - spacing.Y * 2;
if (descriptionTextSize.Y > descriptionChildHeight && !_adjustedForScrollBars)
{
@@ -158,12 +158,12 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
var newHeight = _textureWrap.Height * stretchFactor;
var remainingWidth = (256f * ImGuiHelpers.GlobalScale - newWidth) / 2f;
var remainingHeight = (256f * ImGuiHelpers.GlobalScale - newHeight) / 2f;
drawList.AddImage(_textureWrap.ImGuiHandle, new Vector2(rectMin.X + padding + remainingWidth, rectMin.Y + spacing.Y + pos.Y + remainingHeight),
drawList.AddImage(_textureWrap.Handle, new Vector2(rectMin.X + padding + remainingWidth, rectMin.Y + spacing.Y + pos.Y + remainingHeight),
new Vector2(rectMin.X + padding + remainingWidth + newWidth, rectMin.Y + spacing.Y + pos.Y + remainingHeight + newHeight));
if (_supporterTextureWrap != null)
{
const float iconSize = 38;
drawList.AddImage(_supporterTextureWrap.ImGuiHandle,
drawList.AddImage(_supporterTextureWrap.Handle,
new Vector2(rectMax.X - iconSize - spacing.X, rectMin.Y + (textPos / 2) - (iconSize / 2)),
new Vector2(rectMax.X - spacing.X, rectMin.Y + iconSize + (textPos / 2) - (iconSize / 2)));
}

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using ImGuiNET;
using MareSynchronos.API.Data.Enum;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.API.Dto.Group;
@@ -259,7 +259,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
_pruneTestTask = _apiController.GroupPrune(new(GroupFullInfo.Group), _pruneDays, execute: false);
_pruneTask = null;
}
UiSharedService.AttachToolTip($"This will start the prune process for this Syncshell of inactive Mare users that have not logged in in the past {_pruneDays} days."
UiSharedService.AttachToolTip($"This will start the prune process for this Syncshell of inactive Namazu users that have not logged in in the past {_pruneDays} days."
+ Environment.NewLine + "You will be able to review the amount of inactive users before executing the prune."
+ UiSharedService.TooltipSeparator + "Note: this check excludes pinned users and moderators of this Syncshell.");
ImGui.SameLine();
@@ -285,7 +285,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
else
{
ImGui.AlignTextToFramePadding();
UiSharedService.TextWrapped($"Found {_pruneTestTask.Result} user(s) that have not logged into Mare in the past {_pruneDays} days.");
UiSharedService.TextWrapped($"Found {_pruneTestTask.Result} user(s) that have not logged into Namazu in the past {_pruneDays} days.");
if (_pruneTestTask.Result > 0)
{
using (ImRaii.Disabled(!UiSharedService.CtrlPressed()))

View File

@@ -1,8 +1,8 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Utility;
using ImGuiNET;
using MareSynchronos.API.Data.Enum;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.PlayerData.Pairs;
@@ -486,11 +486,11 @@ public class TopTabMenu
private void DrawUserConfig(float availableWidth, float spacingX)
{
var buttonX = (availableWidth - spacingX) / 2f;
if (_uiSharedService.IconTextButton(FontAwesomeIcon.UserCircle, "Edit Mare Profile", buttonX))
if (_uiSharedService.IconTextButton(FontAwesomeIcon.UserCircle, "Edit Namazu Profile", buttonX))
{
_mareMediator.Publish(new UiToggleMessage(typeof(EditProfileUi)));
}
UiSharedService.AttachToolTip("Edit your Mare Profile");
UiSharedService.AttachToolTip("Edit your Namazu Profile");
ImGui.SameLine();
if (_uiSharedService.IconTextButton(FontAwesomeIcon.PersonCircleQuestion, "Chara Data Analysis", buttonX))
{

View File

@@ -1,4 +1,5 @@
using Dalamud.Interface;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.GameFonts;
using Dalamud.Interface.ImGuiFileDialog;
@@ -9,7 +10,6 @@ using Dalamud.Interface.Utility.Raii;
using Dalamud.Plugin;
using Dalamud.Plugin.Services;
using Dalamud.Utility;
using ImGuiNET;
using MareSynchronos.FileCache;
using MareSynchronos.Interop.Ipc;
using MareSynchronos.Localization;
@@ -39,8 +39,8 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
ImGuiWindowFlags.NoScrollWithMouse;
public readonly FileDialogManager FileDialogManager;
private const string _notesEnd = "##MARE_SYNCHRONOS_USER_NOTES_END##";
private const string _notesStart = "##MARE_SYNCHRONOS_USER_NOTES_START##";
private const string _notesEnd = "##NAMAZU_SYNC_USER_NOTES_END##";
private const string _notesStart = "##NAMAZU_SYNC_USER_NOTES_START##";
private readonly ApiController _apiController;
private readonly CacheMonitor _cacheMonitor;
private readonly MareConfigService _configService;
@@ -231,7 +231,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
public static void DrawGroupedCenteredColorText(string text, Vector4 color, float? maxWidth = null)
{
var availWidth = ImGui.GetContentRegionAvail().X;
var textWidth = ImGui.CalcTextSize(text, availWidth).X;
var textWidth = ImGui.CalcTextSize(text, wrapWidth: availWidth).X;
if (maxWidth != null && textWidth > maxWidth * ImGuiHelpers.GlobalScale) textWidth = maxWidth.Value * ImGuiHelpers.GlobalScale;
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + (availWidth / 2f) - (textWidth / 2f));
DrawGrouped(() =>
@@ -453,7 +453,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
public void DrawCacheDirectorySetting()
{
ColorTextWrapped("Note: The storage folder should be somewhere close to root (i.e. C:\\MareStorage) in a new empty folder. DO NOT point this to your game folder. DO NOT point this to your Penumbra folder.", ImGuiColors.DalamudYellow);
ColorTextWrapped("Note: The storage folder should be somewhere close to root (i.e. C:\\NamazuStorage) in a new empty folder. DO NOT point this to your game folder. DO NOT point this to your Penumbra folder.", ImGuiColors.DalamudYellow);
var cacheDirectory = _configService.Current.CacheFolder;
ImGui.InputText("Storage Folder##cache", ref cacheDirectory, 255, ImGuiInputTextFlags.ReadOnly);
@@ -462,7 +462,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
{
if (IconButton(FontAwesomeIcon.Folder))
{
FileDialogManager.OpenFolderDialog("Pick Mare Synchronos Storage Folder", (success, path) =>
FileDialogManager.OpenFolderDialog("Pick Namazu Synchronos Storage Folder", (success, path) =>
{
if (!success) return;
@@ -484,7 +484,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
if (dirs.Any())
{
_cacheDirectoryHasOtherFilesThanCache = true;
Logger.LogWarning("Found folders in {path} not belonging to Mare: {dirs}", path, string.Join(", ", dirs));
Logger.LogWarning("Found folders in {path} not belonging to Namazu: {dirs}", path, string.Join(", ", dirs));
}
_isDirectoryWritable = IsDirectoryWritable(path);
@@ -525,7 +525,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
}
else if (_cacheDirectoryHasOtherFilesThanCache)
{
ColorTextWrapped("Your selected directory has files or directories inside that are not Mare related. Use an empty directory or a previous Mare storage directory only.", ImGuiColors.DalamudRed);
ColorTextWrapped("Your selected directory has files or directories inside that are not Namazu related. Use an empty directory or a previous Namazu storage directory only.", ImGuiColors.DalamudRed);
}
else if (!_cacheDirectoryIsValidPath)
{
@@ -539,7 +539,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
_configService.Current.MaxLocalCacheInGiB = maxCacheSize;
_configService.Save();
}
DrawHelpText("The storage is automatically governed by Mare. It will clear itself automatically once it reaches the set capacity by removing the oldest unused files. You typically do not need to clear it yourself.");
DrawHelpText("The storage is automatically governed by Namazu. It will clear itself automatically once it reaches the set capacity by removing the oldest unused files. You typically do not need to clear it yourself.");
}
public T? DrawCombo<T>(string comboName, IEnumerable<T> comboItems, Func<T?, string> toName,
@@ -811,7 +811,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
if (!_penumbraExists || !_glamourerExists)
{
ImGui.TextColored(ImGuiColors.DalamudRed, "You need to install both Penumbra and Glamourer and keep them up to date to use Mare Synchronos.");
ImGui.TextColored(ImGuiColors.DalamudRed, "You need to install both Penumbra and Glamourer and keep them up to date to use Namazu Synchronos.");
return false;
}
@@ -982,7 +982,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
}
if (string.IsNullOrEmpty(selectedServer.OAuthToken) || tokenExpiry < DateTime.UtcNow)
{
ColorTextWrapped("You have no OAuth token or the OAuth token is expired. Please use the Service Settings to (re)link your OAuth account.", ImGuiColors.DalamudRed);
ColorTextWrapped("You have no OAuth token or the OAuth token is expired. Please use the Service Configuration to link your OAuth2 account or refresh the token.", ImGuiColors.DalamudRed);
}
}

View File

@@ -28,7 +28,7 @@ public class FileTransferOrchestrator : DisposableMediatorSubscriberBase
_tokenProvider = tokenProvider;
_httpClient = httpClient;
var ver = Assembly.GetExecutingAssembly().GetName().Version;
_httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("MareSynchronos", ver!.Major + "." + ver!.Minor + "." + ver!.Build));
_httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("NamazuSync", ver!.Major + "." + ver!.Minor + "." + ver!.Build));
_availableDownloadSlots = mareConfig.Current.ParallelDownloads;
_downloadSemaphore = new(_availableDownloadSlots, _availableDownloadSlots);

View File

@@ -21,8 +21,8 @@ namespace MareSynchronos.WebAPI;
#pragma warning disable MA0040
public sealed partial class ApiController : DisposableMediatorSubscriberBase, IMareHubClient
{
public const string MainServer = "Lunae Crescere Incipientis (Official Central Server)";
public const string MainServiceUri = "wss://maresynchronos.com";
public const string MainServer = "Gyoshin (Official Global Server)";
public const string MainServiceUri = "wss://sync.namazu.gay";
private readonly DalamudUtilService _dalamudUtil;
private readonly HubFactory _hubFactory;
@@ -107,14 +107,15 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
public async Task CreateConnectionsAsync()
{
if (!_serverManager.ShownCensusPopup)
{
Mediator.Publish(new OpenCensusPopupMessage());
while (!_serverManager.ShownCensusPopup)
{
await Task.Delay(500).ConfigureAwait(false);
}
}
// TODO: once we have enough users uncomment this
// if (!_serverManager.ShownCensusPopup)
// {
// Mediator.Publish(new OpenCensusPopupMessage());
// while (!_serverManager.ShownCensusPopup)
// {
// await Task.Delay(500).ConfigureAwait(false);
// }
// }
Logger.LogDebug("CreateConnections called");
@@ -134,7 +135,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
{
Logger.LogWarning("Multiple secret keys for current character");
_connectionDto = null;
Mediator.Publish(new NotificationMessage("Multiple Identical Characters detected", "Your Service configuration has multiple characters with the same name and world set up. Delete the duplicates in the character management to be able to connect to Mare.",
Mediator.Publish(new NotificationMessage("Multiple Identical Characters detected", "Your Service configuration has multiple characters with the same name and world set up. Delete the duplicates in the character management to be able to connect to Namazu.",
NotificationType.Error));
await StopConnectionAsync(ServerState.MultiChara).ConfigureAwait(false);
_connectionCancellationTokenSource?.Cancel();
@@ -157,7 +158,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
{
Logger.LogWarning("Multiple secret keys for current character");
_connectionDto = null;
Mediator.Publish(new NotificationMessage("Multiple Identical Characters detected", "Your Service configuration has multiple characters with the same name and world set up. Delete the duplicates in the character management to be able to connect to Mare.",
Mediator.Publish(new NotificationMessage("Multiple Identical Characters detected", "Your Service configuration has multiple characters with the same name and world set up. Delete the duplicates in the character management to be able to connect to Namazu.",
NotificationType.Error));
await StopConnectionAsync(ServerState.MultiChara).ConfigureAwait(false);
_connectionCancellationTokenSource?.Cancel();
@@ -240,7 +241,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
Mediator.Publish(new NotificationMessage("Client incompatible",
$"Your client is outdated ({currentClientVer.Major}.{currentClientVer.Minor}.{currentClientVer.Build}), current is: " +
$"{_connectionDto.CurrentClientVersion.Major}.{_connectionDto.CurrentClientVersion.Minor}.{_connectionDto.CurrentClientVersion.Build}. " +
$"This client version is incompatible and will not be able to connect. Please update your Mare Synchronos client.",
$"This client version is incompatible and will not be able to connect. Please update your Namazu Sync client.",
NotificationType.Error));
}
await StopConnectionAsync(ServerState.VersionMisMatch).ConfigureAwait(false);
@@ -252,7 +253,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
Mediator.Publish(new NotificationMessage("Client outdated",
$"Your client is outdated ({currentClientVer.Major}.{currentClientVer.Minor}.{currentClientVer.Build}), current is: " +
$"{_connectionDto.CurrentClientVersion.Major}.{_connectionDto.CurrentClientVersion.Minor}.{_connectionDto.CurrentClientVersion.Build}. " +
$"Please keep your Mare Synchronos client up-to-date.",
$"Please keep your Namazu Sync client up-to-date.",
NotificationType.Warning));
}
@@ -262,7 +263,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
if (!_mareConfigService.Current.DebugStopWhining)
Mediator.Publish(new NotificationMessage("Modified Game Files detected",
"Dalamud is reporting your FFXIV installation has modified game files. Any mods installed through TexTools will produce this message. " +
"Mare Synchronos, Penumbra, and some other plugins assume your FFXIV installation is unmodified in order to work. " +
"Namazu Sync, Penumbra, and some other plugins assume your FFXIV installation is unmodified in order to work. " +
"Synchronization with pairs/shells can break because of this. Exit the game, open XIVLauncher, click the arrow next to Log In " +
"and select 'repair game files' to resolve this issue. Afterwards, do not install any mods with TexTools. Your plugin configurations will remain, as will mods enabled in Penumbra.",
NotificationType.Error, TimeSpan.FromSeconds(15)));
@@ -276,7 +277,7 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
{
Mediator.Publish(new NotificationMessage("Model LOD is enabled",
"You have \"Use low-detail models on distant objects (LOD)\" enabled. Having model LOD enabled is known to be a reason to cause " +
"random crashes when loading in or rendering modded pairs. Disabling LOD has a very low performance impact. Disable LOD while using Mare: " +
"random crashes when loading in or rendering modded pairs. Disabling LOD has a very low performance impact. Disable LOD while using Namazu: " +
"Go to XIV Menu -> System Configuration -> Graphics Settings and disable the model LOD option.", NotificationType.Warning, TimeSpan.FromSeconds(15)));
}
}

View File

@@ -115,10 +115,10 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber
if (ex.StatusCode == System.Net.HttpStatusCode.Unauthorized)
{
if (isRenewal)
Mediator.Publish(new NotificationMessage("Error refreshing token", "Your authentication token could not be renewed. Try reconnecting to Mare manually.",
Mediator.Publish(new NotificationMessage("Error refreshing token", "Your authentication token could not be renewed. Try reconnecting to Namazu manually.",
NotificationType.Error));
else
Mediator.Publish(new NotificationMessage("Error generating token", "Your authentication token could not be generated. Check Mares Main UI (/mare in chat) to see the error message.",
Mediator.Publish(new NotificationMessage("Error generating token", "Your authentication token could not be generated. Check Namazu's Main UI (/namazu in chat) to see the error message.",
NotificationType.Error));
Mediator.Publish(new DisconnectedMessage());
throw new MareAuthFailureException(response);
@@ -139,7 +139,7 @@ public sealed class TokenProvider : IDisposable, IMediatorSubscriber
{
_tokenCache.TryRemove(identifier, out _);
Mediator.Publish(new NotificationMessage("Invalid system clock", "The clock of your computer is invalid. " +
"Mare will not function properly if the time zone is not set correctly. " +
"Namazu will not function properly if the time zone is not set correctly. " +
"Please set your computers time zone correctly and keep your clock synchronized with the internet.",
NotificationType.Error));
throw new InvalidOperationException($"JwtToken is behind DateTime.UtcNow, DateTime.UtcNow is possibly wrong. DateTime.UtcNow is {DateTime.UtcNow}, JwtToken.ValidTo is {jwtToken.ValidTo}");

View File

@@ -4,9 +4,9 @@
"net9.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[12.0.0, )",
"resolved": "12.0.0",
"contentHash": "J5TJLV3f16T/E2H2P17ClWjtfEBPpq3yxvqW46eN36JCm6wR+EaoaYkqG9Rm5sHqs3/nK/vKjWWyvEs/jhKoXw=="
"requested": "[13.0.0, )",
"resolved": "13.0.0",
"contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w=="
},
"DotNet.ReproducibleBuilds": {
"type": "Direct",
@@ -107,9 +107,9 @@
},
"Penumbra.Api": {
"type": "Direct",
"requested": "[5.6.0, )",
"resolved": "5.6.0",
"contentHash": "zMmkxX1+7COn23aTeq0L+UMA79ocmvQdvj5RgksEfTKrKZLbtaqRPCe6NsChyfGvcj79sgfAW/9hJ+FAzzVcNg=="
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "XGWviAZgokj2djpH50FWgM24jOTpKUuDHvd0HwrzBRY6BEMmpb3HfGIl8+BDE/DqbpH63u6aO2TvzUV6BmXT5w=="
},
"Penumbra.String": {
"type": "Direct",
@@ -119,9 +119,9 @@
},
"SixLabors.ImageSharp": {
"type": "Direct",
"requested": "[3.1.7, )",
"resolved": "3.1.7",
"contentHash": "9fIOOAsyLFid6qKypM2Iy0Z3Q9yoanV8VoYAHtI2sYGMNKzhvRTjgFDHonIiVe+ANtxIxM6SuqUzj0r91nItpA=="
"requested": "[3.1.11, )",
"resolved": "3.1.11",
"contentHash": "JfPLyigLthuE50yi6tMt7Amrenr/fA31t2CvJyhy/kQmfulIBAqo5T/YFUSRHtuYPXRSaUHygFeh6Qd933EoSw=="
},
"SonarAnalyzer.CSharp": {
"type": "Direct",