Ejemplo n.º 1
0
        public override CompatibilityType GetCompatibilityType(PsaiMusicEntity targetEntity, out CompatibilityReason reason)
        {
            if (targetEntity is Theme)
            {
                Theme targetTheme = targetEntity as Theme;
                psai.net.ThemeInterruptionBehavior interruptionBehavior = psai.net.Theme.GetThemeInterruptionBehavior((psai.net.ThemeType) this.ThemeTypeInt, (psai.net.ThemeType)targetTheme.ThemeTypeInt);

                if (psai.net.Theme.ThemeInterruptionBehaviorRequiresEvaluationOfSegmentCompatibilities(interruptionBehavior))
                {
                    if (ManuallyBlockedTargetThemes.Contains(targetEntity as Theme))
                    {
                        reason = CompatibilityReason.manual_setting_within_same_hierarchy;
                        return(CompatibilityType.blocked_manually);
                    }
                    else
                    {
                        reason = CompatibilityReason.default_behavior_of_psai;
                        return(CompatibilityType.allowed_implicitly);
                    }
                }
                else
                {
                    if (interruptionBehavior == psai.net.ThemeInterruptionBehavior.never)
                    {
                        reason = CompatibilityReason.target_theme_will_never_interrupt_source;
                        return(CompatibilityType.logically_impossible);
                    }
                }
            }

            reason = CompatibilityReason.not_set;
            return(CompatibilityType.undefined);
        }
Ejemplo n.º 2
0
 public override CompatibilitySetting GetCompatibilitySetting(PsaiMusicEntity targetEntity)
 {
     if (targetEntity is Theme)
     {
         if (ManuallyBlockedTargetThemes.Contains((Theme)targetEntity))
         {
             return(CompatibilitySetting.blocked);
         }
     }
     return(CompatibilitySetting.neutral);
 }