Merge branch 'net5' of ssh://github.com/goatcorp/Dalamud into net5

This commit is contained in:
goaaats 2022-05-22 16:24:49 +02:00
commit 40ca5e7a4a
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
3 changed files with 12 additions and 3 deletions

View file

@ -39,7 +39,7 @@ namespace Dalamud
/// <summary>
/// Gets the language of the game client.
/// </summary>
public ClientLanguage Language { get; init; }
public ClientLanguage Language { get; init; } = ClientLanguage.English;
/// <summary>
/// Gets the current game version code.

View file

@ -9,6 +9,7 @@ using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Hooking;
using Dalamud.Interface;
using Dalamud.Interface.Internal;
using Dalamud.Interface.Windowing;
using FFXIVClientStructs.FFXIV.Component.GUI;
@ -90,8 +91,9 @@ namespace Dalamud.Game.Internal
{
var systemText = Service<DataManager>.Get().GetExcelSheet<Addon>()!.GetRow(1059)!.Text.RawString; // "System"
var configuration = Service<DalamudConfiguration>.Get();
var interfaceManager = Service<InterfaceManager>.Get();
if (args.Title == systemText && configuration.DoButtonsSystemMenu)
if (args.Title == systemText && configuration.DoButtonsSystemMenu && interfaceManager.IsDispatchingEvents)
{
var dalamudInterface = Service<DalamudInterface>.Get();
@ -131,8 +133,9 @@ namespace Dalamud.Game.Internal
}
var configuration = Service<DalamudConfiguration>.Get();
var interfaceManager = Service<InterfaceManager>.Get();
if (!configuration.DoButtonsSystemMenu)
if (!configuration.DoButtonsSystemMenu || !interfaceManager.IsDispatchingEvents)
{
this.hookAgentHudOpenSystemMenu.Original(thisPtr, atkValueArgs, menuSize);
return;

View file

@ -15,6 +15,7 @@ using Dalamud.Game.Text.Sanitizer;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Interface;
using Dalamud.Interface.Internal;
using Dalamud.Plugin.Internal;
using Dalamud.Plugin.Ipc;
using Dalamud.Plugin.Ipc.Exceptions;
@ -139,6 +140,11 @@ namespace Dalamud.Plugin
/// <summary>
/// Gets a value indicating whether Dalamud is running in Debug mode or the /xldev menu is open. This can occur on release builds.
/// </summary>
public bool IsDevMenuOpen => Service<DalamudInterface>.GetNullable() is {IsDevMenuOpen: true}; // Can be null during boot
/// <summary>
/// Gets a value indicating whether a debugger is attached.
/// </summary>
public bool IsDebugging => Debugger.IsAttached;
/// <summary>