Make action bar binding requests submit-only
This commit is contained in:
parent
540cadbef1
commit
ed42de8e84
2 changed files with 21 additions and 10 deletions
|
|
@ -9027,6 +9027,21 @@ static void RequireActionBarBindingRequestAuthority(string root)
|
|||
string.Join(", ", legacyHits));
|
||||
}
|
||||
|
||||
var forbiddenPublicAcceptanceApis = new[]
|
||||
{
|
||||
"public bool RequestWeaponGroupActionBarBinding(",
|
||||
"public bool RequestClearActionBarBinding("
|
||||
};
|
||||
var publicAcceptanceApiHits = forbiddenPublicAcceptanceApis
|
||||
.Where(symbol => actionGameManager.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (publicAcceptanceApiHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"ActionBar binding request APIs still expose submission as public acceptance state: " +
|
||||
string.Join(", ", publicAcceptanceApiHits));
|
||||
}
|
||||
|
||||
var inventoryMenuPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "InventoryMenu.cs");
|
||||
var inventoryMenu = File.Exists(inventoryMenuPath)
|
||||
? File.ReadAllText(inventoryMenuPath)
|
||||
|
|
|
|||
|
|
@ -652,12 +652,12 @@ public class ActionGameManager : MonoBehaviour
|
|||
};
|
||||
}
|
||||
|
||||
public bool RequestWeaponGroupActionBarBinding(int slotIndex, int groupIndex)
|
||||
public void RequestWeaponGroupActionBarBinding(int slotIndex, int groupIndex)
|
||||
{
|
||||
var slot = ResolveActionBarSlot(slotIndex);
|
||||
if (slot == null)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
var binding = new AetheriaRuntimeActionBarBindingCommit
|
||||
|
|
@ -666,20 +666,16 @@ public class ActionGameManager : MonoBehaviour
|
|||
Kind = "weapon_group",
|
||||
WeaponGroup = groupIndex
|
||||
};
|
||||
if (TryRequestDaemonActionBarBinding(binding))
|
||||
return true;
|
||||
return false;
|
||||
TryRequestDaemonActionBarBinding(binding);
|
||||
}
|
||||
|
||||
public bool RequestClearActionBarBinding(int slotIndex)
|
||||
public void RequestClearActionBarBinding(int slotIndex)
|
||||
{
|
||||
var slot = ResolveActionBarSlot(slotIndex);
|
||||
if (slot == null)
|
||||
return false;
|
||||
return;
|
||||
|
||||
if (TryRequestDaemonActionBarBindingClear(slot))
|
||||
return true;
|
||||
return false;
|
||||
TryRequestDaemonActionBarBindingClear(slot);
|
||||
}
|
||||
|
||||
private void RestoreActionBarBindingsFromTypedRun(
|
||||
|
|
|
|||
Loading…
Reference in a new issue