Move trade cargo selector onto Eve surfaces
This commit is contained in:
parent
6bbf37fbb0
commit
74ed97a76f
3 changed files with 304 additions and 27 deletions
|
|
@ -36,6 +36,7 @@ RequireMainMenuSettingsShellUsesEveSurface(root);
|
|||
RequireSectorMapZoneDetailsUseEveSurface(root);
|
||||
RequireRuntimeMenuTabsUseEveSurface(root);
|
||||
RequireInventoryShipSettingsUseEveSurface(root);
|
||||
RequireTradeCargoSelectorUseEveSurface(root);
|
||||
RequirePlayerSettingsEveSurface(root);
|
||||
RequireMainMenuContinueRunState(root);
|
||||
RequirePropertiesPanelReadOnlyInspector(root);
|
||||
|
|
@ -504,6 +505,7 @@ Console.WriteLine("Main-menu settings shell: settings/input/audio subpages lower
|
|||
Console.WriteLine("Sector-map zone details shell: zone inspection lowers through an Eve UI Toolkit surface instead of PropertiesPanel rows");
|
||||
Console.WriteLine("Runtime menu tab shell: tab navigation lowers through an Eve UI Toolkit surface instead of MenuTabButton click wiring");
|
||||
Console.WriteLine("Inventory ship-settings shell: background ship tuning lowers through an Eve UI Toolkit surface instead of PropertiesPanel.AddField");
|
||||
Console.WriteLine("Trade cargo-selector shell: target cargo selection lowers through an Eve UI Toolkit surface instead of ContextMenu.AddOption");
|
||||
Console.WriteLine("Main-menu Continue authority: Continue selects typed run state instead of a null button");
|
||||
Console.WriteLine("PropertiesPanel inspector authority: dead generic reflection inspector path is deleted");
|
||||
Console.WriteLine("Typed behavior metadata authority: live heat/mining/thermotoggle payload kinds stay owned by package metadata");
|
||||
|
|
@ -2643,6 +2645,56 @@ static void RequireInventoryShipSettingsUseEveSurface(string root)
|
|||
}
|
||||
}
|
||||
|
||||
static void RequireTradeCargoSelectorUseEveSurface(string root)
|
||||
{
|
||||
var tradeMenuPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "TradeMenu.cs");
|
||||
if (!File.Exists(tradeMenuPath))
|
||||
{
|
||||
throw new InvalidOperationException("Cannot verify trade cargo-selector shell; TradeMenu.cs is missing.");
|
||||
}
|
||||
|
||||
var source = File.ReadAllText(tradeMenuPath);
|
||||
var requiredSymbols = new[]
|
||||
{
|
||||
"CargoSelectorSurfaceId",
|
||||
"RenderCargoSelectorSurface(",
|
||||
"BuildCargoSelectionCommands(",
|
||||
"HandleCargoSelectorSurfaceCommand(",
|
||||
"ResolveCargoSelectorSurfaceDocument(",
|
||||
"BuildCargoSelectorSurfaceDefinition(",
|
||||
"CloseCargoSelectorCommand",
|
||||
"new EveUiToolkitSurfaceLowerer()"
|
||||
};
|
||||
|
||||
var missingSymbols = requiredSymbols
|
||||
.Where(symbol => !source.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
|
||||
if (missingSymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"TradeMenu no longer lowers the cargo selector through an Eve surface shell: " +
|
||||
string.Join(", ", missingSymbols));
|
||||
}
|
||||
|
||||
var forbiddenSymbols = new[]
|
||||
{
|
||||
"ContextMenu.AddOption(\"Docking Bay\"",
|
||||
"ContextMenu.AddOption($\"{ship.Name} Bay {bay.index+1}\""
|
||||
};
|
||||
|
||||
var hits = forbiddenSymbols
|
||||
.Where(symbol => source.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
|
||||
if (hits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"TradeMenu still owns cargo selection through the old context-menu option path: " +
|
||||
string.Join(", ", hits));
|
||||
}
|
||||
}
|
||||
|
||||
static void RequirePlayerSettingsEveSurface(string root)
|
||||
{
|
||||
var projectorPath = Path.Combine(root, "Aetheria.State", "AetheriaPlayerSettingsSurfaceProjector.cs");
|
||||
|
|
|
|||
Loading…
Reference in a new issue