refactor(runtime): own canonical action state
Move selection, combat, and interaction target mode under one Runtime owner; make plugins, retained UI, session routing, and typed runtime views borrow its exact children; and add failure-safe reset, instance isolation, source ownership, and normalized checkpoint coverage without changing retail ordering. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
bb45afef33
commit
b298f99f91
38 changed files with 711 additions and 93 deletions
|
|
@ -31,10 +31,18 @@ var runtimeOptions = RuntimeOptions.FromEnvironment(datDir);
|
|||
|
||||
var worldGameState = new AcDream.Core.Plugins.WorldGameState();
|
||||
var worldEvents = new AcDream.Core.Plugins.WorldEvents();
|
||||
var selection = new AcDream.Core.Selection.SelectionState();
|
||||
var uiRegistry = new AcDream.App.Plugins.BufferedUiRegistry();
|
||||
using var window = new GameWindow(
|
||||
runtimeOptions,
|
||||
worldGameState,
|
||||
worldEvents,
|
||||
uiRegistry);
|
||||
var host = new AppPluginHost(
|
||||
new SerilogAdapter(Log.Logger), worldGameState, worldEvents, selection, uiRegistry);
|
||||
new SerilogAdapter(Log.Logger),
|
||||
worldGameState,
|
||||
worldEvents,
|
||||
window.Selection,
|
||||
uiRegistry);
|
||||
|
||||
var pluginsDir = Path.Combine(AppContext.BaseDirectory, "plugins");
|
||||
Log.Information("scanning plugins in {PluginsDir}", pluginsDir);
|
||||
|
|
@ -67,8 +75,6 @@ try
|
|||
catch (Exception ex) { Log.Error(ex, "plugin enable failed: {Id}", plugin.Manifest.Id); }
|
||||
}
|
||||
|
||||
using var window = new GameWindow(
|
||||
runtimeOptions, worldGameState, worldEvents, selection, uiRegistry);
|
||||
window.Run();
|
||||
}
|
||||
finally
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue