mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +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);
|
||||
if (linkMatch.Value.Length > 0)
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ namespace Dalamud.Game.Gui
|
|||
this.LastLinkedItemId = Marshal.ReadInt32(itemInfoPtr, 8);
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -165,9 +165,9 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
};
|
||||
|
||||
dataKind = dataKind.Replace(" ", string.Empty).ToLower();
|
||||
var matched = Enum.GetValues(typeof(DataKind))
|
||||
.Cast<DataKind>()
|
||||
.Where(k => Enum.GetName(typeof(DataKind), k).Replace("_", string.Empty).ToLower() == dataKind)
|
||||
|
||||
var matched = Enum.GetValues<DataKind>()
|
||||
.Where(kind => Enum.GetName(kind).Replace("_", string.Empty).ToLower() == dataKind)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (matched != default)
|
||||
|
|
@ -176,7 +176,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
}
|
||||
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 Dalamud.Configuration.Internal;
|
||||
using Dalamud.Game.ClientState.Keys;
|
||||
using ImGuiNET;
|
||||
|
|
@ -220,20 +221,20 @@ namespace Dalamud.Interface.Windowing
|
|||
ImGui.PopID();
|
||||
}
|
||||
|
||||
private void CheckState()
|
||||
{
|
||||
if (this.internalLastIsOpen != this.internalIsOpen)
|
||||
{
|
||||
if (this.internalIsOpen)
|
||||
{
|
||||
this.OnOpen();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.OnClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
// private void CheckState()
|
||||
// {
|
||||
// if (this.internalLastIsOpen != this.internalIsOpen)
|
||||
// {
|
||||
// if (this.internalIsOpen)
|
||||
// {
|
||||
// this.OnOpen();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// this.OnClose();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
private void ApplyConditionals()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -171,8 +171,11 @@ namespace Dalamud.Plugin.Internal
|
|||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// <remarks>
|
||||
/// This should only be called during Dalamud startup.
|
||||
/// </remarks>
|
||||
public void LoadAllPlugins()
|
||||
{
|
||||
if (this.SafeMode)
|
||||
|
|
@ -267,8 +270,11 @@ namespace Dalamud.Plugin.Internal
|
|||
|
||||
var asyncPlugins = pluginDefs.Where(def => def.Manifest == null || def.Manifest.LoadPriority <= 0);
|
||||
Task.Run(() => LoadPlugins(asyncPlugins))
|
||||
.ContinueWith(task => this.PluginsReady = true)
|
||||
.ContinueWith(task => this.NotifyInstalledPluginsChanged());
|
||||
.ContinueWith(task =>
|
||||
{
|
||||
this.PluginsReady = true;
|
||||
this.NotifyInstalledPluginsChanged();
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -727,24 +733,22 @@ namespace Dalamud.Plugin.Internal
|
|||
var plugin = metadata.InstalledPlugin;
|
||||
|
||||
// Can't update that!
|
||||
if (plugin is LocalDevPlugin)
|
||||
if (plugin.IsDev)
|
||||
return null;
|
||||
|
||||
var updateStatus = new PluginUpdateStatus
|
||||
{
|
||||
InternalName = plugin.Manifest.InternalName,
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
updateStatus.WasUpdated = true;
|
||||
updateStatus.WasUpdated = true;
|
||||
|
||||
if (!dryRun)
|
||||
{
|
||||
// Unload if loaded
|
||||
if (plugin.State == PluginState.Loaded || plugin.State == PluginState.LoadError)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue