Let daemon validate docked ship selection

This commit is contained in:
Meta Vens 2026-06-21 12:28:10 +01:00
commit 93ece6b305
2 changed files with 21 additions and 6 deletions

View file

@ -8512,8 +8512,9 @@ static void RequireRuntimeSimulationTuningRequests(string root)
"entity?.Settings == null",
"entity.Settings == null"
};
var unityAcceptanceHits = forbiddenUnityAcceptanceSymbols
.Where(symbol => actionGameManager.Contains(symbol, StringComparison.Ordinal))
var unityAcceptanceHits = FindMethodScopedLineHits(actionGameManager, forbiddenUnityAcceptanceSymbols)
.Where(hit => hit.MethodName == "RequestEntityShutdownPerformance")
.Select(hit => $"ActionGameManager.cs:{hit.LineNumber}: {hit.Line.Trim()}")
.ToArray();
if (unityAcceptanceHits.Length > 0)
{
@ -9338,6 +9339,23 @@ static void RequireDockedCurrentShipRequestAuthority(string root)
"Unity docked current-ship selection still rejects through renderer-local child membership instead of daemon acceptance.");
}
var forbiddenUnityAcceptanceSymbols = new[]
{
"!ship.IsPlayerShip",
"DockedEntity == null",
"DockingBay == null"
};
var unityAcceptanceHits = FindMethodScopedLineHits(actionGameManager, forbiddenUnityAcceptanceSymbols)
.Where(hit => hit.MethodName == "RequestDockedCurrentShip")
.Select(hit => $"ActionGameManager.cs:{hit.LineNumber}: {hit.Line.Trim()}")
.ToArray();
if (unityAcceptanceHits.Length > 0)
{
throw new InvalidOperationException(
"Unity docked current-ship selection still rejects through renderer-local player/docking state instead of daemon acceptance: " +
string.Join(", ", unityAcceptanceHits));
}
var inventoryPanelPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "InventoryPanel.cs");
var forbiddenSymbols = new[]
{

View file

@ -951,10 +951,7 @@ public class ActionGameManager : MonoBehaviour
public bool RequestDockedCurrentShip(Ship ship)
{
if (ship == null ||
!ship.IsPlayerShip ||
DockedEntity == null ||
DockingBay == null)
if (ship == null)
{
return false;
}