public void TryRegisterSourceFromOsuRTDataProvider(SyncHost host) { foreach (var plugin in host.EnumPluings()) { if (plugin.Name == "OsuRTDataProvider") { Log.Output(OSURTDP_FOUND); OsuRTDataProvider.OsuRTDataProviderPlugin reader = plugin as OsuRTDataProvider.OsuRTDataProviderPlugin; if (reader.ModsChangedAtListening) { SourceWrapper = new RealtimeDataProviderModsWrapper(reader, this); } else { SourceWrapper = new OsuRTDataProviderWrapper(reader, this); } if (SourceWrapper.Attach()) { source = UsingSource.OsuRTDataProvider; } return; } } Log.Error(OSURTDP_NOTFOUND); source = UsingSource.None; }
public void TryRegisterSourceFromDifficultParamModifyPlugin(SyncHost host) { foreach (var plugin in host.EnumPluings()) { if (plugin.Name == "DifficultParamModifyPlugin") { Log.Output($"发现dpmp插件"); DifficultParamModifyPlugin.DifficultParamModifyPlugin reader = plugin as DifficultParamModifyPlugin.DifficultParamModifyPlugin; SourceWrapper = new DifficultParamModifyPluginSourceWrapper(reader, this); if (SourceWrapper.Attach()) { source = UsingSource.DifficultParamModifyPlugin; } return; } } Log.Error($"没发现dpmp插件"); source = UsingSource.None; }