feat(sdk): migrate to EventBus 2.0

Replace the legacy EventBase runtime with generated multi-bus bindings and explicit scheduling. Migrate app, data, network, demo, and mod consumers; add generated network-event registration and owner-scoped mod content overrides.
This commit is contained in:
2026-08-26 01:15:48 +08:00
parent 67d32795c4
commit ad5a7b68a3
129 changed files with 5071 additions and 5584 deletions
@@ -54,13 +54,13 @@ namespace ShrinkDataSaver.Integration
}
private static void HandleSettingsChanged(string key, object value) =>
EventBus.TriggerEvent(new SettingsChangedEvent { Key = key, Value = value });
EventBus.Post(new SettingsChangedEvent { Key = key, Value = value });
private static void HandleSaveStarted(SaveStartedEventArgs args) =>
EventBus.TriggerEvent(new SaveStartedEvent { SlotIndex = args.SlotIndex, Timestamp = args.Timestamp });
EventBus.Post(new SaveStartedEvent { SlotIndex = args.SlotIndex, Timestamp = args.Timestamp });
private static void HandleSaveCompleted(SaveCompletedEventArgs args) =>
EventBus.TriggerEvent(new SaveCompletedEvent
EventBus.Post(new SaveCompletedEvent
{
SlotIndex = args.SlotIndex,
ModuleNames = args.ModuleNames,
@@ -68,17 +68,17 @@ namespace ShrinkDataSaver.Integration
});
private static void HandleSaveFailed(SaveFailedEventArgs args) =>
EventBus.TriggerEvent(new SaveFailedEvent
EventBus.Post(new SaveFailedEvent
{
SlotIndex = args.SlotIndex,
ErrorMessage = args.ErrorMessage
});
private static void HandleLoadStarted(LoadStartedEventArgs args) =>
EventBus.TriggerEvent(new LoadStartedEvent { SlotIndex = args.SlotIndex, Timestamp = args.Timestamp });
EventBus.Post(new LoadStartedEvent { SlotIndex = args.SlotIndex, Timestamp = args.Timestamp });
private static void HandleLoadCompleted(LoadCompletedEventArgs args) =>
EventBus.TriggerEvent(new LoadCompletedEvent
EventBus.Post(new LoadCompletedEvent
{
SlotIndex = args.SlotIndex,
ModuleNames = args.ModuleNames,
@@ -87,14 +87,14 @@ namespace ShrinkDataSaver.Integration
});
private static void HandleLoadFailed(LoadFailedEventArgs args) =>
EventBus.TriggerEvent(new LoadFailedEvent
EventBus.Post(new LoadFailedEvent
{
SlotIndex = args.SlotIndex,
ErrorMessage = args.ErrorMessage
});
private static void HandleMigrationCompleted(MigrationCompletedEventArgs args) =>
EventBus.TriggerEvent(new MigrationCompletedEvent
EventBus.Post(new MigrationCompletedEvent
{
SlotIndex = args.SlotIndex,
FromVersion = args.FromVersion,
@@ -102,6 +102,6 @@ namespace ShrinkDataSaver.Integration
});
private static void HandleSlotDeleted(SlotDeletedEventArgs args) =>
EventBus.TriggerEvent(new SlotDeletedEvent { SlotIndex = args.SlotIndex });
EventBus.Post(new SlotDeletedEvent { SlotIndex = args.SlotIndex });
}
}