@@ -76,7 +76,8 @@ internal static void UpdateEventSourceBadge(NEventLayout layout, EventModel even
7676 {
7777 var existing = layout . GetNodeOrNull < NHoverTipSet > ( EventBadgeNodeName ) ;
7878 var existingHotZone = layout . GetNodeOrNull < Control > ( EventDrawerHotZoneName ) ;
79- if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) )
79+ if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) ||
80+ ! RitsuLibSettingsStore . ShouldShowEventModSourceHoverTips ( ) )
8081 {
8182 RemoveBadge ( layout , existing ) ;
8283 RemoveBadge ( layout , existingHotZone ) ;
@@ -262,7 +263,8 @@ public static ModPatchTarget[] GetTargets()
262263 public static void Postfix ( CardKeyword keyword , ref IHoverTip __result )
263264 // ReSharper restore once InconsistentNaming
264265 {
265- if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) )
266+ if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) ||
267+ ! RitsuLibSettingsStore . ShouldShowKeywordModSourceHoverTips ( ) )
266268 return ;
267269
268270 var info = ContentSourceHoverTipFactory . ResolveKeyword ( keyword ) ;
@@ -293,7 +295,8 @@ public static ModPatchTarget[] GetTargets()
293295 public static void Postfix ( ref IHoverTip __result )
294296 // ReSharper restore once InconsistentNaming
295297 {
296- if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) )
298+ if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) ||
299+ ! RitsuLibSettingsStore . ShouldShowGameTermModSourceHoverTips ( ) )
297300 return ;
298301
299302 var info = ContentSourceHoverTipFactory . ContentSourceInfo . Vanilla ;
@@ -324,7 +327,8 @@ public static ModPatchTarget[] GetTargets()
324327 public static void Postfix ( ref IHoverTip __result )
325328 // ReSharper restore once InconsistentNaming
326329 {
327- if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) )
330+ if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) ||
331+ ! RitsuLibSettingsStore . ShouldShowGameTermModSourceHoverTips ( ) )
328332 return ;
329333
330334 var info = ContentSourceHoverTipFactory . ContentSourceInfo . Vanilla ;
@@ -370,18 +374,7 @@ public static void Postfix(AbstractModel __instance, ref HoverTip __result)
370374 if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) )
371375 return ;
372376
373- if ( __instance is IContentSourceSupplier supplier )
374- {
375- var source = ContentSourceHoverTipFactory . Resolve ( supplier ) ;
376- if ( ! ContentSourceHoverTipFactory . ShouldShow ( source ) )
377- return ;
378-
379- ContentSourceHoverTipPatchHelper . Append ( source , ref __result ) ;
380- return ;
381- }
382-
383- var info = ContentSourceHoverTipFactory . Resolve ( __instance . GetType ( ) ) ;
384- if ( ! ContentSourceHoverTipFactory . ShouldShow ( info ) )
377+ if ( ! ContentSourceHoverTipFactory . TryResolve ( __instance , out var info ) )
385378 return ;
386379
387380 ContentSourceHoverTipPatchHelper . Append ( info , ref __result ) ;
@@ -522,7 +515,8 @@ private static void AppendTip<T>(FieldInfo? listField, FieldInfo? indexField, Co
522515 public static void Prefix ( Control owner , ref IEnumerable < IHoverTip > hoverTips )
523516 // ReSharper restore once InconsistentNaming
524517 {
525- if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) )
518+ if ( ! RitsuLibSettingsStore . IsModSourceHoverTipsEnabled ( ) ||
519+ ! RitsuLibSettingsStore . ShouldShowCreatureModSourceHoverTips ( ) )
526520 return ;
527521
528522 switch ( owner )
0 commit comments