Wait for daemon action bar binding state
This commit is contained in:
parent
86e10caff0
commit
f891cbc001
2 changed files with 27 additions and 8 deletions
|
|
@ -9026,6 +9026,27 @@ static void RequireActionBarBindingRequestAuthority(string root)
|
|||
"Action-bar binding still contains the old unconditional weapon-group overwrite path: " +
|
||||
string.Join(", ", legacyHits));
|
||||
}
|
||||
|
||||
var inventoryMenuPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "InventoryMenu.cs");
|
||||
var inventoryMenu = File.Exists(inventoryMenuPath)
|
||||
? File.ReadAllText(inventoryMenuPath)
|
||||
: throw new InvalidOperationException("Cannot verify action-bar binding authority; InventoryMenu.cs is missing.");
|
||||
var forbiddenUiAcceptanceSymbols = new[]
|
||||
{
|
||||
"GameManager.RequestWeaponGroupActionBarBinding(command.SlotIndex, command.GroupIndex))",
|
||||
"GameManager.RequestClearActionBarBinding(command.SlotIndex))",
|
||||
"Unable to bind equipped-item weapon group to action bar.",
|
||||
"Unable to clear equipped-item action bar binding."
|
||||
};
|
||||
var uiAcceptanceHits = forbiddenUiAcceptanceSymbols
|
||||
.Where(symbol => inventoryMenu.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (uiAcceptanceHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"InventoryMenu still treats equipped-item action-bar command submission as accepted binding state: " +
|
||||
string.Join(", ", uiAcceptanceHits));
|
||||
}
|
||||
}
|
||||
|
||||
static void RequireInventoryDoubleClickTransferRequestAuthority(string root)
|
||||
|
|
|
|||
|
|
@ -351,24 +351,22 @@ public class InventoryMenu : MonoBehaviour
|
|||
return;
|
||||
case AetheriaRuntimeEquippedItemDetailsCommandKind.BindWeaponGroup:
|
||||
if (command.GroupIndex >= 0 &&
|
||||
command.SlotIndex >= 0 &&
|
||||
GameManager.RequestWeaponGroupActionBarBinding(command.SlotIndex, command.GroupIndex))
|
||||
command.SlotIndex >= 0)
|
||||
{
|
||||
RenderEquippedItemDetailsSurface(item);
|
||||
GameManager.RequestWeaponGroupActionBarBinding(command.SlotIndex, command.GroupIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.LogWarning("Unable to bind equipped-item weapon group to action bar.");
|
||||
Debug.LogWarning("Unable to submit equipped-item action-bar binding request.");
|
||||
return;
|
||||
case AetheriaRuntimeEquippedItemDetailsCommandKind.ClearActionBarBinding:
|
||||
if (command.SlotIndex >= 0 &&
|
||||
GameManager.RequestClearActionBarBinding(command.SlotIndex))
|
||||
if (command.SlotIndex >= 0)
|
||||
{
|
||||
RenderEquippedItemDetailsSurface(item);
|
||||
GameManager.RequestClearActionBarBinding(command.SlotIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.LogWarning("Unable to clear equipped-item action bar binding.");
|
||||
Debug.LogWarning("Unable to submit equipped-item action-bar clear request.");
|
||||
return;
|
||||
default:
|
||||
Debug.LogWarning($"Unknown inventory equipped item details command: {request?.Command}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue