Make loadout template saves submit-only

This commit is contained in:
Meta Vens 2026-06-21 14:30:58 +01:00
commit 3e1a9d029c
2 changed files with 17 additions and 9 deletions

View file

@ -9645,8 +9645,8 @@ static void RequireInventoryLoadoutSaveRequestAuthority(string root)
var requiredActionSymbols = new[]
{
"RequestLoadoutTemplateSave",
"TrySendRuntimeLoadoutTemplateCommand(loadout",
"private static bool TrySendRuntimeLoadoutTemplateCommand(",
"SendRuntimeLoadoutTemplateCommand(loadout",
"private static void SendRuntimeLoadoutTemplateCommand(",
"AetheriaRuntimeEveCommands.TrySendLoadoutTemplateCommand",
};
var missingActionSymbols = requiredActionSymbols
@ -9659,10 +9659,20 @@ static void RequireInventoryLoadoutSaveRequestAuthority(string root)
string.Join(", ", missingActionSymbols));
}
if (actionGameManager.Contains("AetheriaRuntimeStateCommitLog.QueueLoadoutTemplate", StringComparison.Ordinal))
var forbiddenActionSymbols = new[]
{
"AetheriaRuntimeStateCommitLog.QueueLoadoutTemplate",
"TrySendRuntimeLoadoutTemplateCommand(",
"private static bool TrySendRuntimeLoadoutTemplateCommand("
};
var forbiddenActionHits = forbiddenActionSymbols
.Where(symbol => actionGameManager.Contains(symbol, StringComparison.Ordinal))
.ToArray();
if (forbiddenActionHits.Length > 0)
{
throw new InvalidOperationException(
"ActionGameManager still saves loadout templates through the runtime commit log.");
"ActionGameManager still saves loadout templates through local commit or submission-acceptance authority: " +
string.Join(", ", forbiddenActionHits));
}
var requiredBridgeSymbols = new[]

View file

@ -858,10 +858,10 @@ public class ActionGameManager : MonoBehaviour
public void RequestLoadoutTemplateSave(EntityConstructionBlueprint blueprint)
{
var loadout = ProjectLoadoutTemplate(blueprint);
TrySendRuntimeLoadoutTemplateCommand(loadout, "unity-inventory", "loadout template save");
SendRuntimeLoadoutTemplateCommand(loadout, "unity-inventory", "loadout template save");
}
private static bool TrySendRuntimeLoadoutTemplateCommand(
private static void SendRuntimeLoadoutTemplateCommand(
AetheriaRuntimeLoadoutTemplateCommit loadout,
string clientId,
string label)
@ -876,16 +876,14 @@ public class ActionGameManager : MonoBehaviour
out var error))
{
Debug.LogError($"Failed to submit Aetheria {label} Eve command: {error}");
return false;
return;
}
Debug.Log($"Submitted Aetheria {label} Eve command: {submitted!.CommandId}");
return true;
}
catch (Exception ex)
{
Debug.LogError($"Failed to send Aetheria {label} Eve command: {ex}");
return false;
}
}