mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
Merge pull request #558 from goatcorp/misc
Miscellaneous formatting changes.
This commit is contained in:
commit
b1c2a97aa7
5 changed files with 36 additions and 53 deletions
|
|
@ -223,28 +223,6 @@ namespace Dalamud.Game
|
||||||
var linkMatch = this.urlRegex.Match(message.TextValue);
|
var linkMatch = this.urlRegex.Match(message.TextValue);
|
||||||
if (linkMatch.Value.Length > 0)
|
if (linkMatch.Value.Length > 0)
|
||||||
this.LastLink = linkMatch.Value;
|
this.LastLink = linkMatch.Value;
|
||||||
|
|
||||||
// Handle all of this with SeString some day
|
|
||||||
/*
|
|
||||||
if ((this.HandledChatTypeColors.ContainsKey(type) || type == XivChatType.Say || type == XivChatType.Shout ||
|
|
||||||
type == XivChatType.Alliance || type == XivChatType.TellOutgoing || type == XivChatType.Yell)) {
|
|
||||||
var italicsStart = message.TextValue.IndexOf("*", StringComparison.InvariantCulture);
|
|
||||||
var italicsEnd = message.TextValue.IndexOf("*", italicsStart + 1, StringComparison.InvariantCulture);
|
|
||||||
|
|
||||||
var messageString = message.TextValue;
|
|
||||||
|
|
||||||
while (italicsEnd != -1) {
|
|
||||||
var it = MakeItalics(
|
|
||||||
messageString.Substring(italicsStart, italicsEnd - italicsStart + 1).Replace("*", ""));
|
|
||||||
messageString = messageString.Remove(italicsStart, italicsEnd - italicsStart + 1);
|
|
||||||
messageString = messageString.Insert(italicsStart, it);
|
|
||||||
italicsStart = messageString.IndexOf("*");
|
|
||||||
italicsEnd = messageString.IndexOf("*", italicsStart + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
message.RawData = Encoding.UTF8.GetBytes(messageString);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PrintWelcomeMessage()
|
private void PrintWelcomeMessage()
|
||||||
|
|
|
||||||
|
|
@ -338,7 +338,7 @@ namespace Dalamud.Game.Gui
|
||||||
this.LastLinkedItemId = Marshal.ReadInt32(itemInfoPtr, 8);
|
this.LastLinkedItemId = Marshal.ReadInt32(itemInfoPtr, 8);
|
||||||
this.LastLinkedItemFlags = Marshal.ReadByte(itemInfoPtr, 0x14);
|
this.LastLinkedItemFlags = Marshal.ReadByte(itemInfoPtr, 0x14);
|
||||||
|
|
||||||
Log.Verbose($"HandlePopulateItemLinkDetour {linkObjectPtr} {itemInfoPtr} - linked:{this.LastLinkedItemId}");
|
// Log.Verbose($"HandlePopulateItemLinkDetour {linkObjectPtr} {itemInfoPtr} - linked:{this.LastLinkedItemId}");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -165,9 +165,9 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
};
|
};
|
||||||
|
|
||||||
dataKind = dataKind.Replace(" ", string.Empty).ToLower();
|
dataKind = dataKind.Replace(" ", string.Empty).ToLower();
|
||||||
var matched = Enum.GetValues(typeof(DataKind))
|
|
||||||
.Cast<DataKind>()
|
var matched = Enum.GetValues<DataKind>()
|
||||||
.Where(k => Enum.GetName(typeof(DataKind), k).Replace("_", string.Empty).ToLower() == dataKind)
|
.Where(kind => Enum.GetName(kind).Replace("_", string.Empty).ToLower() == dataKind)
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
if (matched != default)
|
if (matched != default)
|
||||||
|
|
@ -176,7 +176,7 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Service<ChatGui>.Get().PrintError("/xldata: Invalid Data Type");
|
Service<ChatGui>.Get().PrintError($"/xldata: Invalid data type {dataKind}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
using Dalamud.Configuration.Internal;
|
using Dalamud.Configuration.Internal;
|
||||||
using Dalamud.Game.ClientState.Keys;
|
using Dalamud.Game.ClientState.Keys;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
@ -220,20 +221,20 @@ namespace Dalamud.Interface.Windowing
|
||||||
ImGui.PopID();
|
ImGui.PopID();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckState()
|
// private void CheckState()
|
||||||
{
|
// {
|
||||||
if (this.internalLastIsOpen != this.internalIsOpen)
|
// if (this.internalLastIsOpen != this.internalIsOpen)
|
||||||
{
|
// {
|
||||||
if (this.internalIsOpen)
|
// if (this.internalIsOpen)
|
||||||
{
|
// {
|
||||||
this.OnOpen();
|
// this.OnOpen();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
this.OnClose();
|
// this.OnClose();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
private void ApplyConditionals()
|
private void ApplyConditionals()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,11 @@ namespace Dalamud.Plugin.Internal
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load all plugins, sorted by priority. Any plugins with no explicit definition file or a negative priority
|
/// Load all plugins, sorted by priority. Any plugins with no explicit definition file or a negative priority
|
||||||
/// are loaded asynchronously. Should only be called during Dalamud startup.
|
/// are loaded asynchronously.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This should only be called during Dalamud startup.
|
||||||
|
/// </remarks>
|
||||||
public void LoadAllPlugins()
|
public void LoadAllPlugins()
|
||||||
{
|
{
|
||||||
if (this.SafeMode)
|
if (this.SafeMode)
|
||||||
|
|
@ -267,8 +270,11 @@ namespace Dalamud.Plugin.Internal
|
||||||
|
|
||||||
var asyncPlugins = pluginDefs.Where(def => def.Manifest == null || def.Manifest.LoadPriority <= 0);
|
var asyncPlugins = pluginDefs.Where(def => def.Manifest == null || def.Manifest.LoadPriority <= 0);
|
||||||
Task.Run(() => LoadPlugins(asyncPlugins))
|
Task.Run(() => LoadPlugins(asyncPlugins))
|
||||||
.ContinueWith(task => this.PluginsReady = true)
|
.ContinueWith(task =>
|
||||||
.ContinueWith(task => this.NotifyInstalledPluginsChanged());
|
{
|
||||||
|
this.PluginsReady = true;
|
||||||
|
this.NotifyInstalledPluginsChanged();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -727,24 +733,22 @@ namespace Dalamud.Plugin.Internal
|
||||||
var plugin = metadata.InstalledPlugin;
|
var plugin = metadata.InstalledPlugin;
|
||||||
|
|
||||||
// Can't update that!
|
// Can't update that!
|
||||||
if (plugin is LocalDevPlugin)
|
if (plugin.IsDev)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var updateStatus = new PluginUpdateStatus
|
var updateStatus = new PluginUpdateStatus
|
||||||
{
|
{
|
||||||
InternalName = plugin.Manifest.InternalName,
|
InternalName = plugin.Manifest.InternalName,
|
||||||
Name = plugin.Manifest.Name,
|
Name = plugin.Manifest.Name,
|
||||||
Version = metadata.UseTesting ? metadata.UpdateManifest.TestingAssemblyVersion : metadata.UpdateManifest.AssemblyVersion,
|
Version = metadata.UseTesting
|
||||||
|
? metadata.UpdateManifest.TestingAssemblyVersion
|
||||||
|
: metadata.UpdateManifest.AssemblyVersion,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (dryRun)
|
updateStatus.WasUpdated = true;
|
||||||
{
|
|
||||||
updateStatus.WasUpdated = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
updateStatus.WasUpdated = true;
|
|
||||||
|
|
||||||
|
if (!dryRun)
|
||||||
|
{
|
||||||
// Unload if loaded
|
// Unload if loaded
|
||||||
if (plugin.State == PluginState.Loaded || plugin.State == PluginState.LoadError)
|
if (plugin.State == PluginState.Loaded || plugin.State == PluginState.LoadError)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue